robovm icon indicating copy to clipboard operation
robovm copied to clipboard

GdxRuntimeException: Error opening music file

Open nnkdev opened this issue 7 years ago • 6 comments

I have problem crash with Fabric reporting after publish App store. Many iPhone/ iPad and many iOS version crash report. I test on Simulator and my iPhone 5s (10.3.1) is not crash. Background music (musicbg.mp3) is woking.

Fatal Exception: com.badlogic.gdx.utils.GdxRuntimeException com.badlogic.gdx.utils.GdxRuntimeException: Error opening music file at /var/containers/Bundle/Application/5AA0B09D-3424-4BB2-B43E-786D9BF723B5/IOSLauncher.app/sounds/musicbg.mp3 at com.badlogic.gdx.backends.iosrobovm.IOSAudio.newMusic(IOSAudio.java:67) at com.mygame.namegame.assets.Assets.load(Assets.java:57) at com.mygame.namegame.MyGDXGame.create(MyGDXGame.java:50) at com.badlogic.gdx.backends.iosrobovm.IOSGraphics.draw(IOSGraphics.java:316) at com.badlogic.gdx.backends.iosrobovm.IOSGraphics$1.draw(IOSGraphics.java:212) at com.badlogic.gdx.backends.iosrobovm.IOSGraphics$1.$cb$drawRect$(IOSGraphics.java) at org.robovm.apple.uikit.UIApplication.main(Native Method) at org.robovm.apple.uikit.UIApplication.main(UIApplication.java:428) at com.mygame.namegame.IOSLauncher.main(IOSLauncher.java:57)

Configuration

Please provide the build system, version(s), and targets affected.

Build Tools:

  • [x] IDEA plugin
  • [ ] Eclipse plugin
  • [ ] Gradle plugin

Versions:

Please provide the version of RoboVM, XCode and JDK used

  • Robovm: 2.3.3 release
  • XCode: 9
  • JDK: 8
  • LibGDX: 1.9.6

Build Targets:

Please provide the build targets this issue is seen on if applicable. e.g. iPhone 4s Simulator 32bit


Stacktrace

//Please provide the stacktrace if applicable 

nnkdev avatar Feb 23 '18 08:02 nnkdev

Please provide list of devices and OS versions this occurs in.

Please upload the music file you are trying to lose, as well as standalone executable example that reproduces your issue.

Tom-Ski avatar Feb 23 '18 08:02 Tom-Ski

@Tom-Ski List of devices and OS versions this occurs: iPhone 4s 9.3.5 iPhone 5s 11.2.5 iPhone 6 Plus 11.0.2 - 11.2.5 - 10.3.2 iPhone 6s 10.3.2 - 10.3.1 - 11.2.2 iPhone 6 11.0.3

iPad 3 9.3.5 iPad mini 2 10.3.3 iPad Air 10.3.3 - 11.2.2 - 11.2.5 iPad Air 2 11.2.5 And more..

Music file i use in my game. https://drive.google.com/open?id=1sw-B91v1wUKrAJv-mIVztEBz_Jr9OVS2

and Use in source code: musicBg = Gdx.audio.newMusic(Gdx.files.internal("sounds/musicbg.mp3"));

nnkdev avatar Feb 23 '18 08:02 nnkdev

My iphone 5s (10.3.1) is not report this crash. A friend have iphone 4s (9.3.5) install my game from App Store and play. I see crash report from this iphone 4s, but there is no crash game while playing.

nnkdev avatar Feb 23 '18 13:02 nnkdev

I have a similar crash, in my case it fails on loading sounds and it's due to OALSimpleAudio being null in some particular cases (still haven't been able to reproduce).

Have you added NSException.registerDefaultJavaUncaughtExceptionHandler(); after initalizing Fabric to be able to log Java exceptions in Crashlytics?

obigu avatar Apr 04 '18 17:04 obigu

I'm getting this crash log, Not on my iPhone 7

Fatal Exception: java.lang.NullPointerException

java.lang.NullPointerException at com.badlogic.gdx.backends.iosrobovm.IOSSound.<init>(IOSSound.java:45)
at com.badlogic.gdx.backends.iosrobovm.IOSAudio.newSound(IOSAudio.java:55)
at...

Operating System

  • iOS 10.3.3
  • iOS 11.4.0
  • iOS 7.1.2
  • iOS 10.2.1
  • iOS 10.3.2
  • and others

Device Models

  • iPhone 6
  • iPhone 5s
  • iPhone 4
  • iPad Air
  • iPhone 7
  • and others

I'm currently using

  • LibGDX - 1.9.8
  • Robovm - 2.3.4
  • IDEA Robovm plugin - 2.3.4

itsabhiaryan avatar Jul 31 '18 13:07 itsabhiaryan

I can also confirm this crash in my crash reports. It is apparently not reproducable and a one time problem on the devices. Only Music is affected, not Sound.

MrStahlfelge avatar Mar 10 '19 19:03 MrStahlfelge