Uploaded image for project: 'Titanium SDK/CLI'
  1. Titanium SDK/CLI
  2. TIMOB-26317

Android: exception handler throws a NullPointerException

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: Release 7.5.0
    • Component/s: Android
    • Labels:
      None
    • Environment:

      7.3.0.v20180816155220

      Description

      Hi, I had these issue while I was debugging a native module.

      When a java exception occurs, a NullPointerException is thrown when jsstack is null, trying to call .contains on a null string.

      https://github.com/appcelerator/titanium_mobile/blob/dc00603cdc187b56531b615ce8e864c6597157f4/android/titanium/src/java/org/appcelerator/titanium/TiExceptionHandler.java#L100-L105

      Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'boolean java.lang.String.contains(java.lang.CharSequence)' on a null object reference
      at org.appcelerator.titanium.TiExceptionHandler.getError(TiExceptionHandler.java:100)
      at org.appcelerator.titanium.TiExceptionHandler.handleOpenErrorDialog(TiExceptionHandler.java:141)
      at org.appcelerator.titanium.TiExceptionHandler.openErrorDialog(TiExceptionHandler.java:121)
      at org.appcelerator.titanium.TiExceptionHandler.handleException(TiExceptionHandler.java:246)
      at org.appcelerator.kroll.KrollRuntime.dispatchException(KrollRuntime.java:540)
      at org.appcelerator.titanium.TiApplication$1.uncaughtException(TiApplication.java:365)
      at org.appcelerator.titanium.TiBaseActivity.onCreate(TiBaseActivity.java:677)
      at org.appcelerator.titanium.TiActivity.onCreate(TiActivity.java:22)
      at android.app.Activity.performCreate(Activity.java:6975)
      at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1213)
      at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2770)
      ... 9 more

      Also, the new exception handler doesn't include the java exception title and message.

        Attachments

          Activity

            People

            • Assignee:
              gmathews Gary Mathews
              Reporter:
              gaspard.le Luc-Edmond Gaspard
              Reviewer:
              Yordan Banev
            • Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Backbone Issue Sync

                • Titanium SDK/CLI <> Titanium Mobile
                  Synced with:
                  TIMOB-6534
                  Sync status:
                  ERROR
                  Last received:
                  Last sent:

                  Git Source Code