-
Notifications
You must be signed in to change notification settings - Fork 485
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[5.8.4-3] Crash in S-57 chart cache handler. #3851
Comments
Workaround Set This will disable cache purging, hence increasing memory usage but avoiding the crash trigger. (This will be a different setting for Windows users) This workaround might not be practical on devices with limited memory like a Raspberry Pi. |
Hmm... (Note to self)What is going on is like this, I think:
Probably too risky for O5.10, but will think on it. |
Wow, thanks for the quick analysis! Clarification: The charts are imported and loaded and show correctly. Unless I misunderstand how OpenCPN deals with this, they should already be SENC. According to the backtrace, the crash happens in s57chart.cpp:345 (in tag 5.8.4) which is the end of its destructor. This vector is only pushed to in It could be a concurrent Is this a fair assessment in your eyes? EDIT: but then wouldn't we sometimes see a crash in PostInit if the vector is deallocated before it reaches |
"So it changes between the clear() in the destructor, and the end of the destructor." We can eliminate any possible SENC-creation thread question by executing Settings->Charts->Prepare All ENC Charts. |
Indeed, I did "Prepare All ENC Charts" and did two tests:
Both times; no crash. |
OK, confirmation of potential logic error in SENC creation thread management. |
SGTM. Is there a milestone for after 5.10 that it could be assigned to? Edit: Is there a way to execute "Prepare All ENC Charts" via CLI, e.g. to do it as a cronjob? |
We have so far not added this to opencpn-cmd, the cli variant. It is possible using a cli option when starting opencpn, but this requires a working display and is thus incompatible with cron EDIT: ALso, we have yet not been able to separate S57 decoding from it's GUI dependencies. Long story short: adding this to opencpn-cmd is not trivial. |
Describe the bug
Panning and zooming around causes OpenCPN to crash randomly.
I've narrowed it down to S-57 chart handling.
I have about 8038 cells loaded (all S-57).
To Reproduce
Pan and zoom around for a bit.
Expected behavior
OpenCPN doesn't crash.
Screenshots
Freezing the at the last frame before the crash displays the "Preparing vector chart X" box.
Desktop (please complete the following information if applicable):
Additional context
NOTE: Without
MALLOC_CHECK_ 2
, instead of "corrupted size vs. prev_size" it says "double free or corruption".The text was updated successfully, but these errors were encountered: