0
\$\begingroup\$

I've had this issue many a time, unfortunately anything I've used to fix it before doesn't work. So, if I build and run the app, it will run the app for about 5 seconds, before crashing. If I install the apk and try and run it, it will crash immediately.

I cannot for the life of me figure out what's wrong, this is an app I've built with no issues a hundred times, I am pretty certain I never changed any player settings since then, I did, however, reinstall the unity version as I had an issue with the android SDK because it didn't install properly.

I ran logcat in the Android Studio, and the only errors of note I could find are invalid vkGetInstanceProcAdd and Connecting to host time out, player connection will be disabled? However, it does seem to initialize the app through Android studio.

Here is a pastebin of my logcat, filtered to only include unity related issues.

https://pastebin.com/buRGfjXa

Thanks in advance.

\$\endgroup\$
4
  • 1
    \$\begingroup\$ When there's a crash you should see a crash report in logcat. It looks like you either filtered that out or didn't select the entire log. \$\endgroup\$
    – Kevin
    Commented Mar 4, 2021 at 19:19
  • \$\begingroup\$ I filtered it by "unity" because otherwise it gets flooded with notifications from my other apps. I'm not sure why, I haven't seen a crash report, unless this is a crash report ?D/ActivityManager: handleAppDiedLocked: app = ProcessRecord{233b477 23911:com.DefaultCompany.FishFeud/u0a3}, app.pid = 23911 \$\endgroup\$
    – Makineko
    Commented Mar 5, 2021 at 8:07
  • \$\begingroup\$ If an app crashes, the term "crash" should appear somewhere in logcat. Did you try filtering by "crash"? \$\endgroup\$
    – Kevin
    Commented Mar 5, 2021 at 22:21
  • \$\begingroup\$ Yeah, there was no results at all :( \$\endgroup\$
    – Makineko
    Commented Mar 6, 2021 at 6:38

1 Answer 1

0
\$\begingroup\$

Okay, this is kinda embarrassing , I found out the issue lol

I had a switch statement that either loaded the game or quit the game depending on which button was pressed. I realized the default was set to quit game, and I forgot to only count down the timer if the button had been pressed, so it was counting down the timer and then quitting right off the bat...

Not sure who this will help, but I hope it'll at least encourage people to look beyond a crash error if they see this...

I feel like an idiot lol, I don't know why this issue just came up though, the menu seemed to work just fine before...

\$\endgroup\$
8
  • 1
    \$\begingroup\$ Which is a good reason to have a print to the log for errors and exits. Would let you find a nice: quit game via count down button. \$\endgroup\$
    – Zibelas
    Commented Mar 7, 2021 at 8:14
  • \$\begingroup\$ That's a good idea, I'll implement that, I really wish Unity would have a quit message pop up. Or else, actually quit play mode on Application.Quit() \$\endgroup\$
    – Makineko
    Commented Mar 8, 2021 at 11:32
  • \$\begingroup\$ But you can use #if UNITY_EDITOR UnityEditor.EditorApplication.isPlaying = false; \$\endgroup\$
    – Zibelas
    Commented Mar 8, 2021 at 11:33
  • \$\begingroup\$ How do you put that in? I tried putting it in my game manager and it says "single line comment or end-of-line expected" \$\endgroup\$
    – Makineko
    Commented Mar 8, 2021 at 11:38
  • \$\begingroup\$ Should be two lines, first one is the condition that just gets called if you are in the editor. You have to close them as well with #endif. Or if you still want to quite your application #else Application.Quit(); #endif The # is each in its own line. \$\endgroup\$
    – Zibelas
    Commented Mar 8, 2021 at 11:39

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .