Crash with message: Cannot detach thread when there are non native frames on the call stack

205 views
Skip to first unread message

Tran Quoc Anh

unread,
Dec 29, 2014, 12:03:35 AM12/29/14
to rob...@googlegroups.com
Hi, today after updated robovm to nightly version, my game crash with message "Crash with message: Cannot detach thread when there are non native frames on the call stack" in console. And this's crash log:
My game use libgdx and robovm.

0

libsystem_kernel.dylib

_jbyteArray* ASN1ToByteArray<ssl_session_st, &(i2d_SSL_SESSION)>(_JNIEnv*, ssl_session_st*) (in MyGame) + 8


1

libsystem_c.dylib

_ISCIIGetUnicodeSet (in MyGame) + 177


2

MyGame

rvmAbort (in MyGame) + 63


3

MyGame

detachThread (in MyGame) + 53


4

MyGame

rvmDetachCurrentThread (in MyGame) + 39


5

MyGame

[j]org.robovm.objc.ObjCObject$AssociatedObjectHelper.release(JJ)V[callback] (in MyGame) + 75


6

MyGame

[J]org.robovm.objc.ObjCRuntime.void_objc_msgSend(JJ)V (in MyGame) + 99


7

MyGame

[j]org.robovm.objc.ObjCRuntime.void_objc_msgSend(JJ)V[clinit] (in MyGame) + 65


8

MyGame

[J]org.robovm.objc.ObjCObject$AssociatedObjectHelper.enableListener(J)V (in MyGame) + 283


9

MyGame

[J]org.robovm.objc.ObjCObject$AssociatedObjectHelper.setAssociatedObject(Lorg/robovm/objc/ObjCObject;Ljava/lang/Object;Ljava/lang/Object;)V (in MyGame) + 269


10

MyGame

[J]org.robovm.objc.ObjCObject$AssociatedObjectHelper.addStrongRef(Lorg/robovm/objc/ObjCObject;Ljava/lang/Object;)V (in MyGame) + 217


11

MyGame

[j]org.robovm.objc.ObjCObject$AssociatedObjectHelper.addStrongRef(Lorg/robovm/objc/ObjCObject;Ljava/lang/Object;)V[clinit] (in MyGame) + 47


12

MyGame

[J]org.robovm.objc.ObjCObject.updateStrongRef(Ljava/lang/Object;Ljava/lang/Object;)V (in MyGame) (/ObjCObject.java:225) + 11228437


13

MyGame

[j]org.robovm.objc.ObjCObject.updateStrongRef(Ljava/lang/Object;Ljava/lang/Object;)V[lookup] (in MyGame) + 55


14

MyGame

[J]com.badlogic.gdx.backends.iosrobovm.objectal.OALAudioTrack.setDelegate(Lcom/badlogic/gdx/backends/iosrobovm/objectal/AVAudioPlayerDelegate;)V (in MyGame) (/OALAudioTrack.java:1048595) + 3896665


15

MyGame

[j]com.badlogic.gdx.backends.iosrobovm.objectal.OALAudioTrack.setDelegate(Lcom/badlogic/gdx/backends/iosrobovm/objectal/AVAudioPlayerDelegate;)V[lookup] (in MyGame) + 9


16

MyGame

[J]com.badlogic.gdx.backends.iosrobovm.IOSMusic.<init>(Lcom/badlogic/gdx/backends/iosrobovm/objectal/OALAudioTrack;)V (in MyGame) (/IOSMusic.java:47) + 3880041


17

MyGame

[J]com.badlogic.gdx.backends.iosrobovm.IOSAudio.newMusic(Lcom/badlogic/gdx/files/FileHandle;)Lcom/badlogic/gdx/audio/Music; (in MyGame) (/IOSAudio.java:64) + 3851445


18

MyGame

[j]com.badlogic.gdx.Audio.newMusic(Lcom/badlogic/gdx/files/FileHandle;)Lcom/badlogic/gdx/audio/Music;[lookup] (in MyGame) + 71


19

MyGame

[J]com.badlogic.gdx.assets.loaders.MusicLoader.loadAsync(Lcom/badlogic/gdx/assets/AssetManager;Ljava/lang/String;Lcom/badlogic/gdx/files/FileHandle;Lcom/badlogic/gdx/assets/loaders/MusicLoader$MusicParameter;)V (in MyGame) (/MusicLoader.java:39) + 3838455


20

MyGame

[j]com.badlogic.gdx.assets.loaders.MusicLoader.loadAsync(Lcom/badlogic/gdx/assets/AssetManager;Ljava/lang/String;Lcom/badlogic/gdx/files/FileHandle;Lcom/badlogic/gdx/assets/loaders/MusicLoader$MusicParameter;)V[lookup] (in MyGame) + 27


21

MyGame

[J]com.badlogic.gdx.assets.loaders.MusicLoader.loadAsync(Lcom/badlogic/gdx/assets/AssetManager;Ljava/lang/String;Lcom/badlogic/gdx/files/FileHandle;Lcom/badlogic/gdx/assets/AssetLoaderParameters;)V (in MyGame) (/MusicLoader.java:29) + 3838585


22

MyGame

[j]com.badlogic.gdx.assets.loaders.AsynchronousAssetLoader.loadAsync(Lcom/badlogic/gdx/assets/AssetManager;Ljava/lang/String;Lcom/badlogic/gdx/files/FileHandle;Lcom/badlogic/gdx/assets/AssetLoaderParameters;)V[lookup] (in MyGame) + 73


23

MyGame

[J]com.badlogic.gdx.assets.AssetLoadingTask.call()Ljava/lang/Void; (in MyGame) (/AssetLoadingTask.java:69) + 3816217


24

MyGame

[j]com.badlogic.gdx.assets.AssetLoadingTask.call()Ljava/lang/Void;[lookup] (in MyGame) + 9


25

MyGame

[J]com.badlogic.gdx.assets.AssetLoadingTask.call()Ljava/lang/Object; (in MyGame) (/AssetLoadingTask.java:34) + 3817503


26

MyGame

[j]com.badlogic.gdx.utils.async.AsyncTask.call()Ljava/lang/Object;[lookup] (in MyGame) + 67


27

MyGame

[J]com.badlogic.gdx.utils.async.AsyncExecutor$2.call()Ljava/lang/Object; (in MyGame) + 23


28

MyGame

[j]java.util.concurrent.Callable.call()Ljava/lang/Object;[lookup] (in MyGame) + 67


29

MyGame

[J]java.util.concurrent.FutureTask.run()V (in MyGame) (/FutureTask.java:237) + 5980213


30

MyGame

[j]java.lang.Runnable.run()V[lookup] (in MyGame) + 67


31

MyGame

[J]java.util.concurrent.ThreadPoolExecutor.runWorker(Ljava/util/concurrent/ThreadPoolExecutor$Worker;)V (in MyGame) (/ThreadPoolExecutor.java:1120) + 6010687


32

MyGame

[J]java.util.concurrent.ThreadPoolExecutor$Worker.run()V (in MyGame) + 25


33

MyGame

[j]java.lang.Runnable.run()V[lookup] (in MyGame) + 67


34

MyGame

[J]java.lang.Thread.run()V (in MyGame) (/Thread.java:839) + 5093691


35

MyGame

_call0 (in MyGame) + 47


36

MyGame

callVoidMethod (in MyGame) + 103


37

MyGame

rvmCallVoidInstanceMethodA (in MyGame) + 227


38

MyGame

startThreadEntryPoint (in MyGame) + 249


39

MyGame

GC_inner_start_routine (in MyGame) + 85


40

MyGame

GC_call_with_stack_base (in MyGame) + 31


41

MyGame

GC_start_routine (in MyGame) + 33


42

libsystem_pthread.dylib

0x00006e93 (in MyGame) + 11923


43

libsystem_pthread.dylib

0x00006e07 (in MyGame) + 11783


44

libsystem_pthread.dylib

0x00004b90 (in MyGame) + 2960

Mirko Nasato

unread,
Jan 2, 2015, 7:12:53 PM1/2/15
to rob...@googlegroups.com
Hi all,

I was just experimenting with threads and RoboVM, and I reproducibly get the same "Cannot detach thread when there are non native frames on the call stack" crash with the following modification of the first example in the documentation

        final Executor executor = Executors.newSingleThreadExecutor();
        button.addOnTouchUpInsideListener((control, event) -> {
            executor.execute(() -> {
                try {
                    Thread.sleep(1000L);
                    DispatchQueue.getMainQueue().async(() -> {
                        button.setTitle("Click #" + (++clickCount), Normal);                                    
                    });
                } catch (InterruptedException e) {
                    Thread.currentThread().interrupt();
                }
            });
        });

Calling sync() instead of async() on the DispatchQueue works fine.

Thanks

Mirko


Niklas Therning

unread,
Jan 4, 2015, 9:30:28 AM1/4/15
to Mirko Nasato, rob...@googlegroups.com
See https://github.com/robovm/robovm/issues/687. We should have a fix
for this in the next nightly and in the next release.
> --
> You received this message because you are subscribed to the Google Groups
> "RoboVM" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to robovm+un...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

Mirko Nasato

unread,
Jan 5, 2015, 5:42:32 PM1/5/15
to rob...@googlegroups.com, mirko....@gmail.com
Great stuff! The latest nightly seems to also have fixed an IllegalMonitorStateException I was getting when trying to use https with a client generated by Apache Thrift.
Reply all
Reply to author
Forward
0 new messages