|
Prev: How to get music infomtion from .wma file
Next: Comprehensive list of PDAs running Window Mobile?
From: Alex Zolotov on 14 Jul 2008 08:31 I have a simple application with following code: int WINAPI WinMain(...) { MessageBox( GetForegroundWindow(), L"Application started", L"Note", MB_OK ); Sleep( 1000 * 5 ); test_function(); MessageBox( GetForegroundWindow(), L"Application finished", L"Note", MB_OK ); return 0; } int test_function( void ) { return 0; } The size of compiled EXE is ~300 kilobytes, because it has large amount of temporary unused code. Offset of the test_function() in RAM is 0x2047C. So, all is good. I run application, then got first messagebox and second after 5 seconds. I put this application to SD-card and trying to run it from card directly. App still working fine: message, 5 seconds pause, message. But when i take SD-card and insert it back during the 5 seconds pause, my application crashed on test_function(). Crash report tells me, that memory with test_function() is broken by someone. If i add code for reading memory region from 0x11000 to 0x2047C before the first MessageBox, then application working fine without eny errors! Also it working fine from internal device memory. It's very strange.. May be some troubles with ARM code cache and external card reading? I tested my program on following devices: gsmart mw998 (PXA270), iPAQ 3850 (StrongARM 1110). Thanks!
From: Alex Zolotov on 14 Jul 2008 15:28 Ok. There is source code of such application: http://www.wikiupload.com/download_page.php?id=46070 I tested it on Gsmart MW998 and iPAQ 3850. And i used different compilers for more accuracy of experiment: cegcc and EVC4. Run this application from external flash-card. Then (after first bessage box) take card and insert it back. Then program will crash. Cause of this crash - garbage instead of the test_function(). So.. Seems, that card reinserting causes damage of some memory areas (not readed yet) of application..
|
Pages: 1 Prev: How to get music infomtion from .wma file Next: Comprehensive list of PDAs running Window Mobile? |