brettbode / wxmacmolplt

wxMacMolPlt is a graphical user interface principally for the GAMESS program
https://brettbode.github.io/wxmacmolplt/
Other
30 stars 9 forks source link

wxGTK assertion after right-clicking on an atom #124

Closed rathann closed 3 years ago

rathann commented 3 years ago

Please describe the problem or enhancement:

An assertion dialog box is shown after right-clicking on an atom.

ASSERT INFO:
/usr/include/wx-3.1/wx/strvararg.h(480): assert "(argtype & (wxFormatStringSpecifier<T>::value)) == argtype" failed in wxArgNormalizer(): format specifier doesn't match argument type

BACKTRACE:
Thread 1 (Thread 0x7ffff4b4ea80 (LWP 14820) "wxmacmolplt"):
#0  0x00007ffff6e155bf in __GI___poll (fds=0x55555748f060, nfds=2, timeout=272) at ../sysdeps/unix/sysv/linux/poll.c:29
#1  0x00007ffff6bc447c in g_main_context_poll (priority=<optimized out>, n_fds=2, fds=0x55555748f060, timeout=<optimized out>, context=0x55555598b470) at ../glib/gmain.c:4434
#2  g_main_context_iterate.constprop.0 (context=0x55555598b470, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at ../glib/gmain.c:4126
#3  0x00007ffff6b6fa93 in g_main_loop_run (loop=0x555557b46f90) at ../glib/gmain.c:4329
#4  0x00007ffff64d0c37 in gtk_dialog_run (dialog=0x555557af83f0) at /usr/src/debug/gtk3-3.24.29-1.fc34.x86_64/gtk/gtkdialog.c:1398
#5  0x00007ffff78cace8 in wxGUIAppTraits::ShowAssertDialog (this=<optimized out>, msg=...) at ../src/gtk/utilsgtk.cpp:360
#6  0x00007ffff7df9042 in ShowAssertDialog (file=..., line=480, func=..., cond=..., msgUser=..., traits=0x555555952e90) at ../src/common/appbase.cpp:1383
#7  0x00007ffff7df9279 in wxAppConsoleBase::OnAssertFailure (this=this@entry=0x555555952ab0, file=<optimized out>, line=480, func=<optimized out>, cond=<optimized out>, msg=<optimized out>) at ../src/common/appbase.cpp:866
#8  0x00007ffff789a194 in wxApp::OnAssertFailure (this=0x555555952ab0, file=<optimized out>, line=<optimized out>, func=<optimized out>, cond=<optimized out>, msg=<optimized out>) at ../src/gtk/app.cpp:501
#9  0x00007ffff7dfa22b in wxDefaultAssertHandler (file=..., line=line@entry=480, func=..., cond=..., msg=...) at ../src/common/appbase.cpp:1175
#10 0x00007ffff7df41f8 in wxOnAssert (file=file@entry=0x5555558254b8 "/usr/include/wx-3.1/wx/strvararg.h", line=line@entry=480, func=0x7fffffffcb00 "@d\177WUU", func@entry=0x5555558259f3 "wxArgNormalizer", cond=0x7fffffffcad0 "", cond@entry=0x555555825478 "(argtype & (wxFormatStringSpecifier<T>::value)) == argtype", msg=msg@entry=0x555555825448 "format specifier doesn't match argument type") at ../src/common/appbase.cpp:1252
#11 0x000055555561c944 in wxArgNormalizer<long>::wxArgNormalizer (this=<optimized out>, value=<optimized out>, fmt=<optimized out>, index=<optimized out>) at /usr/include/wx-3.1/wx/strvararg.h:476
#12 wxArgNormalizer<long>::wxArgNormalizer (index=1, fmt=0x7fffffffcbd0, value=1, this=<optimized out>) at /usr/include/wx-3.1/wx/strvararg.h:476
#13 wxArgNormalizerWchar<long>::wxArgNormalizerWchar (index=1, fmt=0x7fffffffcbd0, value=1, this=<optimized out>) at /usr/include/wx-3.1/wx/strvararg.h:500
#14 wxString::Printf<long> (this=0x7fffffffcc30, f1=..., a1=1) at /usr/include/wx-3.1/wx/string.h:2322
#15 0x000055555572b674 in MpGLCanvas::insertAnnotationMenuItems (this=0x555555aaa000, menu=...) at /builddir/build/BUILD/wxmacmolplt-5107134f0d5c30bfeda3aafa3bd911c9eb0d02c3/src/mpGLCanvas.cpp:2668
#16 0x0000555555723853 in MpGLCanvas::interactPopupMenu (this=0x555555aaa000, x=167, y=117, isAtom=<optimized out>) at /builddir/build/BUILD/wxmacmolplt-5107134f0d5c30bfeda3aafa3bd911c9eb0d02c3/src/mpGLCanvas.cpp:2501
#17 0x00007ffff7f0983e in wxEvtHandler::ProcessEventIfMatchesId (entry=..., entry=..., event=..., handler=0x555555aaa000) at ../src/common/event.cpp:1425
#18 wxEvtHandler::ProcessEventIfMatchesId (entry=..., handler=handler@entry=0x555555aaa000, event=...) at ../src/common/event.cpp:1400
#19 0x00007ffff7f0c8fb in wxEventHashTable::HandleEvent (this=<optimized out>, event=..., self=self@entry=0x555555aaa000) at ../src/common/event.cpp:1033
#20 0x00007ffff7f0d9ed in wxEvtHandler::TryHereOnly (event=..., this=0x555555aaa000) at ../src/common/event.cpp:1622
#21 wxEvtHandler::TryHereOnly (this=this@entry=0x555555aaa000, event=...) at ../src/common/event.cpp:1611
#22 0x00007ffff7f0da6f in wxEvtHandler::TryBeforeAndHere (event=..., this=0x555555aaa000) at ../include/wx/event.h:3925
#23 wxEvtHandler::TryBeforeAndHere (event=..., this=0x555555aaa000) at ../include/wx/event.h:3925
#24 wxEvtHandler::ProcessEventLocally (this=this@entry=0x555555aaa000, event=...) at ../src/common/event.cpp:1555
#25 0x00007ffff7f0db89 in wxEvtHandler::ProcessEvent (this=0x555555aaa000, event=...) at ../src/common/event.cpp:1528
#26 0x00007ffff7f0e1cb in wxEvtHandler::SafelyProcessEvent (this=<optimized out>, event=...) at ../src/common/event.cpp:1646
#27 0x00007ffff78d7e38 in gtk_window_button_press_callback (gdk_event=0x5555559823e0, win=0x555555aaa000) at ../src/gtk/window.cpp:1689
#28 0x00007ffff6703327 in _gtk_marshal_BOOLEAN__BOXED (closure=closure@entry=0x555555c49740, return_value=return_value@entry=0x7fffffffd2f0, n_param_values=n_param_values@entry=2, param_values=param_values@entry=0x7fffffffd350, invocation_hint=invocation_hint@entry=0x7fffffffd2d0, marshal_data=marshal_data@entry=0x0) at /usr/src/debug/gtk3-3.24.29-1.fc34.x86_64/gtk/gtkmarshalers.c:83
#29 0x00007ffff6c68c2f in g_closure_invoke (closure=0x555555c49740, return_value=0x7fffffffd2f0, n_param_values=2, param_values=0x7fffffffd350, invocation_hint=0x7fffffffd2d0) at ../gobject/gclosure.c:810
#30 0x00007ffff6c84ea6 in signal_emit_unlocked_R (node=<optimized out>, detail=detail@entry=0, instance=instance@entry=0x555555c16400, emission_return=emission_return@entry=0x7fffffffd470, instance_and_params=instance_and_params@entry=0x7fffffffd350) at ../gobject/gsignal.c:3741
#31 0x00007ffff6c862de in g_signal_emit_valist (instance=<optimized out>, signal_id=<optimized out>, detail=<optimized out>, var_args=var_args@entry=0x7fffffffd520) at ../gobject/gsignal.c:3507
#32 0x00007ffff6c86983 in g_signal_emit (instance=instance@entry=0x555555c16400, signal_id=<optimized out>, detail=detail@entry=0) at ../gobject/gsignal.c:3553
#33 0x00007ffff66c9f64 in gtk_widget_event_internal.part.0.lto_priv.0 (widget=0x555555c16400, event=0x5555559823e0) at /usr/src/debug/gtk3-3.24.29-1.fc34.x86_64/gtk/gtkwidget.c:7808
#34 0x00007ffff656d320 in propagate_event_up (topmost=<optimized out>, event=<optimized out>, widget=0x555555c16400) at /usr/src/debug/gtk3-3.24.29-1.fc34.x86_64/gtk/gtkmain.c:2588
#35 propagate_event (widget=widget@entry=0x555555c16400, event=event@entry=0x5555559823e0, captured=captured@entry=0, topmost=topmost@entry=0x0) at /usr/src/debug/gtk3-3.24.29-1.fc34.x86_64/gtk/gtkmain.c:2691
#36 0x00007ffff656d453 in gtk_propagate_event (widget=widget@entry=0x555555c16400, event=event@entry=0x5555559823e0) at /usr/src/debug/gtk3-3.24.29-1.fc34.x86_64/gtk/gtkmain.c:2725
#37 0x00007ffff656e1ea in gtk_main_do_event (event=<optimized out>) at /usr/src/debug/gtk3-3.24.29-1.fc34.x86_64/gtk/gtkmain.c:1921
#38 gtk_main_do_event (event=<optimized out>) at /usr/src/debug/gtk3-3.24.29-1.fc34.x86_64/gtk/gtkmain.c:1691
#39 0x00007ffff62507d3 in _gdk_event_emit (event=0x5555559823e0) at /usr/src/debug/gtk3-3.24.29-1.fc34.x86_64/gdk/gdkevents.c:73
#40 _gdk_event_emit (event=0x5555559823e0) at /usr/src/debug/gtk3-3.24.29-1.fc34.x86_64/gdk/gdkevents.c:67
#41 0x00007ffff6287c16 in gdk_event_source_dispatch (source=<optimized out>, callback=<optimized out>, user_data=<optimized out>) at x11/gdkeventsource.c:367
#42 0x00007ffff6b704cf in g_main_dispatch (context=0x55555598b470) at ../glib/gmain.c:3337
#43 g_main_context_dispatch (context=0x55555598b470) at ../glib/gmain.c:4055
#44 0x00007ffff6bc44e8 in g_main_context_iterate.constprop.0 (context=0x55555598b470, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at ../glib/gmain.c:4131
#45 0x00007ffff6b6fa93 in g_main_loop_run (loop=0x555555aaef00) at ../glib/gmain.c:4329
#46 0x00007ffff656447d in gtk_main () at /usr/src/debug/gtk3-3.24.29-1.fc34.x86_64/gtk/gtkmain.c:1329
#47 0x00007ffff78b1bc5 in wxGUIEventLoop::DoRun (this=0x55555596c320) at ../src/gtk/evtloop.cpp:64
#48 0x00007ffff7e1f5b1 in wxEventLoopBase::Run (this=0x55555596c320) at ../src/common/evtloopcmn.cpp:90
#49 0x00007ffff7dfbc1a in wxAppConsoleBase::MainLoop (this=0x555555952ab0) at ../src/common/appbase.cpp:380
#50 0x00007ffff7e5ad0e in wxEntry (argc=<optimized out>, argv=<optimized out>) at ../src/common/init.cpp:507
#51 0x0000555555604f27 in main (argc=<optimized out>, argv=0x7fffffffda98) at /builddir/build/BUILD/wxmacmolplt-5107134f0d5c30bfeda3aafa3bd911c9eb0d02c3/src/main.cpp:509

If this is a bug report please list the steps required to reproduce the problem:

  1. Add an atom
  2. Right-click on it

What version are you running?

7.7.1-pre (git commit 5107134f0d5c30bfeda3aafa3bd911c9eb0d02c3)

What OS are you using? (please include 32/64 bit and if Linux the specific distribution)

Fedora 34 64-bit.

brettbode commented 3 years ago

Hi, I just checked in a change that should clear the assertion. Thanks for the report. Brett

rathann commented 3 years ago

Indeed it does. The assertion is gone after fc6f3c184d3bad7bce7c6ab1ce89d9f6222c985f . Thanks for the quick fix!