Unity Apps Crashing on Samsung Galaxy S4

I just bought a new Samsung Galaxy S4 and it will crash right after the Splash Screen.
I have tried to run most of my projects on it and none will work. Also I tried to run Angry Bots and several other Unity made demos. None of which worked. Unity is fully updated and I have all the settings on the phone configured like I normally would and cannot figure out what the problems is.
Is anyone else out there having any success with the same phones? Or have any suggestions?

I am having similar problems… But no solution. I’ve been working on a game that I’ve tested across a dozen ‘old’ devices including a Nexus 7 and several galaxy s3 phones. The game works flawlessly. However, when I load it on my friend’s s4, it crashes as soon as he attempts to touch the screen. Thus far, I’ve been able to trace the problem to a camera.Screentoworldpoint call. If I comment out that call, the game doesn’t crash. If I make that call, the game immediately explodes and returns back to the android home screen.

Most of the development has been done using Unity 3.5.7. However, after encountering the issue I upgraded to 4.1.3. I’m still seeing the same issue

My brother has a S4 and downloaded my game I just put on Google Play and it had no problems? here is the url its free so no worries :

https://t.co/Xyu5vH8Pln

I used Unity 3.5.7 and Android basic to develop.

Just gave your game a try on my Nexus 7. (I don’t have my friend’s s4 to test with). Are you using screentoworldpoint to determine which flipper to flip? My friend can run another prototype of mine that uses touch input but not screentoworldpoint without issue. It’s quite frustrating to not have a s4 at my disposal to properly debug this issue :wink:

By the way, great work on your game! It runs rather well. The only issue I have with it is that the ball moves too fast for my liking. But, perhaps that’s just a sign that my pinball skills just aren’t as good as they once were.

Im using touch input position - which is already in screen space so no need for any conversions I just validate the x value against Screen.width/2.

Strange problem you are having indeed. I know I do use WorldToScreenPoint in some code that runs in the editor for my UI Framework and this has no issues. At runtime I know I use WorldToViewportPoint for doing clipping on scrolling lists. Hope some more people with a S4 can verify this problem you are having at runtime on the device.

Anyway thanks for commenting on the game - dont want to derail the thread , just wanted to point to a Unity Game that I personally know works on the S4.

In case anyone has an S4 (or any other more ‘modern’ phone/tablet) and wants to help debug the problem, here’s a Dropbox link to a test app that might show the issue: ( I’ve not had a chance to test this test app on an S4 yet )

[ URL Removed ] - Problem resolved so I’ve removed the test app from my Dropbox space

The test app is simply a test scene that I baked into the game I’m developing. As such, you’ll notice that when you install it, the app is called Bouncing Bombs and has a set of permissions to allow for online leaderboards, google play in-app purchases, etc. All those things are a bunch of no-ops since the test scene is just a few generic buttons and checkboxes. Oh, and the scene doesn’t have the Android back button mapped to anything, so, you can only exit the scene by hitting the Home button.

As for the test, itself:

  • There are 5 buttons that can be pressed. When a button is pressed, the big button in the middle of the scene should update to state which button has been pushed
  • There is a dark box in the middle of the scene. If you touch drag from that box, you should see a Screen Pos label update with screen position
  • If you enable any of the checkboxes and repeat the touch drag from the dark box, you should see more position values being updated/displayed

Ideally, all of the check boxes should be able to be enabled and you should be able to drag and see all the various positions updating. My speculation is that the app will work without issue with NO checkboxes checked. However, if you enable the ScreenToWorld checkbox and attempt to touch/drag from the dark box, I’m guessing that the app is going to crash; at least that’s the behavior that’s being reported to me when my friend attempts to run my full game.

I have no idea what will happen if any of the other checkboxes are enabled since I don’t have a S4 to test against. I would be grateful to anyone with an S4 that’s willing to give the test app a try

For anyone watching this thread, I figured I ought to keep updating my findings. Got some feedback from my friend about the .apk file I posed here. The test program does NOT crash when he attempts to run it. He can toggle any combination of check boxes and the program runs without issue.

The confusing hunt continues…

The thrilling conclusion!

Ok, so not really thrilling, but, I figured I ought to wrap up my S4 story in the hopes that it might help others. Unfortunately, the conclusion is a bit murky. As noted in an earlier post, I had tracked my crash down to a camera.Screentoworldpoint call I was making. However, when making that same call in a simple test app, I ran into no issues (as one might expect). This data caused me to rethink (and redo) my touch input scheme; it was overly complex to begin with, so, it’s probably good that I took the time to redo it anyway. Once re-implemented, my S4 crash disappeared.

I believe that the root cause of the problem actually had to do with a variable I was using to hold my screen position that I was writing/referencing in an unsafe way. My guess is that the crash I was seeing was simply caused by a race condition that showed itself when the .apk was deployed on a phone/tablet with beefy hardware.

Glad you have sorted out your problem :wink:

Turns out that I am able to run my app on the Galaxy S4 if I run it once (it will crash) and then run it again and it will work. It has a chance to crash each run. Once run it will only crash when going back to my main menu.
Ex:
Splash → Crash going to main menu
Splash → Main Menu → Game → Crash going to main menu

The error I am getting every time from Logcat on a crash is:
Splash Screen → Main Menu
E/QcrilMsgTunnelSocket(27235): IOExceptionjava.io.IOException: No such file or directoryReason: No such file or directory
Link to whole Logcat: https://dl.dropboxusercontent.com/u/69196539/MainMenuCrash.rtf

From Game Scene → Main Menu
E/QcrilMsgTunnelSocket(30897): IOExceptionjava.io.IOException: No such file or directoryReason: No such file or directory
Link to whole Logcat: https://dl.dropboxusercontent.com/u/69196539/GameSceneError.rtf

I am only receiving this error when I run it with the S4. I have received this error in Unity 4.0.1 and then updated to the latest version, which I am still receiving the error, also my SDK is updated . I am not referencing any external files outside of the project and only using what is inside of my assets (all of which are textures). Anyone who has insight or experience with such an error such as this would be incredibly appreciated.

I don’t claim to know anything about what the QCRIL is, but, Googling with a little guessing makes me think it might stand for QualComm Radio Interface Layer. i.e. the O/S layer that allows the O/S to talk to the phone’s radio hardware. Looking through your MainMenuCrash.rtf, it’s riddled from beginning to end with those QCril exceptions. After a few of those exceptions, it prints out a “Couldn’t find ‘qmux_radio/rild_oem0’ socket; retrying after timeout” message. Then it eventually repeats the exceptions and more “timeout” messages.

Is your app attempting to use the network in any way? Could something in your Main Menu screen logic be attempting to access the network and failing horribly? Could the failure have something to do with Jellybean 4.2.2? To my knowledge, not many phones/tablets besides the Nexus 4, 7, 10 and Galaxy S4 run 4.2.2 yet. Perhaps’s there’s some sort of Android permissions issue between pre-4.2.2 and 4.2.2?

In addition to the exception you specifically called out, the MainMenuCrash.rtf file contains quite a few more exceptions. Lucky for me, I’ve not had to delve into logcat files in the past, so, I have no idea how ‘normal’ any of the other exceptions are. But, typically, exceptions aren’t a sign of things going as expected. Perhaps your issue is really tied to one of the other exceptions?

In case you can’t tell, I’m kinda grasping at straws here :wink: Perhaps some of these thoughts might trigger a more clear idea in someone else’s mind…

Thanks for the input.
However my application runs fine on 4.2.2 devices and seems to only be breaking on the Galaxy S4 so far. (We’ve tested on every device we have) The application does in fact use the network however I have tested it while it was disabled/removed and still has the same problem. I am more of picking at straws atm and am wondering if it is somehow a Unity incompatibility issue with the newer devices since my application is not the only one that it is breaking on. As previously stated I have tried it on Angry Bots and several other Unity apps and they break the same way.

bump

Having the same problem with my new S4. If someone could shed some light on this I would be really happy!

Well it is nice to know i’m not the only one that is having issues with this. If anyone has found a solution to this, it would be very much appreciated.

I never tested my app on S4 but I am getting complaints from users that it’s not working on their S4.
The game starts, logo shows up and then goes back to home screen. The link is in my signature.

This is the exact same thing that is happening with mine. I’m still trying to figure out if there is an incompatibility with this phone and Unity.

Ok so i have traced the issue with my game down to a null pointer in the awake method of one of my scripts. Strangely, no exception was thrown. But, now the same crash as before happens when i connect to a server immediately after the connection has been established. So in conclusion, i’m still none the wiser…

I have a similar problem with my game, a user reported a crash just after the access to the first scene, while it runs fine on a nexus 7 (android 4.2.2 as well). Could someone run the game on a galaxy S4 and send me a bug report or a logcat file in private message?

Here is a link to my game

After searching through all my code for a long time I finally found an object that was returning a null pointer in my first scene. After fixing that issue it now works on the S4 very smoothly without any glitches. Weird that it crashed for just this phone an no others. Nonetheless, if you are having an issue and it is returning some weird errors on the S4, go look for a null pointer or similar errors.
Weird part was it wasn’t appearing in the log cats saying “null pointer” or in the Unity debug log.