0

My problem is that I build an app which works fantastic on all my devices. But on my friend's phone, not only the animations of the app seem to crash, but even his whole phone reboots. I also tried putting the animation in a try block, but no luck on that so far..

Intent openDaily = new Intent("nl.plplpl.ccs.DailyActivity");
        startActivity(openDaily);
        try{
            overridePendingTransition(R.animator.flip_in, R.animator.flip_out);
        }catch(Exception e){
            e.printStackTrace();
        }
        break; 

I also thought it could be the phone though, because he's running an Alpha version of CM10.1, but tried another ROM with the same result (Maybe driver related?).

Is anyway prepared to help me out on this one?

TimeWasterNL
  • 102
  • 5

1 Answers1

2

I also thought it could be the phone though, because he's running an Alpha version of CM10.1, but tried another ROM with the same result (Maybe driver related?).

Yes, if you manage to reboot / crash the whole device it's typically something driver / kernel / .. related.

A device should never crash as a whole regardless of what your app does. If your app does something bad you should get a nice error message and get back to the home screen.

A reboot will only happen if something within the system (and therefore not within your responsibility) goes horribly wrong. E.g. the graphic driver goes into some corrupted state and there is no way to recover. There is no way to catch those types of errors. If it was just a Java Exception it would not crash.

You can sometimes see within logcat (not filtered for your app) what happens.

zapl
  • 63,179
  • 10
  • 123
  • 154
  • Thanks for the hopefull answer! The only remaining thing I'm wondering about, is that I did a wrong reference to the animations the other day, and it made my whole device crash without any FC alert at all. Anyway, accepted your answer, thanks! – TimeWasterNL Mar 25 '13 at 20:29
  • 1
    If your app is crashing within native (C / C++) code and that crash kills your app process (not via a Java `Exception`) you'll get no FC. Android animations use native code to speed up things so this could lead to such a crash. Might still be a bug in Android since I'd expect a wrong reference should be caught by the Java part already. – zapl Mar 25 '13 at 20:59