• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

newbe question: stack trace in j2me

 
Ranch Hand
Posts: 311
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I'm new to j2me, and noticed a strange behaviour with excpetion stack traces (printed into the console, in emulation mode): Line numbers are incorrect, and are marked with "+" signs.
Why is that so ?

I'm not sure whether it matters, but I use Sun's J2me Wireless Kit (2.2),
the "eclipseme" plugin, and run in simple emulation mode (not OTA).

Simple example: following is a midlet with an intentional "division by zero" exception on the startApp() method:


Then the following stack trace is shown... note the "+38" (while my exception is actually around line 13):


Thanks
 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Stack traces show bytecode offsets NOT line numbers :-)

Your +38 means 38 bytes into the bytecode for that method (think its bytes).

Cheers

Kirk Bateman
Synaptic Technologies Limited
 
Kirk Bateman
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Actually, that might not have been correct ... I'll just shut up now :-)

I was under the impression that + was bytecode offset, and : was line numbers.

So, infact I might be completely wrong... I know there are issues with obfuscated code and stack traces, which have line numbers which won't match your original code, but then you can get tools that work with most to decrypt them..

Cheers Kirk
 
Sol Mayer-Orn
Ranch Hand
Posts: 311
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thanks! i'll try checking if the plugin uses obfuscation.
 
reply
    Bookmark Topic Watch Topic
  • New Topic