Quick Links: Download Gideros Studio | Gideros Documentation | Gideros Development Center | Gideros community chat | DONATE
Android crash, java.lang.IllegalStateException — Gideros Forum

Android crash, java.lang.IllegalStateException

MikeHartMikeHart Guru
edited May 2012 in Bugs and issues
I got an error report on Google for my app:

java.lang.IllegalStateException: play() called on uninitialized AudioTrack.
at android.media.AudioTrack.play(AudioTrack.java:824)
at com.giderosmobile.android.player.AudioDevice.run(AudioDevice.java:82)
at java.lang.Thread.run(Thread.java:1019)

Does anyone know what this could be?

Dislikes: jose_ca88

Tagged:
+1 -1 (+0 / -1 )Share on Facebook

Comments

  • gorkemgorkem Maintainer
    Out of curiosity - where did you get this error report from?
  • From my google developer console. When the device crashed, the user got the opportunity to send this report. and there I can see it. He told me when it happend but I am puzzled about it. All sounds were played before and not released in any way.
  • MikeHartMikeHart Guru
    edited May 2012
    I play one music track continuesly. It loops itself when it is finsihed. And I have several sound effects which could be played in on frame, depending on the game situation.
    Like an explosion sound and at the same time a shot sound is played.
  • AlexRuAlexRu Member
    I got the same error in google developer console (for my Chapaev game):

    java.lang.IllegalStateException: play() called on uninitialized AudioTrack.
    at android.media.AudioTrack.play(AudioTrack.java:824)
    at com.giderosmobile.android.player.AudioDevice.run(AudioDevice.java:82)
    at java.lang.Thread.run(Thread.java:1027)

    I have about 7000 downloads, but 1 crash report.
    I think it happens when I play one sound file several times at same time.

    My Gideros ver is 2012.2.2.2.

    May anybody help??
  • Also, I got this report 6times in 4days.

    java.lang.IllegalStateException: play() called on uninitialized AudioTrack.
    at android.media.AudioTrack.play(AudioTrack.java:824)
    at com.giderosmobile.android.player.AudioDevice.run(AudioDevice.java:82)
    at java.lang.Thread.run(Thread.java:1019)
  • atilimatilim Maintainer
    thanks. I'll definitely will look at it. But most probably this error occurs just at the beginning or at the end of the application, not in the middle. Because OpenAL does all the audio mixing and AudioTrack only plays the rendered audio buffer.
  • atilimatilim Maintainer
    btw, if you see any other crash reports, please post them here.
  • AlexRuAlexRu Member
    Today I got "ANR Broadcast of Intent { act=android.intent.action.SCREEN_OFF flg=0x40000000 }".
    It's also from my developer console. Full information in attached file.
    txt
    txt
    anr.txt
    8K
  • AlexRuAlexRu Member
    edited July 2012
    Today I got 2 else:

    1. java.lang.UnsatisfiedLinkError

    java.lang.ExceptionInInitializerError
    at java.lang.Class.newInstanceImpl(Native Method)
    at java.lang.Class.newInstance(Class.java:1409)
    at android.app.Instrumentation.newActivity(Instrumentation.java:1021)
    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1565)
    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1667)
    at android.app.ActivityThread.access$1500(ActivityThread.java:117)
    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:935)
    at android.os.Handler.dispatchMessage(Handler.java:99)
    at android.os.Looper.loop(Looper.java:130)
    at android.app.ActivityThread.main(ActivityThread.java:3691)
    at java.lang.reflect.Method.invokeNative(Native Method)
    at java.lang.reflect.Method.invoke(Method.java:507)
    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:907)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:665)
    at dalvik.system.NativeStart.main(Native Method)
    Caused by: java.lang.UnsatisfiedLinkError: Couldn't load gideros: findLibrary returned null
    at java.lang.Runtime.loadLibrary(Runtime.java:429)
    at java.lang.System.loadLibrary(System.java:554)
    at com.giderosmobile.android.ChapayActivity.(ChapayActivity.java:26)
    ... 15 more

    ChapayActivity.java:26 is System.loadLibrary("gideros");

    2. java.lang.ClassNotFoundException

    java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.vetrov.chapay/com.giderosmobile.android.ChapayActivity}: java.lang.ClassNotFoundException: com.giderosmobile.android.ChapayActivity in loader dalvik.system.PathClassLoader[/mnt/asec/com.vetrov.chapay-1/pkg.apk]
    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1743)
    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1851)
    at android.app.ActivityThread.access$1500(ActivityThread.java:132)
    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1038)
    at android.os.Handler.dispatchMessage(Handler.java:99)
    at android.os.Looper.loop(Looper.java:150)
    at android.app.ActivityThread.main(ActivityThread.java:4293)
    at java.lang.reflect.Method.invokeNative(Native Method)
    at java.lang.reflect.Method.invoke(Method.java:507)
    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:849)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:607)
    at dalvik.system.NativeStart.main(Native Method)
    Caused by: java.lang.ClassNotFoundException: com.giderosmobile.android.ChapayActivity in loader dalvik.system.PathClassLoader[/mnt/asec/com.vetrov.chapay-1/pkg.apk]
    at dalvik.system.PathClassLoader.findClass(PathClassLoader.java:240)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:551)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
    at android.app.Instrumentation.newActivity(Instrumentation.java:1040)
    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1735)
    ... 11 more
  • AlexRuAlexRu Member
    It's from my developer console...
  • AlexRuAlexRu Member
    Today I got one else:

    Класс исключения java.lang.ClassNotFoundException
    Исходный метод BaseDexClassLoader.findClass()

    v1.01
    16.07.2012, 10:58:28
    Отчетов в неделю: 1
    Отчеты: 1
    java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.vetrov.chapay/com.giderosmobile.android.ChapayActivity}: java.lang.ClassNotFoundException: com.giderosmobile.android.ChapayActivity
    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2121)
    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2240)
    at android.app.ActivityThread.access$600(ActivityThread.java:139)
    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1262)
    at android.os.Handler.dispatchMessage(Handler.java:99)
    at android.os.Looper.loop(Looper.java:156)
    at android.app.ActivityThread.main(ActivityThread.java:4977)
    at java.lang.reflect.Method.invokeNative(Native Method)
    at java.lang.reflect.Method.invoke(Method.java:511)
    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
    at dalvik.system.NativeStart.main(Native Method)
    Caused by: java.lang.ClassNotFoundException: com.giderosmobile.android.ChapayActivity
    at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:61)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:501)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:461)
    at android.app.Instrumentation.newActivity(Instrumentation.java:1039)
    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2112)
    ... 11 more

    User wrote that game not start.
  • fxonefxone Member
    edited July 2012
    @AlexRu Hello Comrade! Firstly congrats for a nice ride on 10000-50000 level of downloads in such short time (ad's campaign?) Secondly as I remember you mentioned something about problem with exporting libraries under Eclipse after Gideros newest update . I think that error: "java.lang.ClassNotFoundException: com.giderosmobile.android.ChapayActivity"
    indicates on AndroidManifest's inconsistency with other stuff. Or did you just copy (ctr+c ctr+v) after update older ChapayActivity.java file to new install folder under Eclipse? Try to make completely new export to Eclipse without pasting old stuff. I'm not such big expert of android but maybe it will help.
  • AlexRuAlexRu Member
    @fxone, hello Comrade)) Thanks for congrats. I didn't make any ad's compaign. Just post here, some reposts by Gideros users and one post in the most popular russian mobile forum. After month that my game in google play I will post my results here:
    http://www.giderosmobile.com/forum/discussion/1199/chapaev-checkers-battle-on-google-play#Item_7 (about 22-23 of July).

    Earlier I copied ChapayActivity.java and manifest from old project after export (for ad support). But once after exoprt I found that my old ChapayActivity.java and new (exported) is not equal)) I tried to compile new exported project (without modifications) and got error, because exported ChapayActivity.java use some new methods of Gideros library, which was not change after export. I changed libs (delete it and export project again). After that I modified ChapayActivity.java and manifest to add ad (not copy-paste). After that my project work good. Now I have about 23000 downloads (total) and 5 different crash types with only 8 reports (2, 1, 1, 2, 2). Many users play with no crash at many different devices. They write it in ratings. But someone get crash.

    It's bad that google developer console do not show information about crashed device and android version. I will ask users in game description to send me this information in reports.


  • AlexRuAlexRu Member
    I got one else "ANR keyDispatchingTimedOut". Information in file.
    txt
    txt
    anr2.txt
    10K
  • I got some errors again.

    Класс исключения java.lang.StackOverflowError
    Исходный метод SurfaceView.updateWindow()

    java.lang.StackOverflowError
    at android.view.SurfaceView.updateWindow(SurfaceView.java:552)
    at android.view.SurfaceView.dispatchDraw(SurfaceView.java:350)
    at android.view.ViewGroup.drawChild(ViewGroup.java:1644)
    at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1373)
    at android.view.ViewGroup.drawChild(ViewGroup.java:1644)
    at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1373)
    at android.view.ViewGroup.drawChild(ViewGroup.java:1644)
    at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1373)
    at android.view.View.draw(View.java:6883)
    at android.widget.FrameLayout.draw(FrameLayout.java:357)
    at com.android.internal.policy.impl.PhoneWindow$DecorView.draw(PhoneWindow.java:1921)
    at android.view.ViewRoot.draw(ViewRoot.java:1528)
    at android.view.ViewRoot.performTraversals(ViewRoot.java:1264)
    at android.view.ViewRoot.handleMessage(ViewRoot.java:1866)
    at android.os.Handler.dispatchMessage(Handler.java:99)
    at android.os.Looper.loop(Looper.java:123)
    at android.app.ActivityThread.main(ActivityThread.java:3687)
    at java.lang.reflect.Method.invokeNative(Native Method)
    at java.lang.reflect.Method.invoke(Method.java:507)
    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:867)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:625)
    at dalvik.system.NativeStart.main(Native Method)

  • Класс исключения android.util.AndroidRuntimeException
    Исходный метод ContextImpl.startActivity()

    android.util.AndroidRuntimeException: Calling startActivity() from outside of an Activity context requires the FLAG_ACTIVITY_NEW_TASK flag. Is this really what you want?
    at android.app.ContextImpl.startActivity(ContextImpl.java:870)
    at android.content.ContextWrapper.startActivity(ContextWrapper.java:276)
    at android.webkit.CallbackProxy.uiOverrideUrlLoading(CallbackProxy.java:242)
    at android.webkit.CallbackProxy.handleMessage(CallbackProxy.java:330)
    at android.os.Handler.dispatchMessage(Handler.java:99)
    at android.os.Looper.loop(Looper.java:137)
    at android.app.ActivityThread.main(ActivityThread.java:4424)
    at java.lang.reflect.Method.invokeNative(Native Method)
    at java.lang.reflect.Method.invoke(Method.java:511)
    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:817)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:584)
    at dalvik.system.NativeStart.main(Native Method)
  • And
    ANR Broadcast of Intent { act=android.intent.action.SCREEN_OFF flg=0x40000010 }
    txt
    txt
    anr3.txt
    7K
  • fxonefxone Member
    edited October 2012
    @AlexRu Please try to implement my solution described on the bottom of my main topic:
    http://www.giderosmobile.com/forum/discussion/1140/street-pool-new-game-made-with-gideros-studio
    I've just noticed the same errors as mine on your app. After when I've implemented newest update for my app,I don't have any new error reports, that's why I assume that it solved my problems and I hope will do the same for yours...

    cheers
  • @fxone, thanks, I will try it in new release.
Sign In or Register to comment.