<p dir="auto">I'm performing a simple Glide request for an image:</p>
<div class="highlight highlight-source-java notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="Glide.with(activity).asDrawable()
          .load(photoUrl)
          .transition(DrawableTransitionOptions.withCrossFade())
          .into(courseImageView);"><pre class="notranslate"><span class="pl-smi">Glide</span>.<span class="pl-en">with</span>(<span class="pl-s1">activity</span>).<span class="pl-en">asDrawable</span>()
          .<span class="pl-en">load</span>(<span class="pl-s1">photoUrl</span>)
          .<span class="pl-en">transition</span>(<span class="pl-smi">DrawableTransitionOptions</span>.<span class="pl-en">withCrossFade</span>())
          .<span class="pl-en">into</span>(<span class="pl-s1">courseImageView</span>);</pre></div>
<p dir="auto">The image does not exist any longer on the server, so a 404 response is thrown. Soon after, Glide encounters a null pointer exception while attempting to log the exception.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="08-24 14:00:45.066  32394-32696/com.google.android.apps.classroom E/Volley﹕ [1937] BasicNetwork.performRequest: Unexpected response code 404 for https://lh4.googleusercontent.com/--39zw2UaVKs/VMqrCiuz-7I/AAAAAAAAAGQ/xHcF74BgYjk/w1256-h267-no/107_triangles_pink.jpg
08-24 14:00:45.071  32394-32394/com.google.android.apps.classroom D/AndroidRuntime﹕ Shutting down VM
08-24 14:00:45.072  32394-32394/com.google.android.apps.classroom E/AndroidRuntime﹕ FATAL EXCEPTION: main
    Process: com.google.android.apps.classroom, PID: 32394
    java.lang.NullPointerException: Attempt to invoke interface method 'int java.lang.CharSequence.length()' on a null object reference
            at com.bumptech.glide.load.engine.GlideException$IndentedAppendable.append(GlideException.java:202)
            at com.bumptech.glide.load.engine.GlideException.appendExceptionMessage(GlideException.java:142)
            at com.bumptech.glide.load.engine.GlideException.appendCausesWrapped(GlideException.java:175)
            at com.bumptech.glide.load.engine.GlideException.appendCauses(GlideException.java:153)
            at com.bumptech.glide.load.engine.GlideException.printStackTrace(GlideException.java:126)
            at com.bumptech.glide.load.engine.GlideException.appendCausesWrapped(GlideException.java:173)
            at com.bumptech.glide.load.engine.GlideException.appendCauses(GlideException.java:153)
            at com.bumptech.glide.load.engine.GlideException.printStackTrace(GlideException.java:126)
            at com.bumptech.glide.load.engine.GlideException.appendCausesWrapped(GlideException.java:173)
            at com.bumptech.glide.load.engine.GlideException.appendCauses(GlideException.java:153)
            at com.bumptech.glide.load.engine.GlideException.printStackTrace(GlideException.java:126)
            at com.bumptech.glide.load.engine.GlideException.printStackTrace(GlideException.java:121)
            at android.util.Log.getStackTraceString(Log.java:343)
            at android.util.Log.w(Log.java:192)
            at com.bumptech.glide.request.SingleRequest.onLoadFailed(SingleRequest.java:492)
            at com.bumptech.glide.load.engine.EngineJob.handleExceptionOnMainThread(EngineJob.java:250)
            at com.bumptech.glide.load.engine.EngineJob.access$200(EngineJob.java:23)
            at com.bumptech.glide.load.engine.EngineJob$MainThreadCallback.handleMessage(EngineJob.java:279)
            at android.os.Handler.dispatchMessage(Handler.java:98)
            at android.os.Looper.loop(Looper.java:148)
            at android.app.ActivityThread.main(ActivityThread.java:5417)
            at java.lang.reflect.Method.invoke(Native Method)
            at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
            at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)"><pre class="notranslate"><code class="notranslate">08-24 14:00:45.066  32394-32696/com.google.android.apps.classroom E/Volley﹕ [1937] BasicNetwork.performRequest: Unexpected response code 404 for https://lh4.googleusercontent.com/--39zw2UaVKs/VMqrCiuz-7I/AAAAAAAAAGQ/xHcF74BgYjk/w1256-h267-no/107_triangles_pink.jpg
08-24 14:00:45.071  32394-32394/com.google.android.apps.classroom D/AndroidRuntime﹕ Shutting down VM
08-24 14:00:45.072  32394-32394/com.google.android.apps.classroom E/AndroidRuntime﹕ FATAL EXCEPTION: main
    Process: com.google.android.apps.classroom, PID: 32394
    java.lang.NullPointerException: Attempt to invoke interface method 'int java.lang.CharSequence.length()' on a null object reference
            at com.bumptech.glide.load.engine.GlideException$IndentedAppendable.append(GlideException.java:202)
            at com.bumptech.glide.load.engine.GlideException.appendExceptionMessage(GlideException.java:142)
            at com.bumptech.glide.load.engine.GlideException.appendCausesWrapped(GlideException.java:175)
            at com.bumptech.glide.load.engine.GlideException.appendCauses(GlideException.java:153)
            at com.bumptech.glide.load.engine.GlideException.printStackTrace(GlideException.java:126)
            at com.bumptech.glide.load.engine.GlideException.appendCausesWrapped(GlideException.java:173)
            at com.bumptech.glide.load.engine.GlideException.appendCauses(GlideException.java:153)
            at com.bumptech.glide.load.engine.GlideException.printStackTrace(GlideException.java:126)
            at com.bumptech.glide.load.engine.GlideException.appendCausesWrapped(GlideException.java:173)
            at com.bumptech.glide.load.engine.GlideException.appendCauses(GlideException.java:153)
            at com.bumptech.glide.load.engine.GlideException.printStackTrace(GlideException.java:126)
            at com.bumptech.glide.load.engine.GlideException.printStackTrace(GlideException.java:121)
            at android.util.Log.getStackTraceString(Log.java:343)
            at android.util.Log.w(Log.java:192)
            at com.bumptech.glide.request.SingleRequest.onLoadFailed(SingleRequest.java:492)
            at com.bumptech.glide.load.engine.EngineJob.handleExceptionOnMainThread(EngineJob.java:250)
            at com.bumptech.glide.load.engine.EngineJob.access$200(EngineJob.java:23)
            at com.bumptech.glide.load.engine.EngineJob$MainThreadCallback.handleMessage(EngineJob.java:279)
            at android.os.Handler.dispatchMessage(Handler.java:98)
            at android.os.Looper.loop(Looper.java:148)
            at android.app.ActivityThread.main(ActivityThread.java:5417)
            at java.lang.reflect.Method.invoke(Native Method)
            at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
            at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
</code></pre></div>
<p dir="auto">From the stack trace, it seems like the null pointer is being thrown because Glide is attempting to log an exception with a null message. Is there anyway this can be avoided (or maybe this should be considered a bug?).</p>
<p dir="auto"><strong>Glide Version/Integration library (if any)</strong>:<br>
glide-4.0.0-SNAPSHOT</p>
<p dir="auto"><strong>Device/Android Version</strong>:<br>
LG-F320S / 4.2.2</p>
<p dir="auto"><strong>Issue details/Repro steps</strong>:</p>
<p dir="auto"><strong>Glide load line</strong>:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Glide.with(context)...;"><pre class="notranslate"><code class="notranslate">Glide.with(context)...;
</code></pre></div>
<p dir="auto"><strong>Stack trace</strong>:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="paste stack trace here
E/AndroidRuntime﹕ FATAL EXCEPTION: main
    java.lang.NullPointerException
            at com.bumptech.glide.load.engine.GlideException$IndentedAppendable.append(GlideException.java:202)
            at com.bumptech.glide.load.engine.GlideException.appendExceptionMessage(GlideException.java:142)
            at com.bumptech.glide.load.engine.GlideException.appendCausesWrapped(GlideException.java:175)
            at com.bumptech.glide.load.engine.GlideException.appendCauses(GlideException.java:153)
            at com.bumptech.glide.load.engine.GlideException.printStackTrace(GlideException.java:126)
            at com.bumptech.glide.load.engine.GlideException.appendCausesWrapped(GlideException.java:173)
            at com.bumptech.glide.load.engine.GlideException.appendCauses(GlideException.java:153)
            at com.bumptech.glide.load.engine.GlideException.printStackTrace(GlideException.java:126)
            at com.bumptech.glide.load.engine.GlideException.appendCausesWrapped(GlideException.java:173)
            at com.bumptech.glide.load.engine.GlideException.appendCauses(GlideException.java:153)
            at com.bumptech.glide.load.engine.GlideException.printStackTrace(GlideException.java:126)
            at com.bumptech.glide.load.engine.GlideException.printStackTrace(GlideException.java:121)
            at android.util.Log.getStackTraceString(Log.java:319)
            at android.util.Log.w(Log.java:191)
            at com.bumptech.glide.request.SingleRequest.onLoadFailed(SingleRequest.java:488)
            at com.bumptech.glide.load.engine.EngineJob.handleExceptionOnMainThread(EngineJob.java:250)
            at com.bumptech.glide.load.engine.EngineJob.access$200(EngineJob.java:23)
            at com.bumptech.glide.load.engine.EngineJob$MainThreadCallback.handleMessage(EngineJob.java:279)
            at android.os.Handler.dispatchMessage(Handler.java:95)
            at android.os.Looper.loop(Looper.java:137)
            at android.app.ActivityThread.main(ActivityThread.java:5168)
            at java.lang.reflect.Method.invokeNative(Native Method)
            at java.lang.reflect.Method.invoke(Method.java:511)
            at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:797)
            at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:564)
            at dalvik.system.NativeStart.main(Native Method)"><pre class="notranslate"><code class="notranslate">paste stack trace here
E/AndroidRuntime﹕ FATAL EXCEPTION: main
    java.lang.NullPointerException
            at com.bumptech.glide.load.engine.GlideException$IndentedAppendable.append(GlideException.java:202)
            at com.bumptech.glide.load.engine.GlideException.appendExceptionMessage(GlideException.java:142)
            at com.bumptech.glide.load.engine.GlideException.appendCausesWrapped(GlideException.java:175)
            at com.bumptech.glide.load.engine.GlideException.appendCauses(GlideException.java:153)
            at com.bumptech.glide.load.engine.GlideException.printStackTrace(GlideException.java:126)
            at com.bumptech.glide.load.engine.GlideException.appendCausesWrapped(GlideException.java:173)
            at com.bumptech.glide.load.engine.GlideException.appendCauses(GlideException.java:153)
            at com.bumptech.glide.load.engine.GlideException.printStackTrace(GlideException.java:126)
            at com.bumptech.glide.load.engine.GlideException.appendCausesWrapped(GlideException.java:173)
            at com.bumptech.glide.load.engine.GlideException.appendCauses(GlideException.java:153)
            at com.bumptech.glide.load.engine.GlideException.printStackTrace(GlideException.java:126)
            at com.bumptech.glide.load.engine.GlideException.printStackTrace(GlideException.java:121)
            at android.util.Log.getStackTraceString(Log.java:319)
            at android.util.Log.w(Log.java:191)
            at com.bumptech.glide.request.SingleRequest.onLoadFailed(SingleRequest.java:488)
            at com.bumptech.glide.load.engine.EngineJob.handleExceptionOnMainThread(EngineJob.java:250)
            at com.bumptech.glide.load.engine.EngineJob.access$200(EngineJob.java:23)
            at com.bumptech.glide.load.engine.EngineJob$MainThreadCallback.handleMessage(EngineJob.java:279)
            at android.os.Handler.dispatchMessage(Handler.java:95)
            at android.os.Looper.loop(Looper.java:137)
            at android.app.ActivityThread.main(ActivityThread.java:5168)
            at java.lang.reflect.Method.invokeNative(Native Method)
            at java.lang.reflect.Method.invoke(Method.java:511)
            at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:797)
            at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:564)
            at dalvik.system.NativeStart.main(Native Method)
</code></pre></div>