Im in early stages of testing my midp 2 app on other devices to make sure it still works - and it doesnt ! - wasted a week trawling known issues / forums & tidying code. Help very much appreciated.
here goes ( all midp 2 phones ) . nokia emu & device all ok. Sony erricson emu ok device freezes occasionally & requires battery removal. Siemens wont run emu or device - no response from app in main menu after splash - may be terminated using 'end' key. Motorola - emu ok - about to test on device after giving up on sony and siemens !
structure notes : - mostly game canvas's. all have own Thread var assinged to and run on showNotify(). all check flag which is set false in hideNotify(). all use one background image created after splash screen image has been gc()'d and is stored in midlet class var for use by all. graphics is png in jar using Image.createImage() to prepare for use.
like I say - fine on nokia , wont work on at least two others, Thanks in advance, Steve.
You say every canvas runs it's own thread and you have several of those? I would check and double check that the threads are closing properly. Many devices have trouble dealing with too many threads and they can croak. Relying on hideNotify() and showNotify(), as with any other system initiated event, is not always a good idea. They are called at weird places and sometimes aren't called at all. You should check the builds that are having trouble on the device itself (you can't count on the emulators for threading problems) and monitor the threads that are running. You could also manually make sure that your threads are closing whenever you switch canvases.
Other than that, unfortunately every device has it's quirks and there really is no other choice than to dig in every developer's portal and every forum and every mailing list and search for answers. These bugs as a rule (Murphy's) will only happen on the phone and debugging on the device makes the problem a lot harder.
Thanks for your comments, worrying as they are ! - I dont like the idea you cant rely on midp spec system generated events ! Whats the point in having a spec thats designed to promote 'write once run on many' if the phone companies dont stick to it !?
By the way - no idea what you mean by 'manual' stopping a thread. Steve.