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 61775 - J2ME Debugger sometimes doesn't work
Summary: J2ME Debugger sometimes doesn't work
Status: CLOSED INVALID
Alias: None
Product: javame
Classification: Unclassified
Component: -- Other -- (show other bugs)
Version: 4.x
Hardware: All All
: P2 blocker (vote)
Assignee: _ kherink
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-08-03 15:41 UTC by Martin Ryzl
Modified: 2006-10-23 16:41 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Ryzl 2005-08-03 15:41:47 UTC
At 15:44 2/8/2005, Rich Knox wrote:
>>>
>>>>     I'm having problems debugging a J2ME midlet. I'm using NetBeans
>>>>     4.1 and J2ME wireless toolkit 2.2. When I click "Debug Main
>>>>     Project", it sometimes works, but more often it starts up the
>>>>     emulator, attaches the debugger, and then immediately the
>>>>     emulator closes, and the Debugger Console says "user program
>>>>     finished". Are there any known issues that might cause this? It
>>>>     doesn't appear that any of my code gets executed. Thanks.
Comment 1 flintza 2005-08-03 15:50:56 UTC
I have found the same behavior regardless of emulator choice. We usually work
with the SoonyEriccson K700 emulator, but have tried with emulators from Nokia,
Motorola and Samsung as well.
The emulator itself starts, and provides the MIDlet selection list (to choose
one of the MIDlets in the suite to run), but selecting one of the MIDlets just
causes the following output:
Connection received.
Attached JPDA debugger to localhost:1405
Uncaught exception java/lang/Error: Static initializer:
java/lang/NullPointerException.
Uncaught exception java/lang/NoClassDefFoundError

After closing the emulator and trying to run the MIDlet again (selecting it from
the suite list) debugging usually proceeds as expected.
Comment 2 Martin Ryzl 2005-08-03 15:55:54 UTC
We need NB version and build number for development builds, JDK version, and
based on recent information from nbusers (hyperthreading off seems to help) even
OS version, CPU version and speed. Basically anything that woule help us to
reproduce the problem. Thanks.
Comment 3 dreamflying 2005-08-03 17:42:49 UTC
I experienced this problem in the following configuration:
NetBeans: 4.1 (Build 200505031930)
Java: 1.4.2_07
J2ME Wireless Tookit: 2.2 (Oct. 25, 2004 10:21 PM)
OS: Windows XP - SP 2
Computer: HP Compaq dc7100 CMT(PC938A)
CPU: Pentium 4 3.2 GHz
RAM: 1.5 GB

With hyperthreading enabled, the emulator will usually shut down immediately
after the debugger is connected. With hyperthreading off, it works almost always.
Comment 4 _ kherink 2005-08-04 07:26:42 UTC
can you post an example of code along with the location of breakpoint
breakpoints that you set?
also do you observe this problem only after the NetBeans starts - i.e. once the
debugging works it continues working until the next time you start the ide?
Comment 5 dreamflying 2005-08-04 16:58:42 UTC
I can get a repro on my machine just by creating a new mobile application with
the boiler plate "Hello World" MIDlet. Doesn't matter whether I set break points
or not.

Debugging almost always fails for me if hyperthreading is enabled. It almost
always succeeds if hyperthreading is disabled. Someone on the forum had the
experience of debugging failing on the first try and then subsequently
succeeding. This was not my experience. In my experience, hyperthreading is the
key issue. I'll see if I can repro this on another machine.
Comment 6 _ kherink 2005-08-05 08:56:29 UTC
I am having no luck reproducing this issue, though *clearly* it does exist. If
anyone is willing to take a little time to help me gather some info i can supply
some debugger analysis tools (for the purpose of getting to the bottom of this
issue only). if so please let me know and i will contact you via email.
Comment 7 dreamflying 2005-08-05 17:16:58 UTC
I can do some further investigation so long as it isn't too time consuming.
Contact: rknox at uievolution dot com.
Comment 8 _ kherink 2005-08-31 14:55:43 UTC
This issue has been identified as a WTK problem. The WTK team has been notified.
Comment 9 Lukas Hasik 2006-01-17 13:57:15 UTC
verifying all old issues