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.
Windows 7 x64 ME SDK 8 build b49 NetBeans 2014-02-14 If I run application from emulator with checked Use a remote debugger sometimes I may get the following exception after attaching debugger in NetBeans: java.lang.NullPointerException at org.netbeans.modules.debugger.ui.views.debugging.ThreadsListener.getCurrentThreadsHistory(ThreadsListener.java:162) at org.netbeans.modules.debugger.ui.views.debugging.ThreadsHistoryAction.getThreads(ThreadsHistoryAction.java:189) at org.netbeans.modules.debugger.ui.actions.SetCurrentThreadFromHistoryAction$2.hierarchyChanged(SetCurrentThreadFromHistoryAction.java:104) at java.awt.Component.processHierarchyEvent(Unknown Source) at java.awt.Component.processEvent(Unknown Source) at java.awt.Container.processEvent(Unknown Source) at java.awt.Component.dispatchEventImpl(Unknown Source) at java.awt.Container.dispatchEventImpl(Unknown Source) at java.awt.Component.dispatchEvent(Unknown Source) at java.awt.Component.addNotify(Unknown Source) at java.awt.Container.addNotify(Unknown Source) at javax.swing.JComponent.addNotify(Unknown Source) at java.awt.Container.addNotify(Unknown Source) at javax.swing.JComponent.addNotify(Unknown Source) at java.awt.Container.addNotify(Unknown Source) at javax.swing.JComponent.addNotify(Unknown Source) at java.awt.Container.addImpl(Unknown Source) at javax.swing.JLayeredPane.addImpl(Unknown Source) at java.awt.Container.add(Unknown Source) at javax.swing.PopupFactory$LightWeightPopup.show(Unknown Source) at javax.swing.JPopupMenu.getPopup(Unknown Source) at javax.swing.JPopupMenu.setVisible(Unknown Source) at javax.swing.JPopupMenu.show(Unknown Source) at javax.swing.JMenu.setPopupMenuVisible(Unknown Source) at org.openide.awt.MenuBar$LazyMenu.setPopupMenuVisible(MenuBar.java:684) at javax.swing.JPopupMenu.menuSelectionChanged(Unknown Source) at javax.swing.MenuSelectionManager.setSelectedPath(Unknown Source) at javax.swing.plaf.basic.BasicMenuUI.appendPath(Unknown Source) at javax.swing.plaf.basic.BasicMenuUI.access$200(Unknown Source) at javax.swing.plaf.basic.BasicMenuUI$Handler.mousePressed(Unknown Source) at javax.swing.plaf.basic.BasicMenuUI$MouseInputHandler.mousePressed(Unknown Source) at java.awt.Component.processMouseEvent(Unknown Source) at javax.swing.JComponent.processMouseEvent(Unknown Source) at java.awt.Component.processEvent(Unknown Source) at java.awt.Container.processEvent(Unknown Source) at java.awt.Component.dispatchEventImpl(Unknown Source) at java.awt.Container.dispatchEventImpl(Unknown Source) at java.awt.Component.dispatchEvent(Unknown Source) at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source) at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source) at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source) at java.awt.Container.dispatchEventImpl(Unknown Source) at java.awt.Window.dispatchEventImpl(Unknown Source) at java.awt.Component.dispatchEvent(Unknown Source) at java.awt.EventQueue.dispatchEventImpl(Unknown Source) at java.awt.EventQueue.access$200(Unknown Source) at java.awt.EventQueue$3.run(Unknown Source) at java.awt.EventQueue$3.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source) at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source) at java.awt.EventQueue$4.run(Unknown Source) at java.awt.EventQueue$4.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source) at java.awt.EventQueue.dispatchEvent(Unknown Source) [catch] at agent.AgentEventQueue.dispatchEvent(AgentEventQueue.java:231) at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.run(Unknown Source)
I couldn't reproduce the issue on: Product Version: NetBeans IDE Dev (Build 20140221-ba00cdff3ec7) Java: 1.7.0_51; Java HotSpot(TM) 64-Bit Server VM 24.51-b03 Runtime: Java(TM) SE Runtime Environment 1.7.0_51-b13 (1.8.8 b 129 tried as well) Java ME SDK b49 I was able to debug the project in both ways: "Debug" action for ME project and attaching the debugger to running emulator in debug mode. Please download latest NetBeans dev build, clean your NB user directory and delete C:\Users\<YOUR USERNAME>\javame-sdk\8.0 folder (it will be recreated when emulator will start). Thanks.
Try running application several times. First time it is working OK. But if you run it second or third time (not closing emulator), NetBeans throws an exception.
Sorry, my environment: Product Version: NetBeans IDE Dev (Build 201402210001) Java(TM) SE Runtime Environment (build 1.7.0_45-b18) Java HotSpot(TM) 64-Bit Server VM (build 24.45-b08, mixed mode) Java ME SDK b49
This is an IMlet I run: package remote; import javax.microedition.midlet.*; public class IMlet extends MIDlet { public IMlet() { } public void startApp() { int max = Math.max(5, 6); System.out.println("max: " + max); for (int i = 0; i < 600; i++) { //5 mins sleep(500); System.out.println("i: " + i); } exit(); } public void pauseApp() { } public void destroyApp(boolean unconditional) { notifyDestroyed(); } private void exit() { destroyApp(true); } private void sleep(long delay) { try { Thread.sleep(delay); } catch (InterruptedException ex) { System.err.println(ex); } } }
(In reply to dyury from comment #2) > Try running application several times. > First time it is working OK. > But if you run it second or third time (not closing emulator), NetBeans > throws an exception. I tried 5 times in row and it worked. No exception. It could be also ME SDK issue, if it started to happen in the latest build. If there would be bug in NB debugger, then it would probably in other projects/use cases as well. Moreover if you attach debugger to emulator manually it is not handled by NetBeans Java ME plugins.
Exception is happened inside of generic NB debugger UI, there is no any connection between this exception and MESDK code. It seems a synchronization issue in NB code.
It looks like a null thread can get into the currentThreadsHistory list.
Fixed by changeset: 272605:ee967e7e8154 http://hg.netbeans.org/core-main/rev/ee967e7e8154
Considering the triviality of the fix and annoyance of the bug, it's backported into release80 branch: changeset: 281373:421432ea46ea http://hg.netbeans.org/releases/rev/421432ea46ea
Integrated into 'releases/release80', will be available in build *201402242200* or newer. Wait for official and publicly available build. Changeset: http://hg.netbeans.org/releases/rev/421432ea46ea User: mentlicher@netbeans.org Log: #242194: Check the current thread for null. (transplanted from ee967e7e81545e885c953428c88badb787471699)
Integrated into 'main-silver', will be available in build *201402260001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-silver/rev/ee967e7e8154 User: mentlicher@netbeans.org Log: #242194: Check the current thread for null.
Verified in NetBeans 201402260001