Page 1 of 1
Automagic 1.24 service restarts sporadically on CM11 M11 ?
Posted: 07 Nov 2014 18:04
by IGY
I have a short startup flow ending with a notification sound. That's how I noticed that Automagic apparently restarts several times per day. There are no errors logged.
This does not cause any problem, but I would like to know whether there is a way that I could identify the cause. Turn on debug logging? Or is this a known issue?
Re: Automagic 1.24 service restarts sporadically on CM11 M11
Posted: 07 Nov 2014 20:25
by Bushmills
I'm suffering from as yet unexplained restarts too, on both CM10.2 and CM11. It was previously thought that the restarts may be related to low memory conditions, but I can by now pretty much exclude that as reason. The restarts seem to cluster around WLAN disconnect, but not exclusively, and its 1.25-dev I'm experiencing them with. Only, I added the startup sound *after* beginning to notice the restarts

And it causes a problem - it sometimes messes up my geofences stuff, especially when the WLAN disconnect is part of it. Interestingly, those restarts occur on one device only, a 2012 Nexus 7, while a handful of different devices don't exhibit likewise problems (among those, two 2013 Nexus 5, others are single board type devices, like Cubieboard or Hackberry, not tested on them a lot)
Re: Automagic 1.24 service restarts sporadically on CM11 M11
Posted: 08 Nov 2014 10:19
by Martin
Hi,
Please ensure that the option
Show status icon is turned on in the preferences of Automagic. This setting ensures that Automagic is not restarted whenever possible. When the device uses a lot of memory for other apps, Automagic could be restarted anyway. Usual suspects are apps that use a lot of memory like Chrome.
You can also activate the accessibility service of Automagic which ensures that Automagic get's an even higher priority and is not restarted.
If the restarts still happen then please go to the developer settings of your device and take a bugreport after the restart occurred (system settings->Developer options->Take bug report). Please send the bug report to
info@automagic4android.com. The bug report file can get quite large, please compress the file or send it using WiFI when you are on a metered data plan.
Regards,
Martin
Re: Automagic 1.24 service restarts sporadically on CM11 M11
Posted: 10 Nov 2014 14:32
by IGY
Thanks for your input Martin. I wanted to ensure that none of my flows or apps are causing the problem, so I conducted the following test this morning:
- turned off Wifi and data services
- disabled all flows
- restarted the phone
I haven't used the phone since, not even for any calls. It was sitting stationary on my desk where there are no wireless networks. Before I left for lunch I checked the log - no restart. Then I left the building for lunch, not using the phone in any way. There are a bunch of wireless networks at the place and guess what - automagic restarted just shortly after I left the place.
To summarize: no restarts for some six and a half hours on a totally idle phone with Wifi and data services disabled in an area without any wireless networks around. Enter and exit an area with wireless networks and automagic restarts. The same thing happened last week, same time same place. So maybe Bushmills is onto something?
Again, for me this is a non-problem. Considering the above factors however, I really don't think it is a memory issue. Hope this helps.
Regards,
Chris
Re: Automagic 1.24 service restarts sporadically on CM11 M11
Posted: 10 Nov 2014 14:38
by Bushmills
The number of WLAN networks doesn't seem to matter here, as it's unusual that I see more than 3 APs here, including my own.
Re: Automagic 1.24 service restarts sporadically on CM11 M11
Posted: 10 Nov 2014 15:14
by IGY
You are probably right. I think the rather interesting bit is, that there are no restarts when there are no WLANs in reach and the simple presence of WLANs - even with Wifi disabled - seems to cause the restart. And all that without using the phone, any apps, any Internet connection or any active flow...
Re: Automagic 1.24 service restarts sporadically on CM11 M11
Posted: 10 Nov 2014 16:31
by Martin
Maybe there's a problem with Scanning always available in advanced wifi preferences since it's the only option that should affect WiFi when WiFi is turned off. Do you also see the restarts with this setting turned off?
Re: Automagic 1.24 service restarts sporadically on CM11 M11
Posted: 10 Nov 2014 16:54
by Bushmills
I have the restarts - infrequently - also upon connection with a Bluetooth device. Again, not tested well yet as I don't happen to connect a Bluetooth device that often. Last time I noticed, the "restart" sound was played within a second of Bluetooth device connect. I still have the Developer options Error report, together with others I've been collecting in order to try discovering a common pattern in those. Those mentioned Nexus5 devices without problems run CM11 M11 too.
"Always scan" is turned on on the problem device. Recently I have stopped disabling WLAN instead, but no conclusive reports on that possible yet - after depart today, Automagic did not restart, but also not react to WLAN disconnect event nor to leaving geofence (probably due to disconnect not registering)
Re: Automagic 1.24 service restarts sporadically on CM11 M11
Posted: 10 Nov 2014 18:17
by IGY
Martin wrote:Maybe there's a problem with Scanning always available in advanced wifi preferences since it's the only option that should affect WiFi when WiFi is turned off. Do you also see the restarts with this setting turned off?
Good point. I will turn off the
Scanning always available option for now and let you know how it goes. But I probably won't get a chance to replay the exact same test scenario before Thursday...