MAVSDK-Java icon indicating copy to clipboard operation
MAVSDK-Java copied to clipboard

Android app crashes with std::bad_cast on mavsdkServer.run("udp://:14550")

Open josephm28 opened this issue 8 months ago • 9 comments

Hi!

I'm using mavsdk:2.0.1 and mavsdk-server:2.0.0 in my Android app. I finally have everything compiling, but when I call mavsdkServer.run("udp://:14550"), I get an app crash with

libc++abi  E  terminating with uncaught exception of type std::bad_cast: std::bad_cast
libc  A  Fatal signal 6 (SIGABRT), code -1 (SI_QUEUE) in tid 16094 (mavsdk-event-qu), pid 15871

I've also been intermittently dealing with

java_vm_ext.cc:591] JNI DETECTED ERROR IN APPLICATION: field operation on NULL object: 0x0
java_vm_ext.cc:591]     in call to GetObjectField
java_vm_ext.cc:591]     from java.lang.String java.lang.Runtime.nativeLoad(java.lang.String, java.lang.ClassLoader, java.lang.Class)

but right now the first error is where I'm stuck.

I did see https://github.com/mavlink/MAVSDK-Java/issues/70 which looks like a similar error at the end of the thread, but no resolution there.

Do you have any suggestions?

josephm28 avatar Jun 26 '24 21:06 josephm28