SOLVED: XML Database suspected to crash my app

Problems with WiFi, SQLite ,Bluetooth, WiMax, Proxies, etc...

SOLVED: XML Database suspected to crash my app

Postby WeXzuZ » Tue Jul 03, 2012 4:45 pm

<EDIT>
The problem is solved.
I created a Database object which reads the data and ONLY when I need the data I call a getter method which for some reason solved the problem. So something IS limited, no idea what. But at least the problem is solved and the app is actually performing WAY faster now.. WIN/WIN :D
</EDIT>

Hey guys, I have NO idea how this happened but I need help, I tried Googling it - nothing!

I am programming an app which is:
1) Loading two XML-files (219KB and 351KB).
2) Reads them and converts the information into parcelable objects (takes on average 1 second)
3) These objects are all added to two parcelable ArrayLists (one for each document)

The thing I don't understand is, before I expanded the XML files with more information - the app worked.
The data was doubled after my update and now gives me this as the ONLY hint to what could be wrong:

Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1. 07-03 17:33:54.060: E/MainMenu(28660): loadData()
  2. 07-03 17:33:54.060: E/MainMenu(28660): Starting first XML document read...
  3. 07-03 17:33:54.095: D/dalvikvm(28660): GC_FOR_ALLOC freed 185K, 4% free 12898K/13383K, paused 29ms
  4. 07-03 17:33:54.125: D/dalvikvm(28660): GC_FOR_ALLOC freed 127K, 5% free 13025K/13639K, paused 18ms
  5. 07-03 17:33:54.145: D/dalvikvm(28660): GC_FOR_ALLOC freed 0K, 4% free 13171K/13639K, paused 17ms
  6. 07-03 17:33:54.165: D/dalvikvm(28660): GC_FOR_ALLOC freed 0K, 4% free 13463K/13959K, paused 22ms
  7. 07-03 17:33:54.175: D/dalvikvm(28660): GC_FOR_ALLOC freed 292K, 6% free 13317K/14151K, paused 12ms
  8. 07-03 17:33:54.180: I/dalvikvm-heap(28660): Grow heap (frag case) to 13.814MB for 598528-byte allocation
  9. 07-03 17:33:54.200: D/dalvikvm(28660): GC_CONCURRENT freed 0K, 7% free 13902K/14791K, paused 2ms+1ms
  10. 07-03 17:33:54.270: D/dalvikvm(28660): GC_CONCURRENT freed 901K, 10% free 13414K/14791K, paused 4ms+2ms
  11. 07-03 17:33:54.445: D/dalvikvm(28660): GC_CONCURRENT freed 225K, 9% free 13591K/14791K, paused 1ms+2ms
  12. 07-03 17:33:54.520: E/MainMenu(28660): Done reading
  13. 07-03 17:33:54.520: E/MainMenu(28660): Starting second read...
  14. 07-03 17:33:54.550: D/dalvikvm(28660): GC_CONCURRENT freed 820K, 11% free 13186K/14791K, paused 2ms+4ms
  15. 07-03 17:33:54.565: D/dalvikvm(28660): GC_FOR_ALLOC freed 126K, 10% free 13314K/14791K, paused 15ms
  16. 07-03 17:33:54.590: D/dalvikvm(28660): GC_FOR_ALLOC freed 254K, 9% free 13570K/14791K, paused 11ms
  17. 07-03 17:33:54.620: D/dalvikvm(28660): GC_CONCURRENT freed 0K, 7% free 13804K/14791K, paused 6ms+1ms
  18. 07-03 17:33:54.635: D/dalvikvm(28660): GC_FOR_ALLOC freed 0K, 7% free 13804K/14791K, paused 13ms
  19. 07-03 17:33:54.635: I/dalvikvm-heap(28660): Grow heap (frag case) to 14.177MB for 480396-byte allocation
  20. 07-03 17:33:54.645: D/dalvikvm(28660): GC_FOR_ALLOC freed 0K, 7% free 14274K/15303K, paused 12ms
  21. 07-03 17:33:54.660: D/dalvikvm(28660): GC_FOR_ALLOC freed 469K, 9% free 14039K/15303K, paused 9ms
  22. 07-03 17:33:54.665: I/dalvikvm-heap(28660): Grow heap (frag case) to 14.864MB for 960776-byte allocation
  23. 07-03 17:33:54.670: D/dalvikvm(28660): GC_FOR_ALLOC freed 0K, 8% free 14977K/16263K, paused 9ms
  24. 07-03 17:33:54.675: I/dalvikvm-heap(28660): Grow heap (frag case) to 15.322MB for 480396-byte allocation
  25. 07-03 17:33:54.700: D/dalvikvm(28660): GC_CONCURRENT freed 0K, 8% free 15446K/16775K, paused 1ms+7ms
  26. 07-03 17:33:55.020: D/dalvikvm(28660): GC_CONCURRENT freed 1795K, 14% free 14476K/16775K, paused 1ms+1ms
  27. 07-03 17:33:55.050: E/MainMenu(28660): Done!
  28. 07-03 17:33:55.055: E/MainMenu(28660): Data load time: 992ms
  29. 07-03 17:33:55.300: D/CLIPBOARD(28660): Hide Clipboard dialog at Starting input: finished by someone else... !
  30. 07-03 17:34:15.265: E/MainMenu(28660): Button was clicked!
  31. 07-03 17:34:15.270: E/MainMenu(28660): Starting next Activity
  32. 07-03 17:34:15.445: D/CLIPBOARD(28660): Hide Clipboard dialog at Starting input: finished by someone else... !
  33.  
Parsed in 0.040 seconds, using GeSHi 1.0.8.4

I put in another Log call in the next activity which is never called. Screen goes either black or the app crashes (the latter one happening the most).

Is there a limit to:
AssetManager, InputStream, String, ArrayList, ByteArrayOutputStream or XMLPullParser
in terms of length?

I am testing this app on my Samsung Galaxy S3 GT-9300 unrooted.
WeXzuZ
Once Poster
Once Poster
 
Posts: 1
Joined: Tue Jul 03, 2012 4:22 pm

Top

Return to Networking & Database Problems

Who is online

Users browsing this forum: Exabot [Bot], Yahoo [Bot] and 11 guests