Cruisers Forum
 


Reply
  This discussion is proudly sponsored by:
Please support our sponsors and let them know you heard about their products on Cruisers Forums. Advertise Here
 
Thread Tools Search this Thread Rate Thread Display Modes
Old 03-06-2018, 05:32   #31
Registered User

Join Date: Feb 2010
Location: Tierra del Fuego
Boat: Phantom 19
Posts: 6,295
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, 07:21   #32
Marine Service Provider
 
bdbcat's Avatar

Join Date: Mar 2008
Posts: 7,712
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, 08:04   #33
Registered User

Join Date: Aug 2009
Location: oriental
Boat: crowther trimaran 33
Posts: 4,455
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.
seandepagnier is offline   Reply With Quote
Old 03-06-2018, 10:33   #34
Registered User
 
transmitterdan's Avatar

Join Date: Oct 2011
Boat: Valiant 42
Posts: 6,008
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, 12:18   #35
Marine Service Provider
 
bdbcat's Avatar

Join Date: Mar 2008
Posts: 7,712
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, 19:41   #36
Marine Service Provider
 
bdbcat's Avatar

Join Date: Mar 2008
Posts: 7,712
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, 06:53   #37
Registered User
 
transmitterdan's Avatar

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

Dave,

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

Join Date: Feb 2017
Location: Southern California
Posts: 109
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 02:55
Rebuild Texture Cache causes crash in OpenCPN 4.0 jim326 OpenCPN 12 04-04-2015 05:00
How To Cover up Texture of Fiberglass Jon Neely Construction, Maintenance & Refit 9 15-05-2011 11:45

Advertise Here


All times are GMT -7. The time now is 20:14.


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

ShowCase vBulletin Plugins by Drive Thru Online, Inc.