Skip to content
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

Opencpn crash after Disable, then Enable ...crash #15

Closed
rgleason opened this issue Mar 11, 2018 · 9 comments
Closed

Opencpn crash after Disable, then Enable ...crash #15

rgleason opened this issue Mar 11, 2018 · 9 comments

Comments

@rgleason
Copy link
Contributor

rgleason commented Mar 11, 2018

Plugin is running with VDRplayer running Hartmut-Netherlands.txt
Options > Plugins > Sweepplot Disable.
The crash occurs if you don't hit "apply." and if you do hit "Apply".
Then hit Enable.

@rgleason rgleason changed the title Opencpn crash after Disable, (don't hit Apply) then Enable ...crash Opencpn crash after Disable, then Enable ...crash Mar 11, 2018
@rgleason
Copy link
Contributor Author

rgleason commented Mar 11, 2018

When I hit "Disable" and "Apply" to Sweepplot plugn in Msvc++ Debug mode, Opencpn seemed to Accept it with no errrors, and I could run the debug version of Opencpn, but when I then went to hit "Enable" I got these break points that would not go away.

screenshot 107
screenshot 108
screenshot 109

With debug MSVC++ made it do this

Unhandled exception at 0x6C009623 (sweepplot_pi.dll) in opencpn.exe: 0xC0000005: Access violation reading location 0x000600EC.

>	sweepplot_pi.dll!sweepplot_pi::OnToolbarToolCallback(int id) Line 214	C++
 	opencpn.exe!MyFrame::OnToolLeftClick(wxCommandEvent & event) Line 4508	C++
 	wxbase30ud_vc_custom.dll!wxAppConsoleBase::HandleEvent(wxEvtHandler * handler, void (wxEvent &) * func, wxEvent & event) Line 612	C++
 	wxbase30ud_vc_custom.dll!wxAppConsoleBase::CallEventHandler(wxEvtHandler * handler, wxEventFunctor & functor, wxEvent & event) Line 624	C++
 	wxbase30ud_vc_custom.dll!wxEvtHandler::ProcessEventIfMatchesId(const wxEventTableEntryBase & entry, wxEvtHandler * handler, wxEvent & event) Line 1394	C++
 	wxbase30ud_vc_custom.dll!wxEventHashTable::HandleEvent(wxEvent & event, wxEvtHandler * self) Line 998	C++
 	wxbase30ud_vc_custom.dll!wxEvtHandler::TryHereOnly(wxEvent & event) Line 1589	C++
 	wxbase30ud_vc_custom.dll!wxEvtHandler::TryBeforeAndHere(wxEvent & event) Line 3671	C++
 	wxbase30ud_vc_custom.dll!wxEvtHandler::ProcessEvent(wxEvent & event) Line 1491	C++
 	wxbase30ud_vc_custom.dll!wxEvtHandler::DoTryChain(wxEvent & event) Line 1554	C++
 	wxbase30ud_vc_custom.dll!wxEvtHandler::ProcessEventLocally(wxEvent & event) Line 1522	C++
 	wxbase30ud_vc_custom.dll!wxEvtHandler::ProcessEvent(wxEvent & event) Line 1495	C++
 	wxmsw30ud_core_vc_custom.dll!wxWindowBase::TryAfter(wxEvent & event) Line 3427	C++
 	wxbase30ud_vc_custom.dll!wxEvtHandler::ProcessEvent(wxEvent & event) Line 1508	C++
 	wxbase30ud_vc_custom.dll!wxEvtHandler::ProcessPendingEvents() Line 1364	C++
 	wxbase30ud_vc_custom.dll!wxAppConsoleBase::ProcessPendingEvents() Line 522	C++
 	wxbase30ud_vc_custom.dll!wxEventLoopManual::ProcessEvents() Line 168	C++
 	wxbase30ud_vc_custom.dll!wxEventLoopManual::DoRun() Line 206	C++
 	wxbase30ud_vc_custom.dll!wxEventLoopBase::Run() Line 78	C++
 	wxbase30ud_vc_custom.dll!wxAppConsoleBase::MainLoop() Line 334	C++
 	wxbase30ud_vc_custom.dll!wxAppConsoleBase::OnRun() Line 260	C++
 	wxmsw30ud_core_vc_custom.dll!wxAppBase::OnRun() Line 305	C++
 	wxbase30ud_vc_custom.dll!wxEntryReal(int & argc, wchar_t * * argv) Line 495	C++
 	wxbase30ud_vc_custom.dll!wxEntry(int & argc, wchar_t * * argv) Line 188	C++
 	wxmsw30ud_core_vc_custom.dll!wxEntry(HINSTANCE__ * hInstance, HINSTANCE__ * __formal, char * __formal, int nCmdShow) Line 415	C++
 	opencpn.exe!WinMain(HINSTANCE__ * hInstance, HINSTANCE__ * hPrevInstance, char * __formal, int nCmdShow) Line 918	C++
 	[External Code]	
 	[Frames below may be incorrect and/or missing, no symbols loaded for kernel32.dll]	

@rgleason
Copy link
Contributor Author

Then select Continue

Unhandled exception at 0x6C009623 (sweepplot_pi.dll) in opencpn.exe: 0xC0000005: Access violation reading location 0x000600EC.

>	sweepplot_pi.dll!sweepplot_pi::OnToolbarToolCallback(int id) Line 214	C++
 	opencpn.exe!MyFrame::OnToolLeftClick(wxCommandEvent & event) Line 4508	C++
 	wxbase30ud_vc_custom.dll!wxAppConsoleBase::HandleEvent(wxEvtHandler * handler, void (wxEvent &) * func, wxEvent & event) Line 612	C++
 	wxbase30ud_vc_custom.dll!wxAppConsoleBase::CallEventHandler(wxEvtHandler * handler, wxEventFunctor & functor, wxEvent & event) Line 624	C++
 	wxbase30ud_vc_custom.dll!wxEvtHandler::ProcessEventIfMatchesId(const wxEventTableEntryBase & entry, wxEvtHandler * handler, wxEvent & event) Line 1394	C++
 	wxbase30ud_vc_custom.dll!wxEventHashTable::HandleEvent(wxEvent & event, wxEvtHandler * self) Line 998	C++
 	wxbase30ud_vc_custom.dll!wxEvtHandler::TryHereOnly(wxEvent & event) Line 1589	C++
 	wxbase30ud_vc_custom.dll!wxEvtHandler::TryBeforeAndHere(wxEvent & event) Line 3671	C++
 	wxbase30ud_vc_custom.dll!wxEvtHandler::ProcessEvent(wxEvent & event) Line 1491	C++
 	wxbase30ud_vc_custom.dll!wxEvtHandler::DoTryChain(wxEvent & event) Line 1554	C++
 	wxbase30ud_vc_custom.dll!wxEvtHandler::ProcessEventLocally(wxEvent & event) Line 1522	C++
 	wxbase30ud_vc_custom.dll!wxEvtHandler::ProcessEvent(wxEvent & event) Line 1495	C++
 	wxmsw30ud_core_vc_custom.dll!wxWindowBase::TryAfter(wxEvent & event) Line 3427	C++
 	wxbase30ud_vc_custom.dll!wxEvtHandler::ProcessEvent(wxEvent & event) Line 1508	C++
 	wxbase30ud_vc_custom.dll!wxEvtHandler::ProcessPendingEvents() Line 1364	C++
 	wxbase30ud_vc_custom.dll!wxAppConsoleBase::ProcessPendingEvents() Line 522	C++
 	wxbase30ud_vc_custom.dll!wxEventLoopManual::ProcessEvents() Line 168	C++
 	wxbase30ud_vc_custom.dll!wxEventLoopManual::DoRun() Line 206	C++
 	wxbase30ud_vc_custom.dll!wxEventLoopBase::Run() Line 78	C++
 	wxbase30ud_vc_custom.dll!wxAppConsoleBase::MainLoop() Line 334	C++
 	wxbase30ud_vc_custom.dll!wxAppConsoleBase::OnRun() Line 260	C++
 	wxmsw30ud_core_vc_custom.dll!wxAppBase::OnRun() Line 305	C++
 	wxbase30ud_vc_custom.dll!wxEntryReal(int & argc, wchar_t * * argv) Line 495	C++
 	wxbase30ud_vc_custom.dll!wxEntry(int & argc, wchar_t * * argv) Line 188	C++
 	wxmsw30ud_core_vc_custom.dll!wxEntry(HINSTANCE__ * hInstance, HINSTANCE__ * __formal, char * __formal, int nCmdShow) Line 415	C++
 	opencpn.exe!WinMain(HINSTANCE__ * hInstance, HINSTANCE__ * hPrevInstance, char * __formal, int nCmdShow) Line 918	C++
 	[External Code]	
 	[Frames below may be incorrect and/or missing, no symbols loaded for kernel32.dll]	

@rgleason
Copy link
Contributor Author

From sweepplot_pi.cpp Line 210

void sweepplot_pi::OnToolbarToolCallback(int id)
{
    CreatePlots();

    bool shown = !m_SweepPlotDialogs[0]->IsShown();
    for(unsigned int i=0; i<m_SweepPlotDialogs.size(); i++) {
        SweepPlotDialog* dlg = m_SweepPlotDialogs[i];
        if(dlg->IsShown() == shown)
            continue;
        dlg->Show(shown);
        if(shown)
            dlg->SetupPlot();

        wxPoint p = dlg->GetPosition();
        dlg->Move(0, 0);        // workaround for gtk autocentre dialog behavior
        dlg->Move(p);
    }




@seandepagnier
Copy link
Owner

seandepagnier commented Mar 11, 2018 via email

@rgleason
Copy link
Contributor Author

Yes, I had to use VDRplayer by TransmitterDan because VDR_pi is so outdated and will not run in Msvc++ in debug mode.

Here is the file.
Harmut-Netherlands.txt

@rgleason
Copy link
Contributor Author

rgleason commented Mar 11, 2018

Don't know why the second line for Opencpn.exe has OnToolLeftClick. I had opened config just before and closed it, so it was not what shutdown Opencpn, I believe. Is ontoolLeftClick somehow stuck in some state? The config menu was not up and showing when the crash occurs. (see last pic)

I can repeat this. It has happened many times in the Non-debug mode too. It is repeatable.

@rgleason
Copy link
Contributor Author

rgleason commented Mar 11, 2018

Can you make it happen in Linux? Thanks for looking at this!

@rgleason
Copy link
Contributor Author

Fixed closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants