sony ericsson JP-7 j2me debugging
Asked Answered
B

2

13

I'm trying to debug a J2ME application on my Sony Ericsson K790i which is a JP-7 phone on a Windows XP with latest Netbeans, J2ME SDK, Sony SDK, etc.

I can USB connect and use the SE Device Explorer. When I start my app from device explorer, it just gives a exception name (ArrayOutOfBoundsException) and a call stack with a list of "unknown". Is there a way to translate the call stack into procedure and line #? Is there a way to create a debug binary or any way to get a little more hints? My app is starting fine on the emulator. It even installs fine on phone but when I run it, it crashed with no info at all.

I have tried even to use On Device Debug which my phone supports but I get a OAFcode=45 EXEcode=28 and debug session never starts. Though it does create a tempNNNN app in my phone.

Any ideas that could help are welcome.

Bungalow answered 19/12, 2010 at 10:23 Comment(0)
A
1

When you get an exception with unknowns in the callstack the exception is coming from the Java runtime environment. Due to the limited flash space on SE OSE phones most debug info is stripped. It is possible to get the addresses of the callstack (it is transmitted over the wire but mapped to 'unknown' by DeviceExplorer) but it would not do you much good since you dont have a address map to translate the addresses.

IIRC there is a text document describing the different error codes included in the sdk. Look for oafcodes.txt or something like that.

Also, if you're using Netbeans: When you create new projects in Netbeans I believe it defaults to MIDP 2.1. K790 is a old phone and it only supports 2.0. Pre MIDP 2.1 SE phones will just barf if you try to install 2.1 applications on it.

Ammamaria answered 5/1, 2012 at 13:3 Comment(0)
D
0

If you are able to see the exception then you will see all the stack trace if you print it and you will identify why and where is the problem. May be, when you've been deployed/builded your application to your phone you have the compiler properties used by the debugger disabled (ex: add line number attributes, etc)?

I don't know what does it means the list of "unknown" exceptions.

Normally you can see in the full stack, the exception raised, class method and line that causes the issue.

By the way, did you try to use KDWP? It seems a great solution. In this tread the people talks about debugging on a device.

Despoliation answered 15/9, 2011 at 0:7 Comment(1)
J2ME does not have the capability to debug on device. You should use logging tools and check that your application doesn't use any optional libraries that aren't supported by the device.Bile

© 2022 - 2024 — McMap. All rights reserved.