Author Topic: Nullpointer exceptions  (Read 1760 times)

Offline MrPlow

  • Prof. Inline
  • *****
  • Posts: 1558
    • View Profile
Nullpointer exceptions
« on: 2014-Oct-28 »
I am getting a lot of additional nullpointer crashes with my newer compiles.

java.lang.NullPointerException

Does anyone know what I should look for or avoid in my projects to reduce these?

Could it be the java sdk version or GLB 12.308 bug?
Comp:
Speccy-48k, Speccy-128k, Amigas, PCs

Offline spacefractal

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 3690
    • View Profile
    • Space Fractal
Re: Nullpointer exceptions
« Reply #1 on: 2014-Oct-28 »
I'm need the full log from logcat, due its seems Java based issue.
Greedy Mouse - Karma Miwa - Spot Race - CatchOut - Android Extras - is on a vacation trip, home before end of few days in jan.

Offline bigsofty

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 2640
    • View Profile
Re: Nullpointer exceptions
« Reply #2 on: 2014-Oct-28 »
Have you tested on other platforms, to make sure that this an Android specific issue?
Cheers,

Ian.

“It is practically impossible to teach good programming style to students that have had prior exposure to BASIC.  As potential programmers, they are mentally mutilated beyond hope of regeneration.”
(E. W. Dijkstra)

Offline spacefractal

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 3690
    • View Profile
    • Space Fractal
Re: Nullpointer exceptions
« Reply #3 on: 2014-Oct-29 »
It's java, only android here uses it, but can do nothing without full logcat so I'm can we where it's crashed.
Greedy Mouse - Karma Miwa - Spot Race - CatchOut - Android Extras - is on a vacation trip, home before end of few days in jan.

Offline bigsofty

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 2640
    • View Profile
Re: Nullpointer exceptions
« Reply #4 on: 2014-Oct-29 »
Yes I realise that the initial post refers to a Java compile, as it produces a Java error but this is what Android would report if you tried to use an unintialised sprite(say you misspelled the sprites image file name) for example. Running the same code on a desktop could produce a more meaningful error in debug but only if it's not a platform specific error of course.

No harm in posting the logcat of course though. ;)

Stubs are my last resort to finding a sneaky error usually.
« Last Edit: 2014-Oct-29 by bigsofty »
Cheers,

Ian.

“It is practically impossible to teach good programming style to students that have had prior exposure to BASIC.  As potential programmers, they are mentally mutilated beyond hope of regeneration.”
(E. W. Dijkstra)

Offline spacefractal

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 3690
    • View Profile
    • Space Fractal
Re: Nullpointer exceptions
« Reply #5 on: 2014-Oct-29 »
sprites handing is c++ thing, so pretty sure its can been a bug in Android Extras somewhere (there was recently those kind of error im fixed in StoreKit). C++ relative errors is for me impossible to fix and here you will get a signal error instead, while Java errors, you often get a error which line the nullpointer have been, and hence its will been easier to fix when im known while line and function its was.
Greedy Mouse - Karma Miwa - Spot Race - CatchOut - Android Extras - is on a vacation trip, home before end of few days in jan.