Cruisers Forum
 


Join CruisersForum Today

Reply
 
Thread Tools Search this Thread Rate Thread Display Modes
Old 03-06-2018, 04:32   #31
Registered User

Join Date: Feb 2010
Location: On the go. Not in Prague.
Posts: 4,527
Re: Crash when rebuilding texture cache

Quote:
Originally Posted by did-g View Post
Which platforms isn't c++11?
Is current head still compatible with wx2.x ?
If the problem isn't on Android, then all platforms we "officially" care about are C++11 ready with the current master.
I haven't tried building against wx2 for quite some time but even if there is some breakage it still won't be major. Worth caring about? IMHO not and given the resources available I would prefer to officially dump it and start cleaning up the codebase...

Pavel
__________________

nohal is offline   Reply With Quote
Old 03-06-2018, 06:21   #32
Marine Service Provider
 
bdbcat's Avatar

Join Date: Mar 2008
Posts: 5,212
Re: Crash when rebuilding texture cache

Pavel...

Checking Android build on c++11 very soon now.
I agree that we should move ahead on this ASAP, and target c++11 for O5.

Dave
__________________

bdbcat is offline   Reply With Quote
Old 03-06-2018, 07:04   #33
Registered User
 
boat_alexandra's Avatar

Join Date: Aug 2009
Location: chesapeake bay
Boat: bristol 27
Posts: 3,240
Re: Crash when rebuilding texture cache

jsoncpp requires c++11.. so far I just compiled those specific source files, and it works on android.

more libraries in the future will require it.
boat_alexandra is offline   Reply With Quote
Old 03-06-2018, 09:33   #34
Registered User
 
transmitterdan's Avatar

Join Date: Oct 2011
Boat: Valiant 42
Posts: 4,424
Re: Crash when rebuilding texture cache

Here are all lines reported by VS that leave dangling pointers at program shutdown. I used uniq to reduce the list to a single entry per offending line. The original report had about 3000 instances of dangling pointers. This is run in debug mode from the master branch with latest commit https://github.com/OpenCPN/OpenCPN/c...a171743335dc6c.

Code:
Detected memory leaks!
Dumping objects ->
opencpn\src\chart1.cpp(1567)
opencpn\src\chart1.cpp(2151)
opencpn\src\chart1.cpp(2156)
opencpn\src\chart1.cpp(2157)
opencpn\src\chart1.cpp(2162)
opencpn\src\chart1.cpp(2163)
opencpn\src\chart1.cpp(2164)
opencpn\src\glchartcanvas.cpp(2510)
opencpn\src\gltexcache.cpp(459)
opencpn\src\gltexcache.cpp(722)
opencpn\src\gltexcache.cpp(783)
opencpn\src\gltexcache.cpp(825)
opencpn\src\gltexcache.cpp(826)
opencpn\src\gltexcache.cpp(984)
opencpn\src\gltexturemanager.cpp(767)
opencpn\src\navutil.cpp(1303)
opencpn\src\piano.cpp(52)
opencpn\src\pluginmanager.cpp(2032)
opencpn\src\pluginmanager.cpp(3539)
opencpn\src\routeman.cpp(1277)
opencpn\src\routeman.cpp(1331)
Object dump complete.
The program '[180112] opencpn.exe' has exited with code 0 (0x0).
transmitterdan is offline   Reply With Quote
Old 03-06-2018, 11:18   #35
Marine Service Provider
 
bdbcat's Avatar

Join Date: Mar 2008
Posts: 5,212
Re: Crash when rebuilding texture cache

TDan...

OK, thanks. I'll dig into this tonight.
Dave
bdbcat is offline   Reply With Quote
Old 10-06-2018, 18:41   #36
Marine Service Provider
 
bdbcat's Avatar

Join Date: Mar 2008
Posts: 5,212
Re: Crash when rebuilding texture cache

TDan, et al...

I have discovered the root cause of the occasional crash on Windows raster cache rebuild. The problem stemmed from a collision between the completion events coming from the ongoing current chart load, and the batch compression jobs. This lead to a logic error of trying to delete a nonexistent object. Which of course crashed.

Related to your analysis, there was also a problem with closing/deleting chart objects on program termination. This left lots of dangling pointers, as you found. It was discovered that the problem was only on GL, and related to the order in which various elements were shutdown/destroyed on exit.

I fixed these two items in github master (O4.99). The fixes could be backported to 484 for testing, but probably not needed for most user situations.

The reasonable workaround for the texture cache rebuild crash is this:
Move the viewport to somewhere far away from any raster charts currently in the database. Central Asia comes to mind. Stop OCPN, then restart normally. Clear and rebuild the cache normally. The cache rebuild should not crash in this case.

Thanks
Dave
bdbcat is offline   Reply With Quote
Old 12-06-2018, 05:53   #37
Registered User
 
transmitterdan's Avatar

Join Date: Oct 2011
Boat: Valiant 42
Posts: 4,424
Re: Crash when rebuilding texture cache

Dave,

Been testing the fix. No problems found.
transmitterdan is offline   Reply With Quote
Old 21-06-2018, 14:06   #38
Registered User

Join Date: Feb 2017
Posts: 69
Re: Crash when rebuilding texture cache

Quote:
Originally Posted by bdbcat View Post

The reasonable workaround for the texture cache rebuild crash is this:
Move the viewport to somewhere far away from any raster charts currently in the database. Central Asia comes to mind. Stop OCPN, then restart normally. Clear and rebuild the cache normally. The cache rebuild should not crash in this case.

Thanks
Dave

Ran into the same crash on another computer. This work around indeed allows you to rebuild the cache without it crashing. I tested it today.
__________________

J805 is offline   Reply With Quote
Reply

Tags
rebuild

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Texture Compression with Caching greyed out J805 OpenCPN 10 22-05-2018 01:55
Rebuild Texture Cache causes crash in OpenCPN 4.0 jim326 OpenCPN 12 04-04-2015 04:00
How To Cover up Texture of Fiberglass Jon Neely Construction, Maintenance & Refit 9 15-05-2011 10:45



Copyright 2002- Social Knowledge, LLC All Rights Reserved.

All times are GMT -7. The time now is 01:03.


Google+
Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2018, vBulletin Solutions, Inc.
Social Knowledge Networks
Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2018, vBulletin Solutions, Inc.

ShowCase vBulletin Plugins by Drive Thru Online, Inc.