• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Solution for MobileSheetsPro suddenly returning to the library screen
#31
I've been researching potential problems, and one thing that is mentioned is that the arcvm (the VM running Android apps on a Chromebook device) can decide to kill apps to get resources back if it's running low on memory and such. I'm wondering if MobileSheets is using too much memory in some situations (compared to amount of RAM available on the device), resulting in the device deciding to kill/restart it to get resources back. One thing I can try is significantly limiting the amount of memory used for PDFs and such to see if this makes things more stable. This will slow down the loading of some PDFs (particularly larger ones) and increase CPU usage as fewer pages can be cached in memory. That's another thing we can try testing with a build once we've confirmed my theory about the app being restarted.

Mike
Reply
#32
(10-08-2024, 04:45 AM)Zubersoft Wrote: That means that the app was completely restarted, because that popup is the "Loading database" progress dialog. It didn't switch back to the library screen - the OS restarted the app, similar to what I saw when the screen was turned off. That's a horribly bad sign, because if the OS is just restarting the app out of nowhere, it's not like I can stop that in my code... With a test build, we can definitely confirm this theory though. Bluesboy - if you have a Chromebook as well, you'll have to use adb to sideload the app (https://www.howtogeek.com/752759/how-to-...oper-mode/). I just want to confirm that you are okay with this though, because it's a little technical. ChromeOS normally requires all installations to go through Google Play.

Thanks,
Mike

Not a problem. Besides playing a mean harp I'm also a pretty technical guy. I already had the Linux VM setup but not the Android debugging. Just did that. As I said earlier in the thread, I'm running an HP x2 11 Chromebook tablet convertible.
Reply
#33
Maybe a stuppid gues, but could it be that a chromebook sends a keypress (the arrow left key) without really pressing it? When the focus is on MSP it will go back to the Recent screen. And thinkging of that, coudl it be that a connected bleutooth pedal somehow sends a keypress as a sort of keep alive or test which actualy on a chromebook is that left arrow key?
Reply
#34
(10-10-2024, 04:02 AM)jdp72 Wrote: Maybe a stuppid gues, but could it be that a chromebook sends a keypress (the arrow left key) without really pressing it? When the focus is on MSP it will go back to the Recent screen. And thinkging of that, coudl it be that a connected bleutooth pedal somehow sends a keypress as a sort of keep alive or test which actualy on a chromebook is that left arrow key?

Not a stupid guess but, it's been ruled out. I ran tests with both Bluetooth and WiFi turned off and the issue still happened.
Reply
#35
(10-10-2024, 06:42 AM)BluesBoy Wrote:
(10-10-2024, 04:02 AM)jdp72 Wrote: Maybe a stuppid gues, but could it be that a chromebook sends a keypress (the arrow left key) without really pressing it? When the focus is on MSP it will go back to the Recent screen. And thinkging of that, coudl it be that a connected bleutooth pedal somehow sends a keypress as a sort of keep alive or test which actualy on a chromebook is that left arrow key?

Not a stupid guess but, it's been ruled out. I ran tests with both Bluetooth and WiFi turned off and the issue still happened.

Great! And how about something with the local keyboard?
Reply
#36
(10-10-2024, 05:09 PM)jdp72 Wrote:
(10-10-2024, 06:42 AM)BluesBoy Wrote:
(10-10-2024, 04:02 AM)jdp72 Wrote: Maybe a stuppid gues, but could it be that a chromebook sends a keypress (the arrow left key) without really pressing it? When the focus is on MSP it will go back to the Recent screen. And thinkging of that, coudl it be that a connected bleutooth pedal somehow sends a keypress as a sort of keep alive or test which actualy on a chromebook is that left arrow key?

Not a stupid guess but, it's been ruled out. I ran tests with both Bluetooth and WiFi turned off and the issue still happened.

Great! And how about something with the local keyboard?

My Chromebook is an HP x2 11 which is a convertible tablet with removable keyboard. When it is in use in the stand as a sheet music reader the keyboard is not attached. When it is not physically attached there is no way for it to send any signals to the Chromebook (it connects via physical POGO pins).
Reply
#37
I'm sending over a build now to try to gather information.

Thanks,
Mike
Reply
#38
(10-10-2024, 05:57 PM)BluesBoy Wrote:
(10-10-2024, 05:09 PM)jdp72 Wrote:
(10-10-2024, 06:42 AM)BluesBoy Wrote:
(10-10-2024, 04:02 AM)jdp72 Wrote: Maybe a stuppid gues, but could it be that a chromebook sends a keypress (the arrow left key) without really pressing it? When the focus is on MSP it will go back to the Recent screen. And thinkging of that, coudl it be that a connected bleutooth pedal somehow sends a keypress as a sort of keep alive or test which actualy on a chromebook is that left arrow key?

Not a stupid guess but, it's been ruled out. I ran tests with both Bluetooth and WiFi turned off and the issue still happened.

Great! And how about something with the local keyboard?

My Chromebook is an HP x2 11 which is a convertible tablet with removable keyboard. When it is in use in the stand as a sheet music reader the keyboard is not attached. When it is not physically attached there is no way for it to send any signals to the Chromebook (it connects via physical POGO pins).

I use an Asus CB5500 with keyboard attached. But it seems to me its really difficult to find the problem. Yesterday had a rehearsel of 6 hours, not once MS dropped to the library, this morning needed to change something and within 30 minutes it dropped back to the library while doing nothing other than viewing the page which i needed to change on my PC. Great respect to the developer if he could find it!
Reply
#39
From what I've been able to gather so far by working with BluesBoy, the application is being completely restarted the OS. I don't really know why the OS is doing that, but it's not something I can prevent. Having said that, the one guess I have is that maybe MobileSheets is trying to use too much memory, and the OS decides to restart it to reclaim resources, so my next test is going to be to significantly limit the memory usage on chromebook devices (meaning fewer pages will be cached in memory) to see if that prevents the OS from restarting the application randomly.

Mike
Reply
#40
(10-13-2024, 05:15 PM)Zubersoft Wrote: From what I've been able to gather so far by working with BluesBoy, the application is being completely restarted the OS. I don't really know why the OS is doing that, but it's not something I can prevent. Having said that, the one guess I have is that maybe MobileSheets is trying to use too much memory, and the OS decides to restart it to reclaim resources, so my next test is going to be to significantly limit the memory usage on chromebook devices (meaning fewer pages will be cached in memory) to see if that prevents the OS from restarting the application randomly.

Mike

Intersting... I do not know much about application programming, but I know that both Windows and Linux services support a kind of software watchdog, meaning that the service/daemon managers periodically try to decide if the service is still alive and if not restart it. Maybe there is something similar in app app development layer?

if this is reproducable on a Windows device, I suggest reading out the application and system event log and search those for entries matching the time of restart. To do that, simply type "event viewer" in the task bar search box, hit ok if asked whether you want that app to make changes to your system (it will not, just requires admin privileges) and open Windows logs from the list on the left, then scroll through system and application events.
Reply
#41
It is an issue specific to Android, and while a few users have indicated that they've seen it happen in the standard Android version, that seems to be extremely rare. 99% of the reported cases are on Chromebook devices, and applications on ChromeOS are run inside a VM, so there are just a lot of complicated layers.

Mike
Reply
#42
Maybe this might be a step towards an explanation:

Monitor system health  |  Android Open Source Project

Of course, if the apps run inside distinct VMs, then there is also the chance of a VM itself crashing, but I would think that this would be logged somewhere...
Reply
#43
I wanted to provide an update. I've been working with BluesBoy (who has been amazing with helping me test lots of builds), and I was able to identify a pattern: MobileSheets seemed to restart every day around 19:00 on his device. I had added logs for activity lifecycle events, and it showed that a configuration change on the device was causing MobileSheets to forcibly restart (this is the normal behavior for certain configuration changes such as the user changing the primary/active language on their device). I'm still waiting for more information from BluesBoy, but this would point to an automatic system change at 19:00, such as a "night mode" or something on the device that is changing during the night, causing MobileSheets to restart. This means I have two options:

1) It is possible to prevent some configuration changes from restarting the app by indicating that you will handle them yourself in the application configuration. I already do this for things like rotating the device - I handle it in the app instead of the app just restarting (which is the default Android behavior). Once I identify what type of configuration change is occurring, it may be possible to just indicate that I will handle it myself to prevent the restart. 

2) Some configuration changes force an app restart no matter what (such as dynamic color changes which was introduced on Android 12L). In that case, I can just save some information about the last song and setlist that was loaded, and ensure that MobileSheets automatically loads the song or setlist and skips back to the previously viewed page. This won't be seamless, but it would at least prevent the need to manually load things back up.

I'll post back here once BluesBoy has helped me identify what type of configuration change is occurring. I may need to do both #1 and #2 above though, to cover all possible configuration changes.

Mike
Reply
#44
(10-16-2024, 05:52 AM)Zubersoft Wrote:  In that case, I can just save some information about the last song and setlist that was loaded, and ensure that MobileSheets automatically loads the song or setlist and skips back to the previously viewed page. 

Mike
Funny, I had thought about requesting that as a feature anyways before this problem popped up. For me it is typical to have one tune/song/piece open for a good while, so when restarting MSP, to me it would be very natural and time saving if it came up with the same piece I left it with when closing MSP.
Reply




Users browsing this thread:
18 Guest(s)


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2024 MyBB Group.