1

I get the below crash when running my app on iPhone Xr, but in your github repo (which I assume you use on the build server), there is no executable code in the line where the crash occurs ([line 3835][1] is the second-last closing brace at the end of pointerReleased(int x, int y)).

[EDT] 0:13:49,420 - Exception: java.lang.NullPointerException - null
java.lang.NullPointerException
   at com_codename1_ui_Form.pointerReleased:3835
   at com_myapp_myapp_MyForm.pointerReleased:5246
   at com_codename1_ui_Component.pointerReleased:4729
   at com_myapp_myapp_MyForm.pointerReleased:5234
   at com_codename1_ui_Display.handleEvent:2327
   at com_codename1_ui_Display.edtLoopImpl:1219
   at com_codename1_ui_Display.mainEDTLoop:1137
   at com_codename1_ui_RunnableWrapper.run:120
   at com_codename1_impl_CodenameOneThread.run:176
   at java_lang_Thread.runImpl:153

I've of course checked if the code in my overridden versions of the pointerReleased calls could somehow cause this but there is really nothing as far as I can see.

The build was made late yesterday evening (May 29th 2020).

Any ideas about what is going on here? Or how can I find the source used for the build?

6
  • Does your app have a class called MyForm with more than 5246 lines that overrides pointerReleased? When you start using the Log class it prints the git version that was used to make the build at the top of the log.
    – Shai Almog
    May 30, 2020 at 4:53
  • Yes, and the size of MyForm sounds about right. The exact line is this github.com/codenameone/CodenameOne/blob/…. However, I don't see how that code can cause a null pointer exception, normally current instanceof Container should not be true for a null pointer. Is the code somehow modified on iOS? May 30, 2020 at 7:25
  • I noticed it is already reported as a bug here if anyone else comes across it: github.com/codenameone/CodenameOne/issues/3113 May 30, 2020 at 20:43
  • If this is indeed a line that fails then it's more likely that it's either an exception in native code or that the line numbers were corrupted somehow. Do you have any details about what you might be touching to trigger this?
    – Shai Almog
    May 31, 2020 at 1:44
  • No, unfortunately no idea at all. I've checked my code overriding the pointerReleased but don't see anything that could cause this or interact with the CN1 code. But since there is nothing in the CN1 code in or around the indicated line that could cause a nullpointer, it looks more like a corruption of the line numbers during the build (or native code, but I don't know how that works). May 31, 2020 at 9:15

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.