Summary
Description:
Calling JSONObject.optDouble(String key, double defaultValue) causes a silent thread abort/native crash (EXC_BAD_ACCESS / SIGSEGV) on iOS when compiled with ParparVM, whereas it works as expected on the Simulator and Android.
Minimal reproducer
Description:
Calling JSONObject.optDouble(String key, double defaultValue) causes a silent thread abort/native crash (EXC_BAD_ACCESS / SIGSEGV) on iOS when compiled with ParparVM, whereas it works as expected on the Simulator and Android.
Steps to Reproduce:
Parse a JSON string into a JSONObject on iOS.
Call optDouble on a nested or root JSONObject passing a primitive or fallback double value, for example:
Java
JSONObject loc = geom.optJSONObject("location");
if (loc != null) {
// Code halts abruptly at this line on iOS
double lat = loc.optDouble("lat", -999.0);
}
Observe that execution stops immediately on that line without throwing a Java Throwable or reaching subsequent logging statements.
Steps to reproduce
Description:
Calling JSONObject.optDouble(String key, double defaultValue) causes a silent thread abort/native crash (EXC_BAD_ACCESS / SIGSEGV) on iOS when compiled with ParparVM, whereas it works as expected on the Simulator and Android.
Steps to Reproduce:
Parse a JSON string into a JSONObject on iOS.
Call optDouble on a nested or root JSONObject passing a primitive or fallback double value, for example:
Java
JSONObject loc = geom.optJSONObject("location");
if (loc != null) {
// Code halts abruptly at this line on iOS
double lat = loc.optDouble("lat", -999.0);
}
Observe that execution stops immediately on that line without throwing a Java Throwable or reaching subsequent logging statements.
Expected and observed behavior
Expected Behavior:
optDouble should return either the double value associated with the key or the fallback defaultValue provided, without crashing the execution thread on iOS.
Actual Behavior:
On iOS native builds, the call fails silently at the C/Objective-C transpilation level during unboxing/casting of the return value. Java try-catch (Throwable) blocks fail to catch the error because it triggers a native signal/memory access issue rather than a handled Java exception.
Codename One version
7.0.264
JDK version
17
Target environment
Framework: Codename One
OS: iOS 26 (Target Device)
Component: JSONObject / ParparVM (Bytecode-to-C Transpiler)
Last known working version
work perfect in ant structure
Logs and diagnostics
Screenshots or recordings
No response
Report checks
Summary
Description:
Calling JSONObject.optDouble(String key, double defaultValue) causes a silent thread abort/native crash (EXC_BAD_ACCESS / SIGSEGV) on iOS when compiled with ParparVM, whereas it works as expected on the Simulator and Android.
Minimal reproducer
Description:
Calling JSONObject.optDouble(String key, double defaultValue) causes a silent thread abort/native crash (EXC_BAD_ACCESS / SIGSEGV) on iOS when compiled with ParparVM, whereas it works as expected on the Simulator and Android.
Steps to Reproduce:
Parse a JSON string into a JSONObject on iOS.
Call optDouble on a nested or root JSONObject passing a primitive or fallback double value, for example:
Java
JSONObject loc = geom.optJSONObject("location");
if (loc != null) {
// Code halts abruptly at this line on iOS
double lat = loc.optDouble("lat", -999.0);
}
Observe that execution stops immediately on that line without throwing a Java Throwable or reaching subsequent logging statements.
Steps to reproduce
Description:
Calling JSONObject.optDouble(String key, double defaultValue) causes a silent thread abort/native crash (EXC_BAD_ACCESS / SIGSEGV) on iOS when compiled with ParparVM, whereas it works as expected on the Simulator and Android.
Steps to Reproduce:
Parse a JSON string into a JSONObject on iOS.
Call optDouble on a nested or root JSONObject passing a primitive or fallback double value, for example:
Java
JSONObject loc = geom.optJSONObject("location");
if (loc != null) {
// Code halts abruptly at this line on iOS
double lat = loc.optDouble("lat", -999.0);
}
Observe that execution stops immediately on that line without throwing a Java Throwable or reaching subsequent logging statements.
Expected and observed behavior
Expected Behavior:
optDouble should return either the double value associated with the key or the fallback defaultValue provided, without crashing the execution thread on iOS.
Actual Behavior:
On iOS native builds, the call fails silently at the C/Objective-C transpilation level during unboxing/casting of the return value. Java try-catch (Throwable) blocks fail to catch the error because it triggers a native signal/memory access issue rather than a handled Java exception.
Codename One version
7.0.264
JDK version
17
Target environment
Framework: Codename One
OS: iOS 26 (Target Device)
Component: JSONObject / ParparVM (Bytecode-to-C Transpiler)
Last known working version
work perfect in ant structure
Logs and diagnostics
Screenshots or recordings
No response
Report checks