Xibo Android crash while using it with a custom resolution

Hi,

A bug that is quite ennoying for us.

Xibo is working great with some custom resolution (10241280, 320360 portrait…) but it’s quite often that the app send us an error message with “xibo has crashed” but the app continues to work when you click “ok”.

I think the issue is caused by the rotation, the xmr thread cannot discuss with something because the something is closed by the rotation, and this cause a crash.

Without this message, everything seems to work. Here are the logs.

Android R106, CMS 1.8.9

Logcat

06-07 15:11:01.635 W/System.err(2352): java.nio.channels.ClosedByInterruptException
06-07 15:11:01.635 W/System.err(2352): at java.nio.channels.spi.AbstractInterruptibleChannel.end(AbstractInterruptibleChannel.java:113)
06-07 15:11:01.635 W/System.err(2352): at java.nio.SocketChannelImpl.writeImpl(SocketChannelImpl.java:406)
06-07 15:11:01.635 W/System.err(2352): at java.nio.SocketChannelImpl.write(SocketChannelImpl.java:361)
06-07 15:11:01.635 W/System.err(2352): at java.nio.PipeImpl$PipeSinkChannel.write(PipeImpl.java:114)
06-07 15:11:01.635 W/System.err(2352): at d.p.b(Signaler.java:98)
06-07 15:11:01.635 W/System.err(2352): at d.h.a(Mailbox.java:71)
06-07 15:11:01.635 W/System.err(2352): at d.d.a(Ctx.java:517)
06-07 15:11:01.635 W/System.err(2352): at d.z.b(ZObject.java:382)
06-07 15:11:01.635 W/System.err(2352): at d.z.a(ZObject.java:185)
06-07 15:11:01.635 W/System.err(2352): at d.z.d(ZObject.java:175)
06-07 15:11:01.635 W/System.err(2352): at d.n.a(Own.java:115)
06-07 15:11:01.636 W/System.err(2352): at d.q.a(SocketBase.java:590)
06-07 15:11:01.636 W/System.err(2352): at d.q.b(SocketBase.java:582)
06-07 15:11:01.636 W/System.err(2352): at org.b.e.a(ZMQ.java:2531)
06-07 15:11:01.636 W/System.err(2352): at uk.org.xibo.xmr.a.run(Subscriber.java:69)
06-07 15:11:01.636 E/Subscriber(2352): Unable to start XMR queue: class d.v/java.nio.channels.ClosedByInterruptException
06-07 15:11:01.639 W/System.err(2352): java.nio.channels.ClosedByInterruptException
06-07 15:11:01.640 W/System.err(2352): at java.nio.channels.spi.AbstractInterruptibleChannel.end(AbstractInterruptibleChannel.java:113)
06-07 15:11:01.640 W/System.err(2352): at java.nio.SocketChannelImpl.writeImpl(SocketChannelImpl.java:406)
06-07 15:11:01.640 W/System.err(2352): at java.nio.SocketChannelImpl.write(SocketChannelImpl.java:361)
06-07 15:11:01.640 W/System.err(2352): at java.nio.PipeImpl$PipeSinkChannel.write(PipeImpl.java:114)
06-07 15:11:01.640 W/System.err(2352): at d.p.b(Signaler.java:98)
06-07 15:11:01.640 W/System.err(2352): at d.h.a(Mailbox.java:71)
06-07 15:11:01.640 W/System.err(2352): at d.d.a(Ctx.java:517)
06-07 15:11:01.640 W/System.err(2352): at d.z.b(ZObject.java:382)
06-07 15:11:01.640 W/System.err(2352): at d.z.d(ZObject.java:276)
06-07 15:11:01.640 W/System.err(2352): at d.q.o(SocketBase.java:865)
06-07 15:11:01.640 W/System.err(2352): at org.b.e.close(ZMQ.java:479)
06-07 15:11:01.640 W/System.err(2352): at org.b.a.a(ZContext.java:149)
06-07 15:11:01.640 W/System.err(2352): at org.b.a.a(ZContext.java:103)
06-07 15:11:01.640 W/System.err(2352): at org.b.a.close(ZContext.java:315)
06-07 15:11:01.640 W/System.err(2352): at uk.org.xibo.xmr.a.run(Subscriber.java:113)
06-07 15:11:01.640 E/AndroidRuntime(2352): FATAL EXCEPTION: Thread-177
06-07 15:11:01.640 E/AndroidRuntime(2352): Process: uk.org.xibo.client:xmr, PID: 2352
06-07 15:11:01.640 E/AndroidRuntime(2352): d.v: java.nio.channels.ClosedByInterruptException
06-07 15:11:01.640 E/AndroidRuntime(2352): at d.p.b(Signaler.java:102)
06-07 15:11:01.640 E/AndroidRuntime(2352): at d.h.a(Mailbox.java:71)
06-07 15:11:01.640 E/AndroidRuntime(2352): at d.d.a(Ctx.java:517)
06-07 15:11:01.640 E/AndroidRuntime(2352): at d.z.b(ZObject.java:382)
06-07 15:11:01.640 E/AndroidRuntime(2352): at d.z.d(ZObject.java:276)
06-07 15:11:01.640 E/AndroidRuntime(2352): at d.q.o(SocketBase.java:865)
06-07 15:11:01.640 E/AndroidRuntime(2352): at org.b.e.close(ZMQ.java:479)
06-07 15:11:01.640 E/AndroidRuntime(2352): at org.b.a.a(ZContext.java:149)
06-07 15:11:01.640 E/AndroidRuntime(2352): at org.b.a.a(ZContext.java:103)
06-07 15:11:01.640 E/AndroidRuntime(2352): at org.b.a.close(ZContext.java:315)
06-07 15:11:01.640 E/AndroidRuntime(2352): at uk.org.xibo.xmr.a.run(Subscriber.java:113)
06-07 15:11:01.640 E/AndroidRuntime(2352): Caused by: java.nio.channels.ClosedByInterruptException
06-07 15:11:01.640 E/AndroidRuntime(2352): at java.nio.channels.spi.AbstractInterruptibleChannel.end(AbstractInterruptibleChannel.java:113)
06-07 15:11:01.640 E/AndroidRuntime(2352): at java.nio.SocketChannelImpl.writeImpl(SocketChannelImpl.java:406)
06-07 15:11:01.640 E/AndroidRuntime(2352): at java.nio.SocketChannelImpl.write(SocketChannelImpl.java:361)
06-07 15:11:01.640 E/AndroidRuntime(2352): at java.nio.PipeImpl$PipeSinkChannel.write(PipeImpl.java:114)
06-07 15:11:01.640 E/AndroidRuntime(2352): at d.p.b(Signaler.java:98)
06-07 15:11:01.640 E/AndroidRuntime(2352): … 10 more
06-07 15:11:01.702 D/WindowStateAnimator(600): rk_debug2 Application Error: uk.org.xibo.client_Force_To_Dual
06-07 15:11:01.704 D/gralloc (186): Isfb=0, [1024,36,1024,4096], fmt=1, byte_stride=4096
06-07 15:11:01.709 D/gralloc (186): Isfb=0, [1024,72,1024,4096], fmt=1, byte_stride=4096
06-07 15:11:01.736 I/OpenGLRenderer(600): Initialized EGL, version 1.4
06-07 15:11:01.740 E/XmrMessageReceiver(2323): java.nio.channels.ClosedByInterruptException
06-07 15:11:01.742 D/Surface (600): Surface::final mReqUsage=a00
06-07 15:11:01.742 D/mali_winsys(600): EGLint new_window_surface(egl_winsys_display*, void*, EGLSurface, EGLConfig, egl_winsys_surface**, egl_color_buffer_format*, EGLBoolean) returns 0x3000
06-07 15:11:01.746 I/ActivityManager(600): Displayed uk.org.xibo.client/uk.org.xibo.player.Player: +922ms
06-07 15:11:01.746 D/gralloc (186): Isfb=0, [915,309,928,3712], fmt=1, byte_stride=3712
06-07 15:11:01.751 D/gralloc (186): Isfb=0, [915,309,928,3712], fmt=1, byte_stride=3712
06-07 15:11:01.756 D/gralloc (186): Isfb=0, [915,309,928,3712], fmt=1, byte_stride=3712
06-07 15:11:01.821 D/WifiService(600): New client listening to asynchronous messages
06-07 15:11:02.380 I/RTW_CMD_THREAD(1156): type=1400 audit(0.0:54): avc: denied { create } for scontext=u:r:kernel:s0 tcontext=u:r:kernel:s0 tclass=netlink_route_socket permissive=1
06-07 15:11:02.966 D/WifiStateMachine(600): starting scan for “Livebox-18D0"WPA_PSK with 2462
06-07 15:11:02.968 D/Tethering(600): interfaceLinkStateChanged wlan0, true
06-07 15:11:02.968 D/Tethering(600): interfaceStatusChanged wlan0, true
06-07 15:11:03.107 I/HdmiControlService(600): HdmiControlService36
06-07 15:11:03.107 I/HdmiControlService(600): sendCecCommand->HdmiControlService35
06-07 15:11:03.107 I/HdmiControlService(600): sendCecCommand->valid message type
06-07 15:11:03.100 I/system_server(663): type=1400 audit(0.0:55): avc: denied { ioctl } for comm=48646D6920436F6E74726F6C20496F path=”/dev/cec" dev=“tmpfs” ino=1156 ioctlcmd=4e07 scontext=u:r:system_server:s0 tcontext=u:object_r:device:s0 tclass=chr_file permissive=1
06-07 15:11:03.107 I/HdmiCecController(600): sendCommand->cecMessage: src: 4, dst: 0
06-07 15:11:03.107 I/HdmiCecController(600): sendCommand->body: src: 4, dst: 0
06-07 15:11:03.107 I/hdmicec (600): int hdmi_cec_send_message(const hdmi_cec_device*, const cec_message_t*)
06-07 15:11:03.112 I/hdmicec (600): int hdmi_cec_send_message(const hdmi_cec_device*, const cec_message_t*)
06-07 15:11:03.128 I/HdmiCecController(600): sendCommand->finalError:2
06-07 15:11:03.128 W/HdmiCecController(600): Failed to send src: 4, dst: 0
06-07 15:11:03.514 I/art (600): Starting a blocking GC Explicit
06-07 15:11:03.553 I/art (600): Explicit concurrent mark sweep GC freed 15213(1002KB) AllocSpace objects, 4(80KB) LOS objects, 33% free, 6MB/9MB, paused 761us total 38.443ms
06-07 15:11:03.971 I/Process (2352): Sending signal. PID: 2352 SIG: 9
06-07 15:11:03.972 D/AudioHardwareTiny(229): start_output_stream
06-07 15:11:03.972 D/AudioHardwareTiny(229): card 0 , device 0 : HDMI
06-07 15:11:03.973 D/AudioHardwareTiny(229): The current HDMI is DVI mode
06-07 15:11:03.960 I/kworker/u8:5(2394): type=1400 audit(0.0:56): avc: denied { execute_no_trans } for path="/system/bin/jack_auto_switch.sh" dev=“mmcblk0p10” ino=244 scontext=u:r:kernel:s0 tcontext=u:object_r:system_file:s0 tclass=file permissive=1
06-07 15:11:03.980 D/OpenGLRenderer(600): endAllStagingAnimators on 0xb82cf890 (RippleDrawable) with handle 0xb8021fd0
06-07 15:11:03.990 I/su (2395): type=1400 audit(0.0:57): avc: denied { connectto } for path=0065752E636861696E666972652E73757065727375 scontext=u:r:kernel:s0 tcontext=u:r:init:s0 tclass=unix_stream_socket permissive=1
06-07 15:11:04.011 W/InputMethodManagerService(600): Window already focused, ignoring focus gain of: com.android.internal.view.IInputMethodClient$Stub$Proxy@1b159df attribute=null, token = android.os.BinderProxy@bfbefff
06-07 15:11:04.072 I/ActivityManager(600): Process uk.org.xibo.client:xmr (pid 2352) has died
06-07 15:11:04.073 W/ActivityManager(600): Scheduling restart of crashed service uk.org.xibo.client/uk.org.xibo.xmr.XmrSubscriberService in 5182ms
06-07 15:11:04.168 W/AppOps (600): Finishing op nesting under-run: uid 1000 pkg android code 24 time=0 duration=0 nesting=0
06-07 15:11:04.676 D/AudioHardwareTiny(229): close device
06-07 15:11:05.107 I/HdmiControlService(600): HdmiControlService36
06-07 15:11:05.107 I/HdmiControlService(600): sendCecCommand->HdmiControlService35
06-07 15:11:05.107 I/HdmiControlService(600): sendCecCommand->valid message type
06-07 15:11:05.108 I/HdmiCecController(600): sendCommand->cecMessage: src: 4, dst: 0
06-07 15:11:05.108 I/HdmiCecController(600): sendCommand->body: src: 4, dst: 0
06-07 15:11:05.108 I/hdmicec (600): int hdmi_cec_send_message(const hdmi_cec_device*, const cec_message_t*)
06-07 15:11:05.112 I/hdmicec (600): int hdmi_cec_send_message(const hdmi_cec_device*, const cec_message_t*)
06-07 15:11:05.129 I/HdmiCecController(600): sendCommand->finalError:2
06-07 15:11:05.129 W/HdmiCecController(600): Failed to send src: 4, dst: 0
06-07 15:11:06.662 I/ActivityManager(600): START u0 {act=com.android.systemui.recents.SHOW_RECENTS flg=0x10804000 cmp=com.android.systemui/.recents.RecentsActivity} from uid 10014 on display 0
06-07 15:11:06.672 D/AudioHardwareTiny(229): start_output_stream
06-07 15:11:06.672 D/AudioHardwareTiny(229): card 0 , device 0 : HDMI
06-07 15:11:06.673 D/AudioHardwareTiny(229): The current HDMI is DVI mode
06-07 15:11:06.674 D/Surface (186): Surface::final mReqUsage=333
06-07 15:11:06.681 D/gralloc (186): Isfb=0, [540,540,544,2176], fmt=1, byte_stride=2176
06-07 15:11:06.837 D/WindowStateAnimator(600): rk_debug2 com.android.systemui/com.android.systemui.recents.RecentsActivity_Force_To_Dual
06-07 15:11:06.847 D/Surface (717): Surface::final mReqUsage=a00
06-07 15:11:06.847 D/mali_winsys(717): EGLint new_window_surface(egl_winsys_display*, void*, EGLSurface, EGLConfig, egl_winsys_surface**, egl_color_buffer_format*, EGLBoolean) returns 0x3000
06-07 15:11:06.857 D/gralloc (186): Isfb=0, [1024,1280,1024,4096], fmt=1, byte_stride=4096
06-07 15:11:06.863 D/gralloc (186): Isfb=0, [1024,1280,1024,4096], fmt=1, byte_stride=4096
06-07 15:11:06.868 D/gralloc (186): Isfb=0, [1024,1280,1024,4096], fmt=1, byte_stride=4096
06-07 15:11:06.925 D/Surface (600): Surface::final mReqUsage=33
06-07 15:11:06.927 D/gralloc (186): Isfb=0, [841,81,848,3392], fmt=1, byte_stride=3392
06-07 15:11:07.108 I/HdmiControlService(600): HdmiControlService36
06-07 15:11:07.108 I/HdmiControlService(600): sendCecCommand->HdmiControlService35
06-07 15:11:07.108 I/HdmiControlService(600): sendCecCommand->valid message type
06-07 15:11:07.108 I/HdmiCecController(600): sendCommand->cecMessage: src: 4, dst: 0
06-07 15:11:07.108 I/HdmiCecController(600): sendCommand->body: src: 4, dst: 0
06-07 15:11:07.108 I/hdmicec (600): int hdmi_cec_send_message(const hdmi_cec_device*, const cec_message_t*)
06-07 15:11:07.112 I/hdmicec (600): int hdmi_cec_send_message(const hdmi_cec_device*, const cec_message_t*)
06-07 15:11:07.130 I/HdmiCecController(600): sendCommand->finalError:2
06-07 15:11:07.130 W/HdmiCecController(600): Failed to send src: 4, dst: 0
06-07 15:11:07.386 D/AudioHardwareTiny(229): close device

I assume this is the same problem as we discussed via private messages? started from this topic Error toast with Xibo's Android app

If so could you please get back to me via pm regarding the XMR tests (ie with it disabled on the apk we’ve sent to you).

Hi @Peter :slight_smile:

It’s not the same issue, it’s for another case and the logs are different too. But I will try without xmr right now and tell you if the issue still happens.

This issue is not as critical as the other one, but this is would be great if it was working as intended :slight_smile:

ok, I shall have a look at these logs too in this case!

No issue without the XMR (I added DISABLED in “Display profil” and made a few reboots of the app and the device), I’ll try some stress tests to make sure it doesn’t happen anymore

I see, the root cause of the problem seems similar to the other issue we discussed earlier.

Could you please confirm for me the device’s details (mark, model, android version)?

Oh.

Tinker board, Android 6.0.1 (Core 3.10.0), patch 05/07/16

CPU : RK3288
RAM : 2G
ROM : 16G

I thought this was a different issue, sorry about that

It is slightly different, but the problem that is causing it seems to be the same.

thank you for the details

In both this and your other issue we’ve not been able to isolate why the exception being raised would cause the app crash message to be shown. As far as we’re aware you’re the only person to have this issue so far.

This log message is our application successfully catching the fact that the thread is being interrupted, we then do 2 further things:

  • send a broadcast back to the main player activity with the error message (for logging purposes)
  • close the socket we had open

Perhaps the second bit is unnecessary - I will try to rework that logic and ask Peter to provide you with another APK to test.