java.lang.NullPointerException: Attempt to invoke virtual method 'char[] java.lang.String.toCharArray()' on a null object reference

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • I can't get openPhotoGallery to work on Android since upgrading to 6.0.0. The gallery opens fine, but when an image is selected, and I try to read the blob, I'm getting the following error: {code:java} [WARN] : W/System.err: java.lang.NullPointerException: Attempt to invoke virtual method 'char[] java.lang.String.toCharArray()' on a null object reference [WARN] : W/System.err: at java.io.File.fixSlashes(File.java:183) [WARN] : W/System.err: at java.io.File.<init>(File.java:130) [WARN] : W/System.err: at org.appcelerator.titanium.io.TitaniumBlob.getFile(TitaniumBlob.java:77) [WARN] : W/System.err: at org.appcelerator.titanium.TiBlob.getLength(TiBlob.java:364) [WARN] : W/System.err: at org.appcelerator.kroll.runtime.v8.V8Function.nativeInvoke(Native Method) [WARN] : W/System.err: at org.appcelerator.kroll.runtime.v8.V8Function.callSync(V8Function.java:57) [WARN] : W/System.err: at org.appcelerator.kroll.runtime.v8.V8Function.call(V8Function.java:43) [WARN] : W/System.err: at org.appcelerator.kroll.runtime.v8.V8Function$1.run(V8Function.java:70) [WARN] : W/System.err: at android.os.Handler.handleCallback(Handler.java:739) [WARN] : W/System.err: at android.os.Handler.dispatchMessage(Handler.java:95) [WARN] : W/System.err: at android.os.Looper.loop(Looper.java:148) [WARN] : W/System.err: at org.appcelerator.kroll.KrollRuntime$KrollRuntimeThread.run(KrollRuntime.java:118) [WARN] : EGL_emulation: eglSurfaceAttrib not implemented [WARN] : OpenGLRenderer: Failed to set EGL_SWAP_BEHAVIOR on surface 0xdc79b4e0, error=EGL_SUCCESS [ERROR] : TiExceptionHandler: (main) [20134,28149] ----- Titanium Javascript Runtime Error ----- [ERROR] : TiExceptionHandler: (main) [0,28149] - In undefined:230,23 [ERROR] : TiExceptionHandler: (main) [0,28149] - Message: Uncaught Attempt to invoke virtual method 'char[] java.lang.String.toCharArray()' on a null object reference [ERROR] : TiExceptionHandler: (main) [1,28150] - Source: if (me.attachedImage.length > 5242880) { [WARN] : EGL_emulation: eglSurfaceAttrib not implemented [WARN] : OpenGLRenderer: Failed to set EGL_SWAP_BEHAVIOR on surface 0xe8e3e9a0, error=EGL_SUCCESS {code}
    via by David Fox,
    • java.lang.NullPointerException: Attempt to invoke virtual method 'char[] java.lang.String.toCharArray()' on a null object reference at java.io.File.fixSlashes(File.java:183) at java.io.File.<init>(File.java:130) at com.rnfs.RNFSManager.readDir(RNFSManager.java:123) at java.lang.reflect.Method.invoke(Native Method)

    Users with the same issue

    Hiren Amaliyar
    Hiren Amaliyar2 times, last one,
    Indri Yunita
    Indri Yunita8 times, last one,
    ajinkya_w
    ajinkya_w1 times, last one,
    Diogo Jaym
    Diogo Jaym6 times, last one,
    ben.slama.jihed
    ben.slama.jihed6 times, last one,
    44 more bugmates