Random Crash on Android...

You must Login before you can answer or comment on any questions.

Hi Community,

I met some randoms crashes. There's the log :

11-28 18:48:03.825: ERROR/TiUncaughtHandler(28342): (Thread-11) [1,16734] Sending event: exception on thread: Thread-11 msg:java.lang.NullPointerException; Titanium 1.7.6,2011/11/10 18:23,
11-28 18:48:03.825: ERROR/TiUncaughtHandler(28342): java.lang.NullPointerException
11-28 18:48:03.825: ERROR/TiUncaughtHandler(28342):     at ti.modules.titanium.ui.widget.TiUIImageView$Loader.run(TiUIImageView.java:318)
11-28 18:48:03.825: ERROR/TiUncaughtHandler(28342):     at java.lang.Thread.run(Thread.java:1019)
11-28 18:48:03.845: ERROR/AndroidRuntime(28342): FATAL EXCEPTION: Thread-11
11-28 18:48:03.845: ERROR/AndroidRuntime(28342): java.lang.NullPointerException
11-28 18:48:03.845: ERROR/AndroidRuntime(28342):     at ti.modules.titanium.ui.widget.TiUIImageView$Loader.run(TiUIImageView.java:318)
11-28 18:48:03.845: ERROR/AndroidRuntime(28342):     at java.lang.Thread.run(Thread.java:1019)
11-28 18:48:03.845: WARN/ActivityManager(2696):   Force finishing activity com.tnssofres.mobileapp/ti.modules.titanium.ui.TiTabActivity
11-28 18:48:03.845: WARN/ActivityManager(2696):   Force finishing activity com.tnssofres.mobileapp/.TnsSofresActivity
11-28 18:48:03.850: ERROR/(2696): Dumpstate > /data/log/dumpstate_app_error
I Thought the problem was related to this JS code :
var images = [];
        var i;
        for(i = 1; i < 19; i++) {
            images.push('/images/loader/loader' + i + '.png');
        }
 
        var loaderImage = Titanium.UI.createImageView({
            width : 137,
            height : 3,
            right : (Ti.Platform.displayCaps.platformWidth - 144) / 2,
            left : (Ti.Platform.displayCaps.platformWidth - 142) / 2,
            top : (Ti.Platform.displayCaps.platformHeight - 174) / 2, // - 20 because of status bar
            bottom : (Ti.Platform.displayCaps.platformHeight - 94) / 2,
            images : images,
            duration : 90, // in milliseconds, the time before next frame is shown
            repeatCount : 0  // 0 means animation repeats indefinitely, use > 1 to control repeat count
        });
 
        loaderImage.addEventListener('load', function(e) {
            loaderImage.start();
        });
Do you see something wrong which can crash the app ? On IOS, no problem at all.

Thanks all :)

— asked 1 year ago by Benjamin Jeanjean
3 Comments
  • are you performing the operation on the instance of current window ?? becoz i m facing the exact same error......

    — commented 1 year ago by Gagan Tiwari

  • I Think it's an appcelerator bug, but we need an expert advice. Someone from the team ?

    — commented 1 year ago by Benjamin Jeanjean

  • I'm having that crash too if in android it tries to close the window of the loaderImage, someone got an solution already?

    — commented 1 year ago by Sky Tang

Your Answer

Think you can help? Login to answer this question!