Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

sony ericsson JP-7 j2me debugging

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.

like image 544
thevikas Avatar asked Dec 19 '10 10:12

thevikas


1 Answers

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.

like image 169
lagerstedt Avatar answered Nov 05 '22 01:11

lagerstedt