java.lang.IllegalStateException: Fatal Exception thrown on Scheduler.Worker thread.

GitHub | DJCrapsody | 3 months ago
  1. 0

    Crash when rotating during pull request page load

    GitHub | 3 months ago | DJCrapsody
    java.lang.IllegalStateException: Fatal Exception thrown on Scheduler.Worker thread.
  2. 0

    ListView is crashing when reaching the end of the list. This same test case works without crashing with Ti SDK 4.0.0.Beta2. Steps to reproduce: # Load code below with Ti SDK 4.1.0.v20150410061234 # Tap the "Append 10 items" button # Scroll all the way to the bottom # Observer app crash Test case: {code} var win = Ti.UI.createWindow({ backgroundColor : "#ffffff", layout : "absolute" }); win.open(); var appendButton = Ti.UI.createButton({ title : "Append 10 items", height : "10%", top : "5%" }); appendButton.addEventListener("click", function() { appendData(); }); win.add(appendButton); var screenWidth = Ti.Platform.displayCaps.platformWidth; var listSection = Ti.UI.createListSection(); var listView = Ti.UI.createListView({ backgroundColor : "#cccccc", top : "20%", height : "80%", templates : { "photoWithCaption" : { properties : { layout : "vertical", height : Ti.UI.SIZE }, childTemplates : [{ type : "Ti.UI.ImageView", bindId : "photo", properties : { height : screenWidth, width : screenWidth, preventDefaultImage : true } }, { type : "Ti.UI.TextArea", bindId : "caption", properties : { backgroundColor : "#ffffff", height : Ti.UI.SIZE, left : 10, right : 10, editable : false, scrollable : false } }] } }, defaultItemTemplate : "photoWithCaption" }); listView.setSections([listSection]); win.add(listView); function appendData() { var data = []; for (var i = 0; i < 10; i++) { var text = "This a caption #" + (i + 1) + ", and it may disappear when an append of new data happens on the parent ListView."; data.push({ template : "photoWithCaption", photo : { image : "http://thecatapi.com/api/images/get?format=src&type=jpg&size=small" }, caption : { attributedString : Titanium.UI.createAttributedString({ text : text, attributes : [{ type : Ti.UI.ATTRIBUTE_FONT, value : { font : { fontSize : 14 } }, range : [0, text.length] }, { type : Ti.UI.ATTRIBUTE_FOREGROUND_COLOR, value : "#000000", range : [0, text.length] }] }) } }); } listSection.appendItems(data); } {code} Stack trace: {code} 04-10 13:52:35.211: E/TiApplication(19289): (main) [30186,32990] Sending event: exception on thread: main msg:java.lang.NullPointerException: Attempt to read from field 'java.lang.Object android.util.Pair.second' on a null object reference; Titanium 4.1.0,2015/04/10 06:13,29ba994 04-10 13:52:35.211: E/TiApplication(19289): java.lang.NullPointerException: Attempt to read from field 'java.lang.Object android.util.Pair.second' on a null object reference 04-10 13:52:35.211: E/TiApplication(19289): at ti.modules.titanium.ui.widget.listview.TiListView$1.onScrollStateChanged(TiListView.java:337) 04-10 13:52:35.211: E/TiApplication(19289): at android.widget.AbsListView.reportScrollStateChange(AbsListView.java:4335) 04-10 13:52:35.211: E/TiApplication(19289): at android.widget.AbsListView$FlingRunnable.endFling(AbsListView.java:4466) 04-10 13:52:35.211: E/TiApplication(19289): at android.widget.AbsListView$FlingRunnable.run(AbsListView.java:4601) 04-10 13:52:35.211: E/TiApplication(19289): at android.view.Choreographer$CallbackRecord.run(Choreographer.java:767) 04-10 13:52:35.211: E/TiApplication(19289): at android.view.Choreographer.doCallbacks(Choreographer.java:580) 04-10 13:52:35.211: E/TiApplication(19289): at android.view.Choreographer.doFrame(Choreographer.java:549) 04-10 13:52:35.211: E/TiApplication(19289): at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:753) 04-10 13:52:35.211: E/TiApplication(19289): at android.os.Handler.handleCallback(Handler.java:739) 04-10 13:52:35.211: E/TiApplication(19289): at android.os.Handler.dispatchMessage(Handler.java:95) 04-10 13:52:35.211: E/TiApplication(19289): at android.os.Looper.loop(Looper.java:135) 04-10 13:52:35.211: E/TiApplication(19289): at android.app.ActivityThread.main(ActivityThread.java:5254) 04-10 13:52:35.211: E/TiApplication(19289): at java.lang.reflect.Method.invoke(Native Method) 04-10 13:52:35.211: E/TiApplication(19289): at java.lang.reflect.Method.invoke(Method.java:372) 04-10 13:52:35.211: E/TiApplication(19289): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903) 04-10 13:52:35.211: E/TiApplication(19289): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698) 04-10 13:52:35.234: E/AndroidRuntime(19289): FATAL EXCEPTION: main 04-10 13:52:35.234: E/AndroidRuntime(19289): Process: blah, PID: 19289 04-10 13:52:35.234: E/AndroidRuntime(19289): java.lang.NullPointerException: Attempt to read from field 'java.lang.Object android.util.Pair.second' on a null object reference 04-10 13:52:35.234: E/AndroidRuntime(19289): at ti.modules.titanium.ui.widget.listview.TiListView$1.onScrollStateChanged(TiListView.java:337) 04-10 13:52:35.234: E/AndroidRuntime(19289): at android.widget.AbsListView.reportScrollStateChange(AbsListView.java:4335) 04-10 13:52:35.234: E/AndroidRuntime(19289): at android.widget.AbsListView$FlingRunnable.endFling(AbsListView.java:4466) 04-10 13:52:35.234: E/AndroidRuntime(19289): at android.widget.AbsListView$FlingRunnable.run(AbsListView.java:4601) 04-10 13:52:35.234: E/AndroidRuntime(19289): at android.view.Choreographer$CallbackRecord.run(Choreographer.java:767) 04-10 13:52:35.234: E/AndroidRuntime(19289): at android.view.Choreographer.doCallbacks(Choreographer.java:580) 04-10 13:52:35.234: E/AndroidRuntime(19289): at android.view.Choreographer.doFrame(Choreographer.java:549) 04-10 13:52:35.234: E/AndroidRuntime(19289): at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:753) 04-10 13:52:35.234: E/AndroidRuntime(19289): at android.os.Handler.handleCallback(Handler.java:739) 04-10 13:52:35.234: E/AndroidRuntime(19289): at android.os.Handler.dispatchMessage(Handler.java:95) 04-10 13:52:35.234: E/AndroidRuntime(19289): at android.os.Looper.loop(Looper.java:135) 04-10 13:52:35.234: E/AndroidRuntime(19289): at android.app.ActivityThread.main(ActivityThread.java:5254) 04-10 13:52:35.234: E/AndroidRuntime(19289): at java.lang.reflect.Method.invoke(Native Method) 04-10 13:52:35.234: E/AndroidRuntime(19289): at java.lang.reflect.Method.invoke(Method.java:372) 04-10 13:52:35.234: E/AndroidRuntime(19289): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903) 04-10 13:52:35.234: E/AndroidRuntime(19289): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698) {code}

    Appcelerator JIRA | 2 years ago | Alex Bernier
    java.lang.NullPointerException: Attempt to read from field 'java.lang.Object android.util.Pair.second' on a null object reference
  3. 0

    NPE in ShadowDocument$Update.getGarbageElements (V1.2.0)

    GitHub | 11 months ago | tomtanti
    java.lang.NullPointerException: Attempt to read from field 'java.lang.Object com.facebook.stetho.inspector.elements.ElementInfo.parentElement' on a null object reference
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    ListView is crashing when reaching the end of the list. This same test case works without crashing with Ti SDK 4.0.0.Beta2. Steps to reproduce: # Load code below with Ti SDK 4.1.0.v20150410061234 # Tap the "Append 10 items" button # Scroll all the way to the bottom # Observer app crash Test case: {code} var win = Ti.UI.createWindow({ backgroundColor : "#ffffff", layout : "absolute" }); win.open(); var appendButton = Ti.UI.createButton({ title : "Append 10 items", height : "10%", top : "5%" }); appendButton.addEventListener("click", function() { appendData(); }); win.add(appendButton); var screenWidth = Ti.Platform.displayCaps.platformWidth; var listSection = Ti.UI.createListSection(); var listView = Ti.UI.createListView({ backgroundColor : "#cccccc", top : "20%", height : "80%", templates : { "photoWithCaption" : { properties : { layout : "vertical", height : Ti.UI.SIZE }, childTemplates : [{ type : "Ti.UI.ImageView", bindId : "photo", properties : { height : screenWidth, width : screenWidth, preventDefaultImage : true } }, { type : "Ti.UI.TextArea", bindId : "caption", properties : { backgroundColor : "#ffffff", height : Ti.UI.SIZE, left : 10, right : 10, editable : false, scrollable : false } }] } }, defaultItemTemplate : "photoWithCaption" }); listView.setSections([listSection]); win.add(listView); function appendData() { var data = []; for (var i = 0; i < 10; i++) { var text = "This a caption #" + (i + 1) + ", and it may disappear when an append of new data happens on the parent ListView."; data.push({ template : "photoWithCaption", photo : { image : "http://thecatapi.com/api/images/get?format=src&type=jpg&size=small" }, caption : { attributedString : Titanium.UI.createAttributedString({ text : text, attributes : [{ type : Ti.UI.ATTRIBUTE_FONT, value : { font : { fontSize : 14 } }, range : [0, text.length] }, { type : Ti.UI.ATTRIBUTE_FOREGROUND_COLOR, value : "#000000", range : [0, text.length] }] }) } }); } listSection.appendItems(data); } {code} Stack trace: {code} 04-10 13:52:35.211: E/TiApplication(19289): (main) [30186,32990] Sending event: exception on thread: main msg:java.lang.NullPointerException: Attempt to read from field 'java.lang.Object android.util.Pair.second' on a null object reference; Titanium 4.1.0,2015/04/10 06:13,29ba994 04-10 13:52:35.211: E/TiApplication(19289): java.lang.NullPointerException: Attempt to read from field 'java.lang.Object android.util.Pair.second' on a null object reference 04-10 13:52:35.211: E/TiApplication(19289): at ti.modules.titanium.ui.widget.listview.TiListView$1.onScrollStateChanged(TiListView.java:337) 04-10 13:52:35.211: E/TiApplication(19289): at android.widget.AbsListView.reportScrollStateChange(AbsListView.java:4335) 04-10 13:52:35.211: E/TiApplication(19289): at android.widget.AbsListView$FlingRunnable.endFling(AbsListView.java:4466) 04-10 13:52:35.211: E/TiApplication(19289): at android.widget.AbsListView$FlingRunnable.run(AbsListView.java:4601) 04-10 13:52:35.211: E/TiApplication(19289): at android.view.Choreographer$CallbackRecord.run(Choreographer.java:767) 04-10 13:52:35.211: E/TiApplication(19289): at android.view.Choreographer.doCallbacks(Choreographer.java:580) 04-10 13:52:35.211: E/TiApplication(19289): at android.view.Choreographer.doFrame(Choreographer.java:549) 04-10 13:52:35.211: E/TiApplication(19289): at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:753) 04-10 13:52:35.211: E/TiApplication(19289): at android.os.Handler.handleCallback(Handler.java:739) 04-10 13:52:35.211: E/TiApplication(19289): at android.os.Handler.dispatchMessage(Handler.java:95) 04-10 13:52:35.211: E/TiApplication(19289): at android.os.Looper.loop(Looper.java:135) 04-10 13:52:35.211: E/TiApplication(19289): at android.app.ActivityThread.main(ActivityThread.java:5254) 04-10 13:52:35.211: E/TiApplication(19289): at java.lang.reflect.Method.invoke(Native Method) 04-10 13:52:35.211: E/TiApplication(19289): at java.lang.reflect.Method.invoke(Method.java:372) 04-10 13:52:35.211: E/TiApplication(19289): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903) 04-10 13:52:35.211: E/TiApplication(19289): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698) 04-10 13:52:35.234: E/AndroidRuntime(19289): FATAL EXCEPTION: main 04-10 13:52:35.234: E/AndroidRuntime(19289): Process: blah, PID: 19289 04-10 13:52:35.234: E/AndroidRuntime(19289): java.lang.NullPointerException: Attempt to read from field 'java.lang.Object android.util.Pair.second' on a null object reference 04-10 13:52:35.234: E/AndroidRuntime(19289): at ti.modules.titanium.ui.widget.listview.TiListView$1.onScrollStateChanged(TiListView.java:337) 04-10 13:52:35.234: E/AndroidRuntime(19289): at android.widget.AbsListView.reportScrollStateChange(AbsListView.java:4335) 04-10 13:52:35.234: E/AndroidRuntime(19289): at android.widget.AbsListView$FlingRunnable.endFling(AbsListView.java:4466) 04-10 13:52:35.234: E/AndroidRuntime(19289): at android.widget.AbsListView$FlingRunnable.run(AbsListView.java:4601) 04-10 13:52:35.234: E/AndroidRuntime(19289): at android.view.Choreographer$CallbackRecord.run(Choreographer.java:767) 04-10 13:52:35.234: E/AndroidRuntime(19289): at android.view.Choreographer.doCallbacks(Choreographer.java:580) 04-10 13:52:35.234: E/AndroidRuntime(19289): at android.view.Choreographer.doFrame(Choreographer.java:549) 04-10 13:52:35.234: E/AndroidRuntime(19289): at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:753) 04-10 13:52:35.234: E/AndroidRuntime(19289): at android.os.Handler.handleCallback(Handler.java:739) 04-10 13:52:35.234: E/AndroidRuntime(19289): at android.os.Handler.dispatchMessage(Handler.java:95) 04-10 13:52:35.234: E/AndroidRuntime(19289): at android.os.Looper.loop(Looper.java:135) 04-10 13:52:35.234: E/AndroidRuntime(19289): at android.app.ActivityThread.main(ActivityThread.java:5254) 04-10 13:52:35.234: E/AndroidRuntime(19289): at java.lang.reflect.Method.invoke(Native Method) 04-10 13:52:35.234: E/AndroidRuntime(19289): at java.lang.reflect.Method.invoke(Method.java:372) 04-10 13:52:35.234: E/AndroidRuntime(19289): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903) 04-10 13:52:35.234: E/AndroidRuntime(19289): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698) {code}

    Appcelerator JIRA | 2 years ago | Alex Bernier
    java.lang.NullPointerException: Attempt to read from field 'java.lang.Object android.util.Pair.second' on a null object reference
  6. 0

    Attempt to read from field when putting to Map

    Stack Overflow | 1 year ago | k.nadonenko
    java.lang.NullPointerException: Attempt to read from field 'java.lang.Object android.util.Pair.first' on a null object reference

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.NullPointerException

      Attempt to read from field 'java.lang.Object com.alorma.github.sdk.bean.issue.Story.item' on a null object reference

      at com.alorma.github.ui.fragment.pullrequest.PullRequestConversationFragment.notifyHeadOfAdapter()
    2. com.alorma.github
      PullRequestConversationFragment$3.onError
      1. com.alorma.github.ui.fragment.pullrequest.PullRequestConversationFragment.notifyHeadOfAdapter(PullRequestConversationFragment.java:339)
      2. com.alorma.github.ui.fragment.pullrequest.PullRequestConversationFragment.access$600(PullRequestConversationFragment.java:63)
      3. com.alorma.github.ui.fragment.pullrequest.PullRequestConversationFragment$3.onError(PullRequestConversationFragment.java:327)
      3 frames
    3. rxjava
      ScheduledAction.run
      1. rx.observers.SafeSubscriber._onError(SafeSubscriber.java:152)
      2. rx.observers.SafeSubscriber.onError(SafeSubscriber.java:115)
      3. rx.exceptions.Exceptions.throwOrReport(Exceptions.java:205)
      4. rx.observers.SafeSubscriber.onNext(SafeSubscriber.java:139)
      5. rx.internal.operators.OperatorObserveOn$ObserveOnSubscriber.call(OperatorObserveOn.java:227)
      6. rx.internal.schedulers.ScheduledAction.run(ScheduledAction.java:55)
      6 frames
    4. Android Platform
      ActivityThread.main
      1. android.os.Handler.handleCallback(Handler.java:739)
      2. android.os.Handler.dispatchMessage(Handler.java:95)
      3. android.os.Looper.loop(Looper.java:135)
      4. android.app.ActivityThread.main(ActivityThread.java:5290)
      4 frames
    5. Java RT
      Method.invoke
      1. java.lang.reflect.Method.invoke(Native Method)
      2. java.lang.reflect.Method.invoke(Method.java:372)
      2 frames
    6. Android
      ZygoteInit.main
      1. com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:908)
      2. com.android.internal.os.ZygoteInit.main(ZygoteInit.java:703)
      2 frames