HABPanelViewer 0.9.27

I’ve just upgraded to 0.9.26 and unfortunately it crashes upon opening now on my old Samsung Tab 3 8.0

On reinstalling I get the wizard, choose my Openhab install (which is correctly detected) but then I just get the “Unfortunately this app has stopped” error.

Any ideas how I can diagnose this?

Thanks

Check the wiki for instructions in how to get an adb log. Which Android version is on your device?

Thanks for looking

I’ve PMed you an ADB log - there is a stacktrace in there

The Android version is 4.4.2

Starting from HPV 0.9.26, Android 5 is required to run HPV. Otherwise the app will crash on start.

As I was also seeing unresponsiveness of the webview when the device turned on after a period of inactivity, I have added a preference entry allowing to pause the webview when the device is turned off. It internally does load about:blank when the screen is turned off and then loads the previous url when the device is turned back on.

It would be nice if people having these symptoms could test it and report if there are any problems with this version:
https://github.com/vbier/habpanelviewer/raw/pauseWebview/app-debug.apk

I tested it on my Fire7. Until now I had the workflow you described implemented in rules (save current URL, set to about:blank, dim screen, on screen on reload URL). With the version you provided this is now working without this rules, but it is very slow. When I wake the device it takes about 15 seconds for it to show the actual state of the last URL. When I do this with the rules it only takes about 5 seconds (I only tested this with the previous version). So for now I’m staying with the previous version and use the rules for it.

Do you only dim the screen or do you turn it off? I only tested turning it off and loading was nearly instantaneous when the device turned on again. How long does it normally take to load the page on your device?

I only dim the screen, because when I turn it off I can’t turn it on with a touch. As I already mentioned reloading the page via the rules takes about 5 seconds. With the new version the page is shown instantly, but the clock on the top right shows the time when I dimmed it and it takes about 10 to 15 seconds to go to the current time (and state).

Have you enabled the preference? It sounds as if it does not reload at all. I can test with dim tomorrow, it ist possible that it does not work when dimming.

What preference do I have to enable? You didn’t mention I have to enable something first.

See above. It is in the Browser category.

I’m sorry, It seems I’ve overlooked that. I reinstalled the new version, but I can’t find the mentioned option in the browser section.

It should be the second entry, “Pause webview…”. But most likely it is not going to work with dimming. Wait until I have checked that. I will most likely update the APK later today to support dimming.

1 Like

I am facing also problems with unresponsiveness long time now. I have try the new build but also I don’t see this option pause website.

Sorry guys. Not sure how i did this, but it looks like the apk was generated in the wrong branch. I have now updated the apk again and made the preference work when dimming. You can download it from the same URL.

Now I see this option and it seems to be working. When I wake the device the screen is white and after some time the last page is loaded. It takes about the same time to load the page as it did before using rules, so this looks good to me. Thank you very much.

The same for me also. I must check it more time. Special morning that tablet is all the night off.
Thanks

I came to find a a solution to this problem 2 hours after you posted the solution. Many thanks!

It does seem to work well. However, I do get some error popups about text relocations, most of which don’t get mentioned in the debug log, except for this specific line at the end of this block:

04-22 01:28:58.981 12712 12712 I am_on_stop_called: [0,de.vier_bier.habpanelviewer.MainActivity,sleeping]
04-22 01:28:59.026 12712 12712 E WindowManager:
04-22 01:28:59.026 12712 12712 E WindowManager: android.view.WindowLeaked: Activity de.vier_bier.habpanelviewer.StartActivity has leaked window DecorView@7b1c987[] that was originally added here
04-22 01:28:59.026 12712 12712 E WindowManager: at android.view.ViewRootImpl.<init>(ViewRootImpl.java:418)
04-22 01:28:59.026 12712 12712 E WindowManager: at android.view.WindowManagerGlobal.addView(WindowManagerGlobal.java:331)
04-22 01:28:59.026 12712 12712 E WindowManager: at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:94)
04-22 01:28:59.026 12712 12712 E WindowManager: at android.app.Dialog.show(Dialog.java:329)
04-22 01:28:59.026 12712 12712 E WindowManager: at android.app.AlertDialog$Builder.show(AlertDialog.java:1112)
04-22 01:28:59.026 12712 12712 E WindowManager: at android.app.Activity.performStart(Activity.java:6723)
04-22 01:28:59.026 12712 12712 E WindowManager: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2647)
04-22 01:28:59.026 12712 12712 E WindowManager: at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2751)
04-22 01:28:59.026 12712 12712 E WindowManager: at android.app.ActivityThread.-wrap12(ActivityThread.java)
04-22 01:28:59.026 12712 12712 E WindowManager: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1496)
04-22 01:28:59.026 12712 12712 E WindowManager: at android.os.Handler.dispatchMessage(Handler.java:102)
04-22 01:28:59.026 12712 12712 E WindowManager: at android.os.Looper.loop(Looper.java:154)
04-22 01:28:59.026 12712 12712 E WindowManager: at android.app.ActivityThread.main(ActivityThread.java:6186)
04-22 01:28:59.026 12712 12712 E WindowManager: at java.lang.reflect.Method.invoke(Native Method)
04-22 01:28:59.026 12712 12712 E WindowManager: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:889)
04-22 01:28:59.026 12712 12712 E WindowManager: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:779)
04-22 01:28:59.029 12712 12712 D HPV-NetworkTracker: network broadcast received
04-22 01:28:59.030 12712 12712 D HPV-NetworkTracker: network is active: [type: WIFI[], state: CONNECTED/CONNECTED, reason: (unspecified), extra: "XXXX", failover: false, available: true, roaming: false, metered: false]
04-22 01:28:59.031 12712 12712 V HPV-ServerConnection: Sending state update for Con_DR_battery: 93
04-22 01:28:59.032 12712 13574 V HPV-ServerConnection: propagating item: Con_DR_volume=1
04-22 01:28:59.038 12712 12712 I Choreographer: Skipped 40 frames!  The application may be doing too much work on its main thread.
04-22 01:28:59.203 12712 13574 V HPV-ServerConnection: propagating item: Con_DR_battery=93
04-22 01:28:59.207 12712 13484 W linker  : /system/vendor/lib/libglslcompiler.so: unused DT entry: type 0xf arg 0x2c7
04-22 01:28:59.208 12712 13484 W linker  : /system/vendor/lib/libglslcompiler.so has text relocations. This is wasting memory and prevents security hardening. Please fix

Is this just from the way you’ve compiled this debug version or could it be something I am missing?

After some test sometimes the white page unload very fast 2 seconds but sometimes after 40seconds.if you need log files let me known.

If I understand this correctly, the problem is in the shared library libglslcompiler.so, which is not part of my app but part of the OS (because it is located in /system/vendor). That is probably the reason why I don’t have these warnings. This can only happen in native code, which I do not have.

I am not sure what I can do about it.