Discussion Board

Results 1 to 5 of 5
  1. #1
    Registered User
    Join Date
    Feb 2011

    Unhappy On Device Debug issues (breakpoints) with SDK 2.0 and Asha 306

    After giving up trying to get debugging working with the emulator, I decided to use a real device - I'd previously had success using Netbeans + SDK 1.0 and a C1, so thought it would work right away, but I seem to have a number of issues, especially with breakpoints.

    So the setup is on the PC we have XP (I know) and the latest versions available of SDK 2.0 and the On Device Debugger, and the Phone is a recent Asha 306, with the ODD app installed, connected to the PC via Bluetooth.

    If I set a breakpoint on the main thread, say in the application startup, then these will usually fire and I'll be able to single step, etc. However, if I try to break in another thread, say on a timer callback or from some network activity, then the application always freezes and the IDE says 'Problem occured' and the details are;

    An internal error occurred during: "Launching MyApp.jad".
    Got error code in reply:41

    Now, ISTR that there was an issue with breaking on threads other than Main from when I was developing on the C1 with Netbeans, but I can't remember the specifics. However, given that a search of the net, or these forums, doesn't seem to show anyone else having this issue, I wonder if it's just my setup?

    Does anyone have any ideas, or seen similar behaviour?

    I've tried ODD with the 306 using the Netbeans and SDK 1.0 setup, and that seems to be fine, but there doesn't seem to be any clean way of adding the new platform to the Netbeans IDE - you can point it at the SDK 2.0 install and get it to compile, but then you can't debug on device - Or has someone got some tips on how to set that up correctly?

    Any help appreciated, I'd really like to get a couple of apps build on the Asha devices.

  2. #2
    Registered User
    Join Date
    Feb 2011

    Re: On Device Debug issues (breakpoints) with SDK 2.0 and Asha 306

    This is from the .log file, which shows the stack trace behind the error reported by the IDE, in case that sheds any further light

    !SESSION 2013-04-16 13:37:38.542 -----------------------------------------------
    java.vendor=Sun Microsystems Inc.
    BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_GB
    Command-line arguments: -os win32 -ws win32 -arch x86

    !ENTRY org.eclipse.core.jobs 4 2 2013-04-16 19:51:04.557
    !MESSAGE An internal error occurred during: "Launching MyApp.jad".
    !STACK 0
    com.sun.jdi.InternalException: Got error code in reply:41
    at org.eclipse.jdi.internal.MirrorImpl.defaultReplyErrorHandler(MirrorImpl.java:277)
    at org.eclipse.jdi.internal.VirtualMachineImpl.allClasses(VirtualMachineImpl.java:356)
    at org.eclipse.jdi.internal.VirtualMachineImpl.allRefTypes(VirtualMachineImpl.java:382)
    at org.eclipse.jdi.internal.ReferenceTypeImpl.nestedTypes(ReferenceTypeImpl.java:1105)
    at org.eclipse.jdt.internal.debug.core.breakpoints.JavaBreakpoint.addToTargetForLocalType(JavaBreakpoint.java:597)
    at org.eclipse.jdt.internal.debug.core.breakpoints.JavaBreakpoint.createRequests(JavaBreakpoint.java:574)
    at org.eclipse.jdt.internal.debug.core.breakpoints.JavaBreakpoint.addToTarget(JavaBreakpoint.java:532)
    at org.eclipse.jdt.internal.debug.core.breakpoints.JavaLineBreakpoint.addToTarget(JavaLineBreakpoint.java:161)
    at org.eclipse.jdt.internal.debug.core.model.JDIDebugTarget.breakpointAdded(JDIDebugTarget.java:1220)
    at org.eclipse.jdt.internal.debug.core.model.JDIDebugTarget.initializeBreakpoints(JDIDebugTarget.java:500)
    at org.eclipse.jdt.internal.debug.core.model.JDIDebugTarget.initialize(JDIDebugTarget.java:431)
    at org.eclipse.jdt.internal.debug.core.model.JDIDebugTarget.<init>(JDIDebugTarget.java:305)
    at org.eclipse.jdt.debug.core.JDIDebugModel$1.run(JDIDebugModel.java:160)
    at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2344)
    at org.eclipse.jdt.debug.core.JDIDebugModel.newDebugTarget(JDIDebugModel.java:164)
    at org.eclipse.jdt.debug.core.JDIDebugModel.newDebugTarget(JDIDebugModel.java:124)
    at org.eclipse.mtj.internal.core.launching.midp.EmulatorRunner.runInDebug(EmulatorRunner.java:367)
    at org.eclipse.mtj.internal.core.launching.midp.EmulatorRunner.run(EmulatorRunner.java:253)
    at org.eclipse.mtj.internal.core.launching.midp.EmulatorLaunchConfigDelegate.launch(EmulatorLaunchConfigDelegate.java:146)
    at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:854)
    at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:703)
    at org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(DebugUIPlugin.java:937)
    at org.eclipse.debug.internal.ui.DebugUIPlugin$8.run(DebugUIPlugin.java:1141)
    at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)

  3. #3
    Registered User
    Join Date
    Mar 2013
    United Kingdom

    Re: On Device Debug issues (breakpoints) with SDK 2.0 and Asha 306

    I don't want to sound ignorant here, but I remember when I was first starting out with J2ME, I remember having the same sort of problems as what you're having now. The first breakpoint in my main method was getting hit, but after that, nothing. After a lot of frustration, I realised that it was down to exceptions in my code, but unfortunately debug mode wasn't handling exceptions to gracefully. This particularly happened when you imported older projects you saw online or when you copied and pasted code from examples. Perhaps you could try knocking up a bare bones application and building up from there?

  4. #4
    Registered User
    Join Date
    Feb 2011

    Re: On Device Debug issues (breakpoints) with SDK 2.0 and Asha 306

    Don't worry about sounding ignorant, it's a good suggestion, and has uncovered some interesting behaviour.

    I created a fresh midlet project, and created a new midlet based on the Splash template. In the generated code Splash.java
    I put two breakpoints in the show() method, one at the start, and another in the finally block;

    public void show(final Display display, final Displayable next,
    			final long millis) {
    *		display.setCurrent(this);
    		// Schedule next Displayable
    		Thread t = new Thread(new Runnable() {
    			public void run() {
    				try {
    				} catch (InterruptedException e) {
    				} finally {
    *					display.setCurrent(next);
    On debugging this on the device, both of these breakpoints were hit successfully, So I thought maybe there was something
    in your idea about it being an exception (these are handled badly), so I replaced the thread with code that uses a Timer, as
    I was trying to do;

    	public void show(final Display display, final Displayable next,
    			final long millis) {
    *		display.setCurrent(this);
    		Timer t = new Timer();
    		t.schedule(new TimerTask() {
    			public void run() {
    *				display.setCurrent(next);				
    		}, millis);
    This time the first breakpoint isn't hit at all (!), and I get the same error when the IDE is trying to stop at the second one.
    I tried a number of cleans, restarts, etc. and did manage to get the first breakpoint to trigger, but only if the second one
    wasn't set. So then I reverted back to the first implementation of show(), but this now behaved in the same way, ie the
    first breakpoint doesn't fire, and the second one brings up the error. And it can't be an unhandled exception in the code, as
    the midlet runs fine if I don't have any breakpoints set at all.

    But you're right about one thing - it is very frustrating!

  5. #5
    Registered User
    Join Date
    Nov 2013

    Re: On Device Debug issues (breakpoints) with SDK 2.0 and Asha 306

    When debugging the java code in a particular line after few minutes An internal error occurred during: "Launching SplashScreenMidlet (1)".
    as coming actually SplashScreenMidlet .java is my main midlet
    And please say guidelines for Debugging the Nokia Asha Application

Similar Threads

  1. Nokia Debug Device not working for Asha 205
    By trivedikamal123 in forum Mobile Java Tools & SDKs
    Replies: 1
    Last Post: 2013-04-16, 15:43
  2. Issues capturing audio on Nokia Asha 311 (Developer Platform 2.0)
    By bayop in forum Mobile Java Media (Graphics & Sounds)
    Replies: 0
    Last Post: 2012-09-10, 20:19
  3. File reading issues in Nokia Asha 303
    By abdul.wahab in forum Mobile Java General
    Replies: 2
    Last Post: 2012-05-24, 11:41
  4. Breakpoints during on-device-debug does not work
    By matohl in forum Carbide.c++ IDE and plug-ins (Closed)
    Replies: 0
    Last Post: 2009-07-10, 10:09

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts