| Reply | « Previous Thread | Next Thread » |
|
I'm a bit frustrated!
The objective is to have a midlet read the GPS for a long time. I read GPS positions once every second. I send data to a server once every minute. I store information to RMS once every minute. After some time (> 1 hour) the app hangs, and the phone displays the message "Memory Full" or "Out of memory" (the message is localized in spanish) During the main loop, I'm monitoring memory and RMS space availiable. I call System.gc(); very often, at least once each minute. And both value keep high, so i think it's not a problem related with RMS space or memory of the app. I do not reserve too much memory too fast in any circunstance... So i dont know why my app keeps hanging with this message. the only explanation to me is that some buffer is being filled with data from the bluetooth GPS DataInputStream faster than my midlet is consuming it. So this data is not freed with gc() calls and is invisible to Runtime.getRuntime().freeMemory(), eventually the memory for the KVM runs out and the app hungs. It's the only idea I have now. freeMemory it's supossed to show the amount of memory free of all the system, but... Maybe the problem is related with Nokia 6600 UI memory leaks? I use StringItems to update the information every second, I dont create new Stringitems but reuse existent ones... Any ideas? |
|
Hi, exactly the same problem, anybody has been able to solve the problem? Maybe a Nokia Expert can enlighten us. I guess it is just a problem with the 6600 cause on a 6230 works fine.
|
|
Finally I think I have more or less solved the problem of the GPS.
Everything seems to point that the problems was the buffer that the KVM reserves for the input SPP connection. This night i had the phone running without problems more than 13 hours. Enough for our applications. I believe that it would last much longer. However I have not made longer testings (as we have only one phone for two coders, and i cannot dispose the phone too long) The phone was reading as fast as the GPS outputs data, also was doing the full processing of the data (RMS+http connections). From the point of view of my app there were two problems: Reading data at the same speed of the GPS Phone processing data slowly and delaying the read operations The first problem was solved changing from a TimerTask reading every second, to a continuously running thread. As for the second problem, I vas using too much StringItems to monitor data (NMEA string readed, latitude & longitude parsed, rumber of reads done, free memory, free RMS memory and http connections). Also i might be calling System.gc() too often. All in all, the task of updating the screen was too expensive in time and the phone was unable to catch the speed of the gps (4800 bauds minimum). I reduced the amount of information displayed on screen and called System.gc() much less often and now it's running ok. So both effects caused the KVM to buffer data and fill memory. Notice that this memory consumption seemed not to be shown in calls to Runtime.getRuntime().freeMemory(). I hope this may help other people. ![]() |
|
Spooky, I have the exact same problem and symptoms - see my new thread here:
http://discussion.forum.nokia.com/fo...ad.php?t=96119 I'll stop the display of the lat/long/alt etc to the screen and see if that solves my problem. -Steve |
| Reply | « Previous Thread | Next Thread » |
| Thread Tools | Search this Thread |
|---|---|
| Thread | Thread Starter | Forum | Replies | Last Post |
|---|---|---|---|---|
| Nokia 6670 and bluetooth SPP profile | karnivore | Bluetooth Technology | 8 | 2004-12-21 13:06 |
| question about, BCC and bluetooth, help !! | username3 | Bluetooth Technology | 0 | 2004-12-11 17:16 |
| Memory Access within the N-Gage & question regarding larger memory cards. | Moldrik | General Symbian C++ | 2 | 2004-01-08 19:36 |
| Nokia 7650 support Bluetooth audo? | ovjo12 | Bluetooth Technology | 5 | 2003-07-17 19:50 |
| can not successfully link any sample using .NET | lobotomat | Symbian Tools & SDKs | 2 | 2002-08-20 01:29 |