soywiz-archive / korge-samples

Korge Samples
55 stars 23 forks source link

unable to run samples on android phone (StackOverflowError) #34

Closed lokeshsharma97 closed 3 years ago

lokeshsharma97 commented 4 years ago

on android device following exception occur in all samples

Exception in AnnotationFactory.createAnnotation 11-10 11:55:43.473 29587 29603 I System.out: ERROR GameWindow.frameRender: 11-10 11:55:43.473 29587 29603 I System.out: java.lang.StackOverflowError: stack size 1037KB 11-10 11:55:43.474 29587 29603 W System.err: java.lang.StackOverflowError: stack size 1037KB 11-10 11:55:43.477 29587 29603 W System.err: at java.lang.String.valueOf(String.java:2827) 11-10 11:55:43.477 29587 29603 W System.err: at java.lang.StringBuilder.append(StringBuilder.java:132) 11-10 11:55:43.477 29587 29603 W System.err: at kotlinx.coroutines.DisposeOnCancel.toString(CancellableContinuation.kt:385) 11-10 11:55:43.477 29587 29603 W System.err: at java.lang.String.valueOf(String.java:2827) 11-10 11:55:43.477 29587 29603 W System.err: at java.lang.StringBuilder.append(StringBuilder.java:132) 11-10 11:55:43.477 29587 29603 W System.err: at kotlinx.coroutines.CompletedContinuation.toString(Unknown Source:22) 11-10 11:55:43.477 29587 29603 W System.err: at java.lang.String.valueOf(String.java:2827) 11-10 11:55:43.477 29587 29603 W System.err: at java.lang.StringBuilder.append(StringBuilder.java:132) 11-10 11:55:43.477 29587 29603 W System.err: at kotlinx.coroutines.CancellableContinuationImpl.toString(CancellableContinuationImpl.kt:506) 11-10 11:55:43.478 29587 29603 W System.err: at java.lang.String.valueOf(String.java:2827) 11-10 11:55:43.478 29587 29603 W System.err: at java.lang.StringBuilder.append(StringBuilder.java:132) . . .

soywiz commented 4 years ago

Can you provide device and operating system version where you tested and which sample?

Does it also happens with the hello world here? https://github.com/korlibs/korge-hello-world

lokeshsharma97 commented 4 years ago

android 8.0 xiaomi redmi 6 pro . i test text2 , filters , bmpfont . I am unable to make a build for hello-world it says : More than one file was found with OS independent path 'META-INF/AL2.0' This error was not there for korge 1.4 hello world sample same case for samples in new 2.0 it is causing exception . older release was working fine

soywiz commented 3 years ago

Can't reproduce on my devices. I think I will need your help for debugging. Can you open the project with android studio at build/platforms/android, then launch on debug mode and put a breakpoint or something to figure out what's going on?

soywiz commented 3 years ago

Might be related to this: https://github.com/Kotlin/kotlinx.coroutines/issues/2371 ?

If so, seems to be fixed on kotlinx.coroutines 1.4.2: https://github.com/Kotlin/kotlinx.coroutines/releases/tag/1.4.2

soywiz commented 3 years ago

I have updated kotlinx.coroutines here: https://github.com/korlibs/korio/commit/ea726e49c7f8dc150cf251550690b0b934fb1758 and will be available on the final release of KorGE 2.0. I will let you know when ready so you can try to see if it is fixed

soywiz commented 3 years ago

I'm going to asume this was fixed already 👍