haipv1108 / androjena

Automatically exported from code.google.com/p/androjena
0 stars 0 forks source link

tests crash with "Out of memory" #2

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
1. I have installed the "androjena.test.android.apk" (May 17, 2010) on my
HTC Magic and in an Android 2.1-update1 emulator
2. I've started "AndroJena Tests"
3. Clicked on "start tests"

after a while the action crashed on both devices with "Out of memory" I've
appended the logcat output and the traces.txt

Original issue reported on code.google.com by arndtn@gmail.com on 31 May 2010 at 12:52

Attachments:

GoogleCodeExporter commented 8 years ago
nice to see this project growing and sorry for invading this issue ... :-)

Is there a mailing list to discuss the API?

Original comment by sebastian.dietzold on 31 May 2010 at 2:47

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
The out of memory issue is not really solvable: the Jena test suite has been 
designed 
to run on a desktop computer with Java SE, so virtually without any memory 
concern. 
As I see from the logs you sent, the test application has crashed during the 
test 
case creation phase, so the tests didn't even start and that's why you didn't 
notice 
any result or feedback on the screen. On real devices with a low heap size 
limit, 
like the HTC Touch, this problem is not solvable because the maximum heap size 
for a 
Dalvik VM instance is fixed by the manufacturer and not configurable via 
software nor 
preferences. I've been running the test application on an Acer Liquid 
smartphone, 
which has 256MB of ram (so less than the HTC Magic), but probably a higher heap 
limit, or at least I guess: I managed to run almost 90% of the test suite 
before the 
OutOfMemory crash occurred (probably because the last tests involve the 
ontology API 
and load larger models in memory).
On the other hand, on the emulator this limit can be easily configured as 
follows:

- Open the "Android SDK and AVD manager" (inside or outside of Eclipse);
- under "Virtual Devices" click "New"; 
- choose a name and a target platform (at least Android 1.5!); 
- configure the SD card size (at least some 100M because the tests create lots 
of 
temporary files during execution);
- under "Hardware", add the following properties:
- "SD card support" => yes
- "Device ram size" => 512 MB (or more)
- "Max VM application heap size" => same as "Device ram size"
- Click "Create AVD"

You should be able to run the androjena.test.android application and execute 
all the 
test suite on the newly created AVD without problems, resulting in something 
like 50 
between errors and failures out of a total of about 9000 tests.

That said, the test application should fail in a more graceful fashion indeed 
:) I'm 
working on it right now and I should be able to release a new version within 
the next 
hours. I've solved the crash issue (the application stops test execution before 
completely running out of memory) and made some changes to the UI, and I'm 
completing 
a new "send test results to Androjena developers" feature which (if enabled, of 
course) will upload anonymous test results to our server, in order to benchmark 
Androjena support on various devices avoiding the whole "issue" procedure. 
Finally, 
I'm writing a wiki page that explains the memory issues, testing stuff, device 
support etc.

@sebastian.dietzold (and anyone interested): I've created the Androjena 
discussion 
group (you can find the link on Androjena's project homepage). We'd really 
appreciate 
any contribution, suggestion or feature proposal, so feel free to write here or 
there 
(so we can be quickly notified).

Thanks,
lorenzo

Original comment by loreca...@gmail.com on 3 Jun 2010 at 9:41

GoogleCodeExporter commented 8 years ago
did you upload these changes to subversion? Last revision is r32 from Mai, 26 
2010.

Thanks,
natanael

Original comment by arndtn@gmail.com on 3 Jun 2010 at 11:20

GoogleCodeExporter commented 8 years ago
This issue was closed by revision r35.

Original comment by loreca...@gmail.com on 5 Jun 2010 at 2:11

GoogleCodeExporter commented 8 years ago
I've updated the androjena.test.android.apk package. When you have some time, 
please 
try the new version: now it shouldn't crash on OOM errors, and probably a good 
portion 
of the tests will be executed (lighter memory footprint).
Thanks,
lorenzo

Original comment by loreca...@gmail.com on 5 Jun 2010 at 3:14