1

I have created a Java ME application which works perfectly in the emulator. But when I run the application on Nokia 5233 or other devices it crashes without prompting any alert.

I tried to catch all exception to find out when my application getting crashed. But it is also worthless as I'm not getting alert message while crashing. Can any one suggest me what would be the problem? After application crash I restart my application and it crashes at same point for number of times. If I continue trying some time it works perfectly. Don't know what's the problem. It works fine in emulator.

Kai
  • 38,985
  • 14
  • 88
  • 103
Nirav Bhandari
  • 4,550
  • 6
  • 32
  • 59

1 Answers1

2

So if you are not able to get any stacktrace you should comment out all the lines from your startApp() method. Then uncomment successively one line after another and run it every time on the device. That way you will find the line on which your application crashes. Especially the usage of services like e.g. the DataStorage should be reviewed.

Another way could be to add verbose logging to your code to see what's the last line which gets executed.

Also have a look at this question: How to get the stacktrace in a mobile device

Community
  • 1
  • 1
Kai
  • 38,985
  • 14
  • 88
  • 103
  • thanks man for reply.. my problem is that after installing application it works fine for 4-5 times.then it start crashing..after sometime it start working fine,then suddenly start crashing...what should be the problem...? – Nirav Bhandari Jan 03 '12 at 13:38
  • okie.thanks for replying...if possible,can u review my code?Actually I m android developrt,first tym creating app in J2Me so facing problem. pls give me your email id if possible,so that i can mail you my code. – Nirav Bhandari Jan 03 '12 at 13:43
  • i m using php webservice to get and send data. – Nirav Bhandari Jan 03 '12 at 13:54