NR Android client dies if idling in the background too long.
Page 1 of 1

Author:  amcadory [ Thu Nov 01, 2012 9:23 pm ]
Post subject:  NR Android client dies if idling in the background too long.

As the topic says, the NR Android client dies if idling in the background too long due to Android's memory management automatically killing apps to keep memory free. This wouldn't be an issue if not for the fact that NR is basically ALWAYS in the background because it's a VPN client - i.e. you launch it, connect, forward a port, and then forget it and don't access it again unless you need to change your forward. The usage pattern for this app, basically, all but guarantees that it will be killed prematurely by the OS.

The CORRECT solution to this, or ANY android app that runs in the background 90% of the time, is to run it as an Android SERVICE rather than a normal foreground app. Why NR doesn't work this way is beyond me.

In an effort to fix this, I'm now trying my third different memory manager to attempt to keep all my memory free all the time with NR set with a -17 (never kill) process priority and/or in the memory manager's ignore list. For whatever reason, the process priority doesn't stick, and whilst the other memory manager won't kill apps in its ignore list, the OS itself does so anyway.

These solutions seem to extend the time before NR is killed from 15 minutes to around 45 minutes, but I want NR running, in the background, without my intervention, 24/7, as I suspect many users do. These efforts are, even if they worked, stop gap solutions for a problem that desperately needs to be fixed within NR itself.

I have emailed with NR support previously about this. I was provided with an alternate build to try that STILL doesn't run NR, even partially, as an android service. It does seem to list the client as a "permanent" host in the Network Config tool on windows, meaning I can rename it so I don't have 2 android devices both named "localhost" so it DOES help, but it does NOT fix the issue I actually have with the constant closing in the background. Can someone please, PLEASE create a build of the NR client that ACTUALLY runs the NR client as a SERVICE, not anything else, just RUNS IT AS A SERVICE, to fix this once and for all?

Author:  amcadory [ Thu Nov 01, 2012 9:47 pm ]
Post subject:  Re: NR Android client dies if idling in the background too long.

Also worth noting that, when it dies, the icon remains in the Notification Panel. Upon clicking this icon, it simply goes away. Some observation from my desktop shows that it is still listed as "connected" until I click the icon, yet both SSH/ConnectBot AND Quassel (an IRC Client) die at the same time, 15-20 minutes after I leave NeoRouter without returning to its window. Trying to reconnect both ConnectBot and Quassel fail. Then, then I click the NR Icon in the Notification Area, the icon simply goes away, and it then finally shows as offline on my desktop. Upon relaunching NR, signing in, and forwarding the port for SSH, ConnectBot and Quassel can reconnect immediately.

So...perhaps NR Client is running two separate processes (though, again, neither is a proper android system Service) and the process for the actual networking is dying, then when I try to load the GUI from the Notification Icon, it is dying because its underlying process is dead. This is just a guess because my memory manager does indicate that NR is running "2 processes" but again, the Android System Settings panel lists none under Services.

So...perhaps the solution is to put this underlying background process as an Android Service, and leave the GUI as-is, since it is not being killed for the Notification Icon (which seems to make most apps immune to death by OS memory management, heh.)

Author:  luke [ Fri Nov 02, 2012 7:40 am ]
Post subject:  Re: NR Android client dies if idling in the background too long.

hi amcadory,

Thanks for reporting the issue. We had fixed this issue by making NR service sticky. The fix has not yet been released.
Before our next release is available, please try this private build: ... id-arm.apk. Let me know if you need NRPro build.


Author:  amcadory [ Fri Nov 02, 2012 2:48 pm ]
Post subject:  Re: NR Android client dies if idling in the background too long.

This is the exact same 3300 build I was emailed to try 2 months ago. Nevertheless, I installed it over the 3300 build I have been trying for 2 months, and the problem persists.

I do, however, now notice that it does have a service listed. So, I went in and manually killed only the NRClient service, and the icon remained in my notification area. During this time, with the icon there but the service killed, my dekstop continued to show my tablet (and phone, both android) as online. Upon clicking the icon, as expected, the GUI of the client died and the icon went away, and on my desktop it then finally shows as offline.

So I was mistaken, now it IS a service, however as I expected, the service is dying in the background even though the GUI client keeps running, until you attempt to bring the GUI client to the foreground, when it then dies too.

Author:  xmichael [ Tue May 21, 2013 4:10 am ]
Post subject:  Re: NR Android client dies if idling in the background too long.

The problem persists for me: Samsung Galaxy Nexus with Android 4.2.2 using NeoRouter Free version The client silently crashes when running some time in background.

Page 1 of 1 All times are UTC - 5 hours
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group

Fatal error: Not able to open ./cache/data_global.php in C:\NeoRouterWebsite\htdocs2\nrweb\forum\includes\acm\acm_file.php on line 106