-
Notifications
You must be signed in to change notification settings - Fork 527
Out of memory #329
Comments
Out of memory errors cannot be fixes, they are what they are. |
Ok, but I didn't have this problem with previous versions, actually until 1.75... |
I guess you have set more restrictions since then. |
Mmmmh, I see... So I will investigate, thanks for the info!!! |
I have same issue with import.
|
I will see how I can improve this. |
I will switch to the SAX parser to save memory. |
Could you please test if this version works okay for you: http://d-h.st/Eyb |
See also #327 |
Same error, but work longer than before. Marcel Bokhorst [email protected] wrote:
Sent from my Android phone with K-9 Mail. Please excuse my brevity. |
There is little more I can do than I already did, sorry. |
Maybe change xprivacy to use a sql database. and export the data base as such. May solve the memory errors and if you locate the database in /data like pdroid it will keep nosy and malicious apps out of it. |
That would not be compatible across devices. |
Doesnt just about every messaging app use SQL for its database? android includes sql as well as default. and 2.3+ allow the use of the WAL sql database system. It would probably improve the performance alot if this can be done. Can you explain more why it would not be corss-device compatible? I dont understand why it wouldn't considering my above statements. As for putting it in /data your app will need rood access. but every one who uses exposed framework has to have root anyways. so no issues there. |
There are different versions of SQLite database, depending on Android version. |
well, you can address it the same way other devs do could you not? You could even include your own version of sql binary. alot of backup apps and tweaking apps do this already. |
Too much work that I rather spent on something else (for example restricting Android 4.3) |
Fair enough. But If this goes un solved, the inability to import ones settings is going to detour some users and pro users. I don't have the issue "yet" But keep in the back of your mind that this issue is fixable with my suggestion of moving to a sql database, and eventually people will expect it to be. I would make this "low prio", not "will not fix" in my opinion. And again just to mention it would probably improve performance, which i know you have been aiming for. |
@GhostlyCrowd @pogovault which device are you using and how much free memory do you have? |
Also the answer to this stack overflow question hits the nail on the head for the issues your having http://stackoverflow.com/questions/5213550/raw-resources-versus-sqlite-database/5213569#5213569 easier and faster to retrieve sort and filter data and it has none of the limitations you are getting with SAX or the previous xml parser. As xprivacy grows so will the things its filtering, sorting and what not. I still suggest you consider this. As devices become more powerful it will not be uncommon for a user to have 300-600 apps. So what then? if users are having issues importing settings for 200-300 apps now. thi9nk about the future. |
HTC One S, have around 500mb of RAM free. Marcel Bokhorst [email protected] wrote:
Sent from my Android phone with K-9 Mail. Please excuse my brevity. |
Here is something i have been able to replicate with xprivacy as well. I wanted to filter all my apps, including system. I know this breaks android and you boot loop but the purpose to check "All" was so i could then sort and unchecked what i needed to unblock. much faster this way. So check "All" xprivacy will get an out of memory error and fail to check anything. Check "All" again it will check everything and then xprivacy starts to freeze and lock up. Android asks if you wish to wait for xprivacy and you can, or some times it just blatantly crashes. I am running cm with about 213 apps including system. Using the all option just kills xprivacy performance. even with SAX |
This doesn't say anything about memory usage when reading/writing XML files (XPrivacy doesn't manipulate the XML files in any other way). XML is the standard to export/import data. Some people edit the exported file manually. Filtering/sorting has nothing to do with this. Again: I don't expect problems with the new XML parser, even with a lot of apps, unless the device is already low on memory. The XML parse process as it is now uses hardly any memory. "... the minimum memory required for a SAX parser is proportional to the maximum depth of the XML file ... and the maximum data involved in a single XML event ..." |
'All' does nothing with the XML file. |
then how is the database kept of what you have checked i thought it was all xml? The app keeps a list of your settings i assumed if it wasn't sql it was xml since thats what import and xport use |
It uses shared preferences. |
thanks for the clarification, i assumed the fc and freezing was all related to the xml issue. which is why i have not bothered to report it. |
I see that in shared_prefs all the apps settings are still xml, they are not affected then by the import xport xml memory issue? I dunno then, i was hoping switching to sql would increase the performance as well as fix the import export for the users. |
My comments were actually for 1.7.16. I'm trying 1.7.15 now. What app can I use to check memory use by apps? First import on 1.7.15 completely froze my phone part of the way through the procedure. |
Version 1.7.18 might solve your problem. |
Uh oh. No. Never had this happen with Xprivacy before. Import causes reboot then bootloops, had to flash remover. |
I had 1.7.17 before that happened. 1.7.17 only gives out of memory. 1.7.18 bootloops. Had to flash remover. Reinstalling 1.7.17 still bootlooped. Had to flash remover again. 1.7.16 now allows phone to boot. |
I see no change which can cause boot loops. |
That will require adb, I have no setup where I can run adb unfortunately. Reinstalling 1.7.17 after the bootloops have stopped now re allows the phone to boot with 1.7.17. I will see if I can get a logcat of 1.7.18 causing the initial crash. |
After 1.7.18 bootloops, flashing the remover recovers the system. However, every subsequent install of Xprivacy of any version down to 1.7.15 carries on causing the bootloop, until after installation of the apk you attempt to run Xprivacy. It complains that it is not enabled in Xposed, and when you close that dialog, it is refreshing its app list. Usage data and settings appear preserved. Rebooting after that gives a working phone and Xprivacy. I am not on my laptop at the moment, so I cannot give you a logcat, but I will mail you them as soon as I get a chance. 1.7.18 is a no-no for me. Had never had any bootloops before. |
There is already a 1.7.19 |
Haha. I'm almost scared to upgrade now. I really appreciate the effort you're putting into this app, and hope more people realise this and contribute. |
1.7.19 causes a crash and reboot when importing, but no bootloop. Phone appears to take a bit longer to boot. However, 1.7.19 is really, really slick. Nice interface. Usage data is very well integrated. I will try to get a catalog of this when I get a chance. By tomorrow hopefully. Oh and the app list loads faster, did you do something to that? |
1.7.20 just fails, notification freezes. Most of the apps I have taking up memory are system apps. |
1.7.22 still has the out of memory issue, but only after trying to export. Doesn't the dalvik vm deal with memory management? Before import I have at least 100MB free. |
You've probably said before but whats your devices specs for ram and storage. also adb shell "cat /system/build.prop | grep heap" see what your heaps are. May help give M66B a better idea of your memory circumstances. |
Galaxy S3 GT-I9300 with 1GB RAM. dalvik.vm.heapstartsize=8m |
do this adb shell "setprop dalvik.vm.heapsize 256m" dont reboot and try seeing if you can make xprivacy run out of memory. my heap is 512mb but i have 2gb of ram. 128 seems low. |
i edited it so make sure u refresh my commands were incorrect |
also adb shell "setprop dalvik.vm.heapgrowthlimit 128m" |
@cobaltdr as @GhostlyCrowd suggest you should really look into your configuration. |
Version 1.7.23: http://d-h.st/f0D |
Set it to heapsize to 128m to decrease the frequency at which the Touchwiz UI was being killed off by the system. Have adopted your values, but still crashes. I wonder why I'm the only one getting this. |
@cobaltdr maybe you should try another ROM |
@M66B: thanks, I appreciate what you say. I'm not entirely sure how to modify my setup. I only have about 5-6 processes taking up memory other than stock Samsung bloat. Hehe. Killing stuff to free memory doesn't appear to help. I might try to split the XML file to see if that does anything. |
@M66B yeah, I've thought of that. I've been putting it off. It's a real shame Samsung have bloat. With their backing they could have produced more efficient solutions. |
Dammit. 1.7.23 bootloops again when importing. I will try to get logcats to post, but I need some sleep, been working all night. |
With a bit of luck this version will solve the out of memory problem: |
Took about 5 minutes, but 1.7.27 is the first version that has allowed me to import settings without problems. |
I also managed to import settings with 1.7.27 after long, long time. First attempt was disaster - need reboot and restore XPrivacy from backup. For second attempt I kill every app I could and deleted all XPrivacy data before import. So, it is better now, but I'm now afraid to install any new app or change any restrictions. |
Accounts and contacts were not exported until so far. |
People need to be aware that Xprivacy is exporting account and contact details to a text file. Is the data encrypted? They might otherwise inadvertently be distributing private data themselves. |
You should know by now that I pay attention to every litlle detail ... ;-) |
I'm on v 1.77.
When I try to import my settings back up file it stops like in the middle of the process and gives me an java.lang.OutOfMemory error.
The text was updated successfully, but these errors were encountered: