This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 137944

Summary: NPE on creating a new MIDP project at org.netbeans.modules.vmd.io.javame.MEDesignDataLoader.createSecondaryEntry
Product: platform Reporter: Andrei Chistiakov <ca-nb>
Component: Data SystemsAssignee: Jaroslav Tulach <jtulach>
Status: RESOLVED DUPLICATE    
Severity: blocker CC: jglick, kharezlak, samaresh
Priority: P2 Keywords: THREAD
Version: 6.x   
Hardware: All   
OS: Windows XP   
Issue Type: DEFECT Exception Reporter:
Attachments: stack trace
stacktrace
stacktrace
stacktrace
stacktrace
stacktrace
stacktrace
stacktrace

Description Andrei Chistiakov 2008-06-23 10:39:56 UTC
Reproduced with NetBeans IDE Dev (Build 200806230002)
Java: 1.6.0_04; Java HotSpot(TM) Client VM 10.0-b19
System: Windows XP version 5.1 running on x86; Cp1251; ru_RU (nb)

To reproduce:
- create a couple of MIDP sample projects (I created Currency Converter and City Guide);
- launch New Project wizard;
- select Mobile Application project, press Next;
- on Name and Location pane accept all defaults and press Next;
- on Default Platform Selection pane select MIDP 2.0, leave all other parameters default, press Next;
- on More Configurations Selection pane press Finish.

IDE hangs for a minute and then throws the following exception:

java.lang.NullPointerException
	at org.netbeans.modules.vmd.io.javame.MEDesignDataLoader.createSecondaryEntry(MEDesignDataLoader.java:103)
	at org.netbeans.modules.vmd.io.javame.MEDesignDataObject.<init>(MEDesignDataObject.java:76)
	at org.netbeans.modules.vmd.io.javame.MEDesignDataLoader.createMultiObject(MEDesignDataLoader.java:95)
	at org.openide.loaders.DataObjectPool.createMultiObject(DataObjectPool.java:194)
	at org.openide.loaders.MultiDataObject.createMultiObject(MultiDataObject.java:933)
	at org.openide.loaders.MultiDataObject.handleCreateFromTemplate(MultiDataObject.java:736)
	at org.openide.loaders.DataObject$CreateAction.run(DataObject.java:1277)
	at org.openide.loaders.DataObjectPool$1WrapAtomicAction.run(DataObjectPool.java:258)
	at org.openide.filesystems.EventControl.runAtomicAction(EventControl.java:120)
	at org.openide.filesystems.FileSystem.runAtomicAction(FileSystem.java:499)
...

The newly created project is not opened in IDE.
Comment 1 Karol Harezlak 2008-06-23 13:52:38 UTC
Created attachment 63258 [details]
stack trace
Comment 2 Karol Harezlak 2008-06-23 13:53:34 UTC
I think this issue is just a result something which is going on underneath of Mobility Project creation. I'm resign it
to the core for evaluation. 
Begining of the stack trace:

INFO [org.openide.loaders.FolderInstance.Loaders.text.plain.Factories]: Preventing deadlock #65543: Do not call
FolderLookup from inside DataObject operations!
java.lang.Exception: Thread dump
        at org.openide.loaders.FolderLookup$ProxyLkp.beforeLookup(FolderLookup.java:389)
        at org.openide.util.lookup.ProxyLookup$R.myBeforeLookup(ProxyLookup.java:624)
        at org.openide.util.lookup.ProxyLookup$R.beforeLookup(ProxyLookup.java:643)
        at org.openide.util.lookup.ProxyLookup$R.myBeforeLookup(ProxyLookup.java:632)
        at org.openide.util.lookup.ProxyLookup$R.computeResult(ProxyLookup.java:497)
        at org.openide.util.lookup.ProxyLookup$R.allInstances(ProxyLookup.java:468)
        at org.openide.util.Lookup.lookupAll(Lookup.java:245)
...

Full stack trace available in the attachment - stacktrace.txt 
Comment 3 Karol Harezlak 2008-06-24 13:20:36 UTC
*** Issue 138075 has been marked as a duplicate of this issue. ***
Comment 4 Petr Suchomel 2008-06-27 08:04:39 UTC
*** Issue 138424 has been marked as a duplicate of this issue. ***
Comment 5 Ivan Sidorkin 2008-07-01 08:55:14 UTC
Created attachment 63731 [details]
stacktrace
Comment 6 Antonin Nebuzelsky 2008-07-01 11:04:37 UTC
Jarda on vacation. Jesse, can you evaluate?
Comment 7 Jesse Glick 2008-07-01 21:24:30 UTC
I cannot reproduce on Ubuntu, JDK 6, in c679224a8011. Works fine.

AFAIK the thread dump is informational. I do not know how MimeEnum is intended to work, threading-wise, and would not
want to attempt any changes in this area.

The NPE is probably fixable in MEDesignDataLoader; you are calling FileUtil.findBrother but the result is null, which
you do not check for.
Comment 8 Alexander Kouznetsov 2008-07-07 13:41:26 UTC
Build: NetBeans Platform Dev (Build 200807020003)
VM: Java HotSpot(TM) Client VM, 11.0-b12, Java(TM) SE Runtime Environment, 1.6.0_10-beta-b24
OS: Windows XP, 5.1, x86

User Comments: 
Automatic test fails to create MobileApplication
Comment 9 Alexander Kouznetsov 2008-07-07 13:41:30 UTC
Created attachment 63993 [details]
stacktrace
Comment 10 Petr Dvorak 2008-07-11 10:30:22 UTC
Build: NetBeans IDE Dev (Build 200807090008)
VM: Java HotSpot(TM) Client VM, 11.0-b13, Java(TM) SE Runtime Environment, 1.6.0_10-rc-b26
OS: Linux, 2.6.24-19-generic, i386

User Comments: 
I wanted to create a MIDP application (New Project > Mobility > MIDP Application). IDE froze for a while (for about 1 minute+-) and when I was about to do a thread dump, this NPE was thrown...
Comment 11 Petr Dvorak 2008-07-11 10:30:37 UTC
Created attachment 64309 [details]
stacktrace
Comment 12 Petr Dvorak 2008-07-11 10:40:30 UTC
Product Version: NetBeans IDE Dev (Build 200807090008)
Java: 1.6.0_10-rc; Java HotSpot(TM) Client VM 11.0-b13
System: Linux version 2.6.24-19-generic running on i386; UTF-8; en_US (nb)

Hehe... This is an easy one for a skilled tester:)... The bug appears when you try to create a MIDP application after
you deleted some project.

Steps to reproduce: 

1. Run IDE with a clean userdir
2. Create a Java Application called "ToDeleteProject" (normal java application, or you can create a MIDP application,
does not matter)
3. Delete the ToDeleteProject with sources
4. Try to create a new MIDP application called "ThisNeverCreatesProject"
-> IDE hangs, then, after like a minute, NPE is thrown
Comment 13 Samaresh Panda 2008-07-14 23:27:07 UTC
I'm not sure why this should be a P2 if I cannot create a project.
Comment 14 Lukas Hasik 2008-07-15 08:07:32 UTC
I tried the steps from joshis however I cannot reproduce. I can delete and create Mobility project without any problems.
Decreasing priority again. We need 100% scenario to get it fixed.
Comment 15 Ivan Sidorkin 2008-07-20 13:51:30 UTC
Build: NetBeans IDE Dev (Build 200807181543)
VM: Java HotSpot(TM) Client VM, 11.0-b13, Java(TM) SE Runtime Environment, 1.6.0_10-rc-b26
OS: Windows XP, 5.1, x86

User Comments: 
create new Mobility application
Comment 16 Ivan Sidorkin 2008-07-20 13:51:34 UTC
Created attachment 65062 [details]
stacktrace
Comment 17 Karol Harezlak 2008-07-21 17:28:56 UTC
*** Issue 140410 has been marked as a duplicate of this issue. ***
Comment 18 Karol Harezlak 2008-07-21 17:40:07 UTC
*** Issue 140410 has been marked as a duplicate of this issue. ***
Comment 19 Jaroslav Tulach 2008-07-22 13:34:02 UTC

*** This issue has been marked as a duplicate of 136931 ***
Comment 20 Lukas Hasik 2008-07-25 13:18:49 UTC
Build: NetBeans IDE Dev (Build 20080725075415)
VM: Java HotSpot(TM) Client VM, 11.0-b11, Java(TM) SE Runtime Environment, 1.6.0_10-beta-b14
OS: Windows XP, 5.1, x86

User Comments: 
create new MIDP application

Stacktrace: 
java.lang.NullPointerException
        at org.netbeans.modules.vmd.io.javame.MEDesignDataLoader.createSecondaryEntry(MEDesignDataLoader.java:103)
        at org.netbeans.modules.vmd.io.javame.MEDesignDataObject.<init>(MEDesignDataObject.java:76)
        at org.netbeans.modules.vmd.io.javame.MEDesignDataLoader.createMultiObject(MEDesignDataLoader.java:95)
        at org.openide.loaders.DataObjectPool.createMultiObject(DataObjectPool.java:194)
        at org.openide.loaders.MultiDataObject.createMultiObject(MultiDataObject.java:933)
        at org.openide.loaders.MultiDataObject.handleCreateFromTemplate(MultiDataObject.java:736)
Comment 21 Lukas Hasik 2008-07-25 13:18:57 UTC
Created attachment 65635 [details]
stacktrace
Comment 22 esmithbss 2008-07-29 07:22:43 UTC
Build: NetBeans IDE Dev (Build 200807281401)
VM: Java HotSpot(TM) Client VM, 11.0-b12, Java(TM) SE Runtime Environment, 1.6.0_10-beta-b25
OS: Linux, 2.6.24-20-generic, i386

User Comments: 
Creating a new Mobility Project.

Set MIDP 2.0 and CLDC 1.1 on second page of wizard, then hit "Finish" button.

Stacktrace: 
java.lang.NullPointerException
        at org.netbeans.modules.vmd.io.javame.MEDesignDataLoader.createSecondaryEntry(MEDesignDataLoader.java:103)
        at org.netbeans.modules.vmd.io.javame.MEDesignDataObject.<init>(MEDesignDataObject.java:76)
        at org.netbeans.modules.vmd.io.javame.MEDesignDataLoader.createMultiObject(MEDesignDataLoader.java:95)
        at org.openide.loaders.DataObjectPool.createMultiObject(DataObjectPool.java:194)
        at org.openide.loaders.MultiDataObject.createMultiObject(MultiDataObject.java:933)
        at org.openide.loaders.MultiDataObject.handleCreateFromTemplate(MultiDataObject.java:736)
Comment 23 esmithbss 2008-07-29 07:22:52 UTC
Created attachment 65898 [details]
stacktrace
Comment 24 Lukas Hasik 2008-08-13 09:40:05 UTC
Build: NetBeans IDE 6.5 Beta (Build 200808111757)
VM: Java HotSpot(TM) Client VM, 11.0-b11, Java(TM) SE Runtime Environment, 1.6.0_10-beta-b14
OS: Windows XP, 5.1, x86

User Comments: 
when creating new Java ME project in Beta candidate build

Stacktrace: 
java.lang.NullPointerException
        at org.netbeans.modules.vmd.io.javame.MEDesignDataLoader.createSecondaryEntry(MEDesignDataLoader.java:103)
        at org.netbeans.modules.vmd.io.javame.MEDesignDataObject.<init>(MEDesignDataObject.java:76)
        at org.netbeans.modules.vmd.io.javame.MEDesignDataLoader.createMultiObject(MEDesignDataLoader.java:95)
        at org.openide.loaders.DataObjectPool.createMultiObject(DataObjectPool.java:194)
        at org.openide.loaders.MultiDataObject.createMultiObject(MultiDataObject.java:933)
        at org.openide.loaders.MultiDataObject.handleCreateFromTemplate(MultiDataObject.java:736)
Comment 25 Lukas Hasik 2008-08-13 09:40:09 UTC
Created attachment 67219 [details]
stacktrace