DictionaryForMids Forum

DictionaryForMIDs for Android devices => General discussions => Topic started by: jn0101 on 23. October 2010, 23:29:41

Title: SVN version crashes the emulator
Post by: jn0101 on 23. October 2010, 23:29:41
Achim,

I just downloaded the SVN version.
It seems it crashes the emulator if you download a large dictionary (> 1.5 MB).
Can you confirm that?

Jacob
Title: Re: SVN version crashes the emulator
Post by: axin on 24. October 2010, 23:58:43
Hi Jacob,

it works fine here. Just a little slow, but that's a known problem...

Can you provide some more details about your setup? What emulator/target are you using? I just installed a 4MB dictionary (English-Czech??) on an emulator running Android 2.1. Does DDMS give you some output when the emulator crashes? Is there anything in the logs?

Cheers,
Achim
Title: Re: SVN version crashes the emulator
Post by: jn0101 on 25. October 2010, 18:25:48
Ive of course looked but I cant say for sure what happens.
There is a lot of memory garbage collection going on and suddenly a lot of services die, whereafter the emulator reboots.

Probably its some sort of memory leak or massive memory consumption. Ive inserted debug statements (you have absolutely no logging in your code - how can you live like that?) and I think its during unpacking of the ZIP files.

Im working on the non-free esperanto-Danish dictionary.
You can try yourself:

   public static DownloadDictionaryItem bickLarsen =
      new DownloadDictionaryItem(1000,
         "Dansk-Esperanto ordbog", "http://javabog.dk/esperanto/Dansk-Esperanto_BickLarsen.zip", "Dansk-Esperanto", 1575696);

....

      dictionaries.add(bickLarsen);


Im running Android 2.2 without Google APIs

Yours,
Jacob
Title: Re: SVN version crashes the emulator
Post by: axin on 28. October 2010, 12:30:39
Hi Jacob,

I was not able to reproduce the crash you described. On my machine, your sample works fine using 2.2. Not sure what may cause the problem. You could try tracing (http://developer.android.com/guide/developing/tools/traceview.html), maybe this tells us which method goes crazy and crashes the emulator.

Quote from: jn0101 on 25. October 2010, 18:25:48
you have absolutely no logging in your code - how can you live like that?
The advanced debugging features in Eclipse are just great :)
With Android, for most bugs I prefer breakpoints to logging. But I can see why in your case logging makes sense.

Cheers,
Achim