threema-ch / threema-web

The Threema Web application.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cannot send video (java.lang.NullPointerException)

ovalseven8 opened this issue · comments

Bug Description

Wanted to send a video (.mp4; ~ 2 MiB) to a contact. However, it does not work and I get the following error:
Bildschirmfoto vom 2019-12-20 10-49-24

I've sent the video to *SUPPORT (perhaps it helps with debugging). Note that sending as file works, but not sending as video.

Steps to Reproduce (for bugs)

Bildschirmfoto vom 2019-12-20 10-50-11

App logs:

Fri Dec 20 10:45:47 GMT+01:00 2019	INFO  Bb: acquireConnection: source = wc.createMessage, refCount = 2
Fri Dec 20 10:45:47 GMT+01:00 2019	INFO  Bb: another connection is already active
Fri Dec 20 10:45:47 GMT+01:00 2019	WARN  Jd: Metadata retriever does not provide video dimensions. width 0 height 0
Fri Dec 20 10:45:47 GMT+01:00 2019	ERROR u: Unable to create video thumbnail
Fri Dec 20 10:45:47 GMT+01:00 2019	ERROR D: Exception
java.lang.NullPointerException: Attempt to invoke virtual method 'int ch.threema.storage.models.a.g()' on a null object reference
	at ch.threema.app.webclient.services.instance.message.receiver.D.a(SourceFile:15)
	at ch.threema.app.webclient.services.instance.message.receiver.D.c(SourceFile:5)
	at ch.threema.app.webclient.services.instance.e.a(SourceFile:4)
	at ch.threema.app.webclient.services.instance.r.a(SourceFile:44)
	at ch.threema.app.webclient.services.instance.q.a(SourceFile:4)
	at ch.threema.app.webclient.services.instance.b.run(lambda)
	at android.os.Handler.handleCallback(Handler.java:746)
	at android.os.Handler.dispatchMessage(Handler.java:95)
	at android.os.Looper.loop(Looper.java:148)
	at android.os.HandlerThread.run(HandlerThread.java:61)

Fri Dec 20 10:45:47 GMT+01:00 2019	WARN  D: Respond message create failed (internalError)
Fri Dec 20 10:45:47 GMT+01:00 2019	INFO  o: 2/CONNECTED: Sending message through data channel (async)
Fri Dec 20 10:45:47 GMT+01:00 2019	INFO  Bb: releaseConnectionLinger: source = wc.createMessage, timeout = 5000
Fri Dec 20 10:45:51 GMT+01:00 2019	INFO  Bb: releaseConnectionLinger: source = activityPaused, timeout = 60000
Fri Dec 20 10:45:51 GMT+01:00 2019	INFO  Bb: Alarm type 1 cancel
Fri Dec 20 10:45:51 GMT+01:00 2019	INFO  Bb: Alarm type 1 schedule in 59972ms
Fri Dec 20 10:45:52 GMT+01:00 2019	INFO  ThreemaApplication: *** Lifecycle: App now paused
Fri Dec 20 10:45:52 GMT+01:00 2019	INFO  ThreemaApplication: *** Lifecycle: App now hidden
Fri Dec 20 10:46:20 GMT+01:00 2019	INFO  Bb: acquireConnection: source = wc.createMessage, refCount = 1
Fri Dec 20 10:46:20 GMT+01:00 2019	INFO  Bb: another connection is already active
Fri Dec 20 10:46:20 GMT+01:00 2019	WARN  Jd: Metadata retriever does not provide video dimensions. width 0 height 0
Fri Dec 20 10:46:20 GMT+01:00 2019	ERROR u: Unable to create video thumbnail
Fri Dec 20 10:46:20 GMT+01:00 2019	ERROR D: Exception
java.lang.NullPointerException: Attempt to invoke virtual method 'int ch.threema.storage.models.a.g()' on a null object reference
	at ch.threema.app.webclient.services.instance.message.receiver.D.a(SourceFile:15)
	at ch.threema.app.webclient.services.instance.message.receiver.D.c(SourceFile:5)
	at ch.threema.app.webclient.services.instance.e.a(SourceFile:4)
	at ch.threema.app.webclient.services.instance.r.a(SourceFile:44)
	at ch.threema.app.webclient.services.instance.q.a(SourceFile:4)
	at ch.threema.app.webclient.services.instance.b.run(lambda)
	at android.os.Handler.handleCallback(Handler.java:746)
	at android.os.Handler.dispatchMessage(Handler.java:95)
	at android.os.Looper.loop(Looper.java:148)
	at android.os.HandlerThread.run(HandlerThread.java:61)

Fri Dec 20 10:46:20 GMT+01:00 2019	WARN  D: Respond message create failed (internalError)
Fri Dec 20 10:46:20 GMT+01:00 2019	INFO  o: 2/CONNECTED: Sending message through data channel (async)
Fri Dec 20 10:46:20 GMT+01:00 2019	INFO  Bb: releaseConnectionLinger: source = wc.createMessage, timeout = 5000
Fri Dec 20 10:46:35 GMT+01:00 2019	INFO  ThreemaApplication: *** Lifecycle: App now visible
Fri Dec 20 10:46:35 GMT+01:00 2019	INFO  Bb: acquireConnection: source = activityResumed, refCount = 1

Your Environment

  • Threema Web version: 2.3.1
  • Threema App version: 4.22 (Android)
  • Browser name and version: Firefox 71
  • Computer operating system: Linux
  • Smartphone operating system and version: Android 6

The Android app uses several ways to get a thumbnail of the video including attempting to render a frame via the MediaMetadataRetriever. In the unlikely event that everything else fails (what seems to be the case here), it falls back to a default icon. Due to a bug, this default icon was not generated on older Android versions. This has been fixed now. Expect the fix in the next major release of the app.