Nullpointer exceptions

Previous topic - Next topic

MrPlow

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

spacefractal

I'm need the full log from logcat, due its seems Java based issue.
Genius.Greedy Mouse - Karma Miwa - Spot Race - CatchOut - PowerUp Elevation - The beagle Jam - Cave Heroes 2023 - https://spacefractal.itch.io/

bigsofty

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)

spacefractal

It's java, only android here uses it, but can do nothing without full logcat so I'm can we where it's crashed.
Genius.Greedy Mouse - Karma Miwa - Spot Race - CatchOut - PowerUp Elevation - The beagle Jam - Cave Heroes 2023 - https://spacefractal.itch.io/

bigsofty

#4
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.
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)

spacefractal

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.
Genius.Greedy Mouse - Karma Miwa - Spot Race - CatchOut - PowerUp Elevation - The beagle Jam - Cave Heroes 2023 - https://spacefractal.itch.io/