Bílý vrch
icon TrekBuddy
www.trekbuddy.net
Outdoor companion.
  • internal / bluetooth / simulator GPS
  • offline raster maps
  • smart GPX / raw NMEA logs
  • waypoints and simple navigation
  • custom views
  • MIDP and Symbian phones
  • Blackberry
  • Android
Visit wiki to see all features, guides and howtos. Project tracker.
Trekbuddy is on Github now

Partners:    (Polish/Polski)(Polski) Compass mapy      (Polish/Polski)(Polski) Galileos mapy      (Polish/Polski)(Polski) CartoMedia      (Czech/Èesky)(Èesky) Eaglesoft trasy      (Polish/Polski)(Polski) ExpressMap     

 FAQFAQ   SearchSearch   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
Possible memory problems
Goto page 1, 2, 3, 4  Next
 
Post new topic   Reply to topic    TrekBuddy Forum Index -> General discussion
View previous topic :: View next topic  
Author Message
JNT



Joined: 10 Jan 2009
Posts: 415
Location: Sweden

PostPosted: Sun Jun 05, 2016 7:31 pm    Post subject: Possible memory problems Reply with quote

While playing with my new CMS, I have been experiencing some seemingly memory related problems. On some occasions not all of the rotated png pictures are displayed on the CMS screen and twice I got "out of memory" errors and black tiles on the map screen.

Is there some memory limit that could cause such behaviour? If so, is there a way around it?

Or can it be something else causing it? Android issue?
Back to top
View user's profile Send private message
boowoo



Joined: 12 Jun 2013
Posts: 556
Location: France

PostPosted: Mon Jun 06, 2016 5:42 am    Post subject: Reply with quote

I never had problem you relate exactly, but for me TB crash when i dont lock my screen in mountain bike (if no lock, the screen have many many quick rotations with memory problem ...)

Also, when i need TB running sure without trouble, i stop all unusual apps in background (but you know that Wink )

Did you make test with TB data in internal memory device instead ext sd card, to be sure problem dont come from sd card or quality sd card (speed class) ?
Back to top
View user's profile Send private message
JNT



Joined: 10 Jan 2009
Posts: 415
Location: Sweden

PostPosted: Mon Jun 06, 2016 9:13 am    Post subject: Reply with quote

My Nexus 7 only has internal memory.

Since I have been adding a lot of things to the CMS (hecl and png's), it might just be too many...



tmp_4456--645379081.png
 Description:
Oom error
 Filesize:  152.12 KB
 Viewed:  8305 Time(s)

tmp_4456--645379081.png


Back to top
View user's profile Send private message
boowoo



Joined: 12 Jun 2013
Posts: 556
Location: France

PostPosted: Mon Jun 06, 2016 9:20 am    Post subject: Reply with quote

Seems too heavy ... Wink
Back to top
View user's profile Send private message
Ranger



Joined: 12 Dec 2006
Posts: 6030

PostPosted: Mon Jun 06, 2016 2:56 pm    Post subject: Reply with quote

@JNT
Which one version of Nexus 7 do you exactly have ? Smile
High ppi screen model with 2GB of RAM ? There are 4 different Nexus 7 models (with the same name) Wink
Next, there can be some of the app memory limiting factors, ie RAM size available, memory consumed by map tiles, by app interface elements used, hecl code, etc.
Seems one of them was reached. In TB Info, Technical you can see memory allocated/used.
Optimization can be done for all app elements designed by user, but it isn't easy to say something without detailed info about them.
You can't only control Android own memory optimization process ... Wink
Back to top
View user's profile Send private message
JNT



Joined: 10 Jan 2009
Posts: 415
Location: Sweden

PostPosted: Mon Jun 06, 2016 6:22 pm    Post subject: Reply with quote

Yes I have the 2013 Nexus 7 (WiFi). It has 2 GB RAM. Running the latest Android 6.0.1.

I will play around and remove some CMS screens to see the effect (some of them have many rotating png's). My hecl file has also grown quite a bit lately (as I am trying different things like averaging different values to smoothe out jumping values, etc... )
Back to top
View user's profile Send private message
boowoo



Joined: 12 Jun 2013
Posts: 556
Location: France

PostPosted: Wed Jun 08, 2016 4:38 pm    Post subject: Reply with quote

Ratio screen size/memory seems important also ...
I made a mountain bike test for 1h00 -> TB 1.33 beta, Maps and CMS with new rotate functions, and with many other floating apps or some others running in background .... (screenshot)
and the result = no crash, no lag, no bug ! But my screen resolution is 480x800 ...
JNT, yes, maybe big rotate png pictures are the problem for you ?



Test-1h.png
 Description:
 Filesize:  398.51 KB
 Viewed:  8236 Time(s)

Test-1h.png


Back to top
View user's profile Send private message
kruch
Site Admin


Joined: 02 Jul 2006
Posts: 5673

PostPosted: Thu Jun 09, 2016 5:54 pm    Post subject: Reply with quote

But rotating images are the most likely suspect, I assume. You haven't experienced OOMs before, right?
Back to top
View user's profile Send private message
JNT



Joined: 10 Jan 2009
Posts: 415
Location: Sweden

PostPosted: Thu Jun 09, 2016 6:51 pm    Post subject: Reply with quote

kruch wrote:
But rotating images are the most likely suspect, I assume. You haven't experienced OOMs before, right?

Right.
I have been adding more and bigger png files, while trying different things.
The only other change has been that android updated to the latest version. MOB30M.

It certainly has an effect which CMS screen is "set". The oom error only occurs if I have chosen the CMS with the most png's.
Edit :
It also only seem to happen on the map screen when displaying higher zoom levels. And once it happens and I go to the CMS screen (with the many png's), not all of the png's are displayed.
Back to top
View user's profile Send private message
kruch
Site Admin


Joined: 02 Jul 2006
Posts: 5673

PostPosted: Mon Jun 13, 2016 7:56 pm    Post subject: Reply with quote

- change rendering method for rotated images
- made memory cleanup a little bit more aggressive
- fixed minor memory leak

http://www.trekbuddy.net/dev/2016-06-13/trekbuddy.apk
Back to top
View user's profile Send private message
boowoo



Joined: 12 Jun 2013
Posts: 556
Location: France

PostPosted: Mon Jun 13, 2016 8:24 pm    Post subject: Reply with quote

Quick test on my Samsung xCover2 ...

New rendering method for rotated images have great and superb result on my phone (for arrows, naviws and all rotated png pictures in my CMS). Very Happy
Antialiasing seems displayed really better.

Need more tests (outdoor) to see memory impact ...
Back to top
View user's profile Send private message
boowoo



Joined: 12 Jun 2013
Posts: 556
Location: France

PostPosted: Mon Jun 13, 2016 9:19 pm    Post subject: Reply with quote

Test a bit more ... and message problem when rotated function of the phone is actived and when moving (portrait/landscape) the phone ... Crying or Very sad


SC TB1.PNG
 Description:
 Filesize:  174.69 KB
 Viewed:  8111 Time(s)

SC TB1.PNG


Back to top
View user's profile Send private message
kruch
Site Admin


Joined: 02 Jul 2006
Posts: 5673

PostPosted: Mon Jun 13, 2016 10:24 pm    Post subject: Reply with quote

Your xCover2 is running what Android version? The issue may be specific to Samsung devices and Android version combinations. (http://stackoverflow.com/questions/23893813/canvas-restore-causing-underflow-exception-in-very-rare-cases)

Added workaround: http://www.trekbuddy.net/dev/2016-06-14/trekbuddy.apk
Back to top
View user's profile Send private message
boowoo



Joined: 12 Jun 2013
Posts: 556
Location: France

PostPosted: Tue Jun 14, 2016 4:58 am    Post subject: Reply with quote

Samsung xCover2 version JB 4.1.2 (rooted)

Seems better with this last TB version. Smile

Attached message happen if i shake the phone too much with lot of screen rotations ... maybe it's normal memory limit ! Wink



SC TB2.PNG
 Description:
 Filesize:  224.59 KB
 Viewed:  8089 Time(s)

SC TB2.PNG


Back to top
View user's profile Send private message
kruch
Site Admin


Joined: 02 Jul 2006
Posts: 5673

PostPosted: Tue Jun 14, 2016 5:56 am    Post subject: Reply with quote

No it is a bug. I will look into it.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    TrekBuddy Forum Index -> General discussion All times are GMT
Goto page 1, 2, 3, 4  Next
Page 1 of 4

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group