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

wxMaxima crashes ("assert ""gs_autoiIdRefCount[winid]!= ID_FREE"" failed in IncIdRefCount(): id should first be reserved") (probably related to the suggestions context menu) #1980

Open
daute opened this issue Dec 21, 2024 · 0 comments

Comments

@daute
Copy link
Member

daute commented Dec 21, 2024

This is wxMaxima Git version ffbf97c on Windows.

Enter "1e5" (without quotes) place the cursor before the "1" and press the right mouse button.
Maxima responds with an error message:

assert ""gs_autoiIdRefCount[winid]!= ID_FREE"" failed in IncIdRefCount(): id should first be reserved

Here is a backtrace:

 (gdb) bt
#0  0x0000000000b90cb0 in wxWindowIDRef::Assign(int) ()
#1  0x0000000000b29a93 in wxMenuItemBase::wxMenuItemBase(wxMenu*, int, wxString const&, wxString const&, wxItemKind, wxMenu*) ()
#2  0x0000000000a17cdd in wxMenuItem::wxMenuItem(wxMenu*, int, wxString const&, wxString const&, wxItemKind, wxMenu*)
    ()
#3  0x0000000000a18791 in wxMenuItemBase::New(wxMenu*, int, wxString const&, wxString const&, wxItemKind, wxMenu*) ()
#
assert ""gs_autoiIdRefCount[winid]!= ID_FREE"" failed in IncIdRefCount(): id should first be reserved4  0x0000000000f034c9 in wxMenuBase::Append (this=0x5e36390, itemid=-31265, text=..., help=..., kind=wxITEM_NORMAL)
    at /home/dauti/Software/Crosscompiled-Windows-installer/build/wxwidgets/wxwidgets-prefix/src/wxwidgets/include/wx/menu.h:67
#5  0x000000000047fd4b in Worksheet::OnMouseRightDown (this=0x8002120, event=...)
    at /home/dauti/Software/wxmaxima/src/Worksheet.cpp:1827
#6  0x0000000000cc6438 in wxAppConsoleBase::CallEventHandler(wxEvtHandler*, wxEventFunctor&, wxEvent&) const ()
#7  0x0000000000e2a8a1 in wxEvtHandler::ProcessEventIfMatchesId(wxEventTableEntryBase const&, wxEvtHandler*, wxEvent&)
    ()
#8  0x0000000000e2ad57 in wxEvtHandler::SearchDynamicEventTable(wxEvent&) ()
#9  0x0000000000e2b0c5 in wxEvtHandler::TryHereOnly(wxEvent&) ()
#10 0x0000000000e2b17c in wxEvtHandler::ProcessEventLocally(wxEvent&) ()
#11 0x0000000000e2b282 in wxEvtHandler::ProcessEvent(wxEvent&) ()
#12 0x0000000000bba9bc in wxScrollHelperEvtHandler::ProcessEvent(wxEvent&) ()
#13 0x0000000000e2c36c in wxEvtHandler::SafelyProcessEvent(wxEvent&) ()
#14 0x00000000009858d6 in wxWindow::HandleMouseEvent(unsigned int, int, int, unsigned int) ()
#15 0x0000000000990849 in wxWindow::MSWHandleMessage(long long*, unsigned int, unsigned long long, long long) ()
#16 0x000000000097e2cf in wxWindow::MSWWindowProc(unsigned int, unsigned long long, long long) ()
#17 0x0000000000f03d74 in wxScrolled<wxWindow>::MSWWindowProc (this=0x8002120, nMsg=516, wParam=2, lParam=1245325)
    at /home/dauti/Software/Crosscompiled-Windows-installer/build/wxwidgets/wxwidgets-prefix/src/wxwidgets/include/wx/scrolwin.h:468
#18 0x00007ff8c6ba83f1 in USER32!DispatchMessageW () from C:\Windows\System32\user32.dll
#19 0x00007ff8c6ba7eb1 in USER32!DispatchMessageW () from C:\Windows\System32\user32.dll
#20 0x000000000099c1ad in wxGUIEventLoop::Dispatch() ()
--Type <RET> for more, q to quit, c to continue without paging--
#21 0x0000000000cfb579 in wxEventLoopManual::ProcessEvents() ()
#22 0x0000000000cfb690 in wxEventLoopManual::DoRun() ()
#23 0x0000000000cfb2bb in wxEventLoopBase::Run() ()
#24 0x0000000000cc98fc in wxAppConsoleBase::MainLoop() ()
#25 0x00000000004b5ca1 in MyApp::OnRun (this=0x7fa4230) at /home/dauti/Software/wxmaxima/src/main.cpp:491
#26 0x00000000004b337d in CommonMain () at /home/dauti/Software/wxmaxima/src/main.cpp:97
#27 0x00000000004b386b in WinMain (hI=0x400000, hPrevI=0x0, lpCmdLine=0x5ed5467 "", nCmdShow=10)
    at /home/dauti/Software/wxmaxima/src/main.cpp:188
#28 0x00000000010865b2 in main (flags=<optimized out>, cmdline=<optimized out>, inst=<optimized out>)
    at ./mingw-w64-crt/crt/crt0_c.c:18
#29 0x00000000004013b4 in __tmainCRTStartup () at ./mingw-w64-crt/crt/crtexe.c:339
#30 0x00000000004014db in WinMainCRTStartup () at ./mingw-w64-crt/crt/crtexe.c:195

That (src/Worksheet.cpp:1827) suggests, that there is something wrong when building the suggestions context menu. Strange, but I don't see the solution now.

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

1 participant