geany / geany-plugins

The combined Geany Plugins collection
http://plugins.geany.org/
594 stars 268 forks source link

GeanyPy crashes Geany #558

Open kslane opened 7 years ago

kslane commented 7 years ago

When enabling GeanyPy from the plugins manager, geany crashes Geany 1.30.1

0x00007fffe3af09a1 in PyModule_AddObject () from /lib64/libpython2.7.so.1.0
(gdb) bt
#0  0x00007fffe3af09a1 in PyModule_AddObject () at /lib64/libpython2.7.so.1.0
#1  0x00007fffe3de48b0 in geanypy_init () at /usr/lib64/geany/geanypy.so
#2  0x00007ffff79a9f85 in plugin_new () at /lib64/libgeany.so.0
#3  0x00007ffff79aad12 in pm_plugin_toggled () at /lib64/libgeany.so.0
#4  0x00007ffff57443e5 in g_closure_invoke () at /lib64/libgobject-2.0.so.0
#5  0x00007ffff5756432 in signal_emit_unlocked_R () at /lib64/libgobject-2.0.so.0
#6  0x00007ffff575f05f in g_signal_emit_valist () at /lib64/libgobject-2.0.so.0
#7  0x00007ffff575f43f in g_signal_emit () at /lib64/libgobject-2.0.so.0
#8  0x00007ffff734c017 in gtk_cell_renderer_toggle_activate () at /lib64/libgtk-x11-2.0.so.0
#9  0x00007ffff751180f in gtk_tree_view_column_cell_process_action.isra ()
    at /lib64/libgtk-x11-2.0.so.0
#10 0x00007ffff7511a2b in _gtk_tree_view_column_cell_event () at /lib64/libgtk-x11-2.0.so.0
#11 0x00007ffff7505ba5 in gtk_tree_view_button_press () at /lib64/libgtk-x11-2.0.so.0
#12 0x00007ffff73efb9e in _gtk_marshal_BOOLEAN__BOXED () at /lib64/libgtk-x11-2.0.so.0
#13 0x00007ffff57443e5 in g_closure_invoke () at /lib64/libgobject-2.0.so.0
#14 0x00007ffff575682d in signal_emit_unlocked_R () at /lib64/libgobject-2.0.so.0
codebrainz commented 7 years ago

Only when enabling from not being enabled, or when toggling between enabled-disabled-enabled? (ex. https://github.com/codebrainz/geanypy/issues/12)

Also can you give the debug messages in Help->Debug Messages when it crashes?

kslane commented 7 years ago

This happens when when clicking the checkbox to enable GeanyPy. Geany terminates immediately, nothing is added to the debug messages. here is the startup messages

18:12:19: Geany INFO        : GTK 2.24.31, GLib 2.50.3
18:12:19: Geany INFO        : System data dir: /usr/share/geany
18:12:19: Geany INFO        : User config dir: (removed path ~)/.config/geany
18:12:19: Geany INFO        : System plugin path: /usr/lib64/geany
18:12:19: Geany INFO        : Added filetype JSON (61).
18:12:19: Geany INFO        : Added filetype Cython (62).
18:12:19: Geany INFO        : Added filetype Genie (63).
18:12:19: Geany INFO        : Added filetype CUDA (64).
18:12:19: Geany INFO        : Added filetype Clojure (65).
18:12:19: Geany INFO        : Added filetype Arduino (66).
18:12:19: Geany INFO        : Added filetype Graphviz (67).
18:12:19: Geany INFO        : Added filetype Scala (68).
18:12:19: Geany INFO        : Loaded libvte from libvte.so.9
18:12:19: Geany INFO        : Loaded:   /usr/lib64/geany/geanygendoc.so (Documentation Generator)
18:12:19: Geany INFO        : Loaded:   /usr/lib64/geany/geanyvc.so (GeanyVC)
18:12:19: Geany INFO        : Loaded:   /usr/lib64/geany/spellcheck.so (Spell Check)
18:12:19: Geany INFO        : (removed path)/remote.py : Python (UTF-8)
18:12:19: Geany INFO        : Loaded /usr/share/geany/tags/std.py.tags (Python), 5964 symbol(s).
18:12:19: Geany INFO        : (removed path)/main.py : Python (UTF-8)

Here is a trace from KDE

{   "signal": 11
,   "executable": "/usr/bin/geany"
,   "only_crash_thread": true
,   "stacktrace":
      [ {   "crash_thread": true
        ,   "frames":
              [ {   "address": 140098444069281
                ,   "build_id": "d367003737badd37db0dbe7d0dfdc9345d2649f7"
                ,   "build_id_offset": 1038753
                ,   "function_name": "PyModule_AddObject"
                ,   "file_name": "/usr/lib64/libpython2.7.so.1.0"
                }
              , {   "address": 140098447165616
                ,   "build_id": "60f1706b6d207cea378f43fd4279fa8de8666f17"
                ,   "build_id_offset": 71856
                ,   "function_name": "geanypy_init"
                ,   "file_name": "/usr/lib64/geany/geanypy.so"
                }
              , {   "address": 140098775129989
                ,   "build_id": "38210970d2c7d87a1c94d62a3f682f20a3fdf331"
                ,   "build_id_offset": 487301
                ,   "function_name": "plugin_new"
                ,   "file_name": "/usr/lib64/libgeany.so.0.0.0"
                }
              , {   "address": 140098775133458
                ,   "build_id": "38210970d2c7d87a1c94d62a3f682f20a3fdf331"
                ,   "build_id_offset": 490770
                ,   "function_name": "pm_plugin_toggled"
                ,   "file_name": "/usr/lib64/libgeany.so.0.0.0"
                }
              , {   "address": 140098738856933
                ,   "build_id": "8f0af3ac13665e292515639f3557b9f9c9b59b7c"
                ,   "build_id_offset": 62437
                ,   "function_name": "g_closure_invoke"
                ,   "file_name": "/usr/lib64/libgobject-2.0.so.0.5000.3"
                }
              , {   "address": 140098738930738
                ,   "build_id": "8f0af3ac13665e292515639f3557b9f9c9b59b7c"
                ,   "build_id_offset": 136242
                ,   "function_name": "signal_emit_unlocked_R"
                ,   "file_name": "/usr/lib64/libgobject-2.0.so.0.5000.3"
                }
              , {   "address": 140098738966623
                ,   "build_id": "8f0af3ac13665e292515639f3557b9f9c9b59b7c"
                ,   "build_id_offset": 172127
                ,   "function_name": "g_signal_emit_valist"
                ,   "file_name": "/usr/lib64/libgobject-2.0.so.0.5000.3"
                }
              , {   "address": 140098738967615
                ,   "build_id": "8f0af3ac13665e292515639f3557b9f9c9b59b7c"
                ,   "build_id_offset": 173119
                ,   "function_name": "g_signal_emit"
                ,   "file_name": "/usr/lib64/libgobject-2.0.so.0.5000.3"
                }
              , {   "address": 140098768445463
                ,   "build_id": "83b153c37b177bbcfcab011672f28fba50de4e44"
                ,   "build_id_offset": 651287
                ,   "function_name": "gtk_cell_renderer_toggle_activate"
                ,   "file_name": "/usr/lib64/libgtk-x11-2.0.so.0.2400.31"
                }
              , {   "address": 140098770302991
                ,   "build_id": "83b153c37b177bbcfcab011672f28fba50de4e44"
                ,   "build_id_offset": 2508815
                ,   "function_name": "gtk_tree_view_column_cell_process_action.isra.32"
                ,   "file_name": "/usr/lib64/libgtk-x11-2.0.so.0.2400.31"
                }
              , {   "address": 140098770303531
                ,   "build_id": "83b153c37b177bbcfcab011672f28fba50de4e44"
                ,   "build_id_offset": 2509355
                ,   "function_name": "_gtk_tree_view_column_cell_event"
                ,   "file_name": "/usr/lib64/libgtk-x11-2.0.so.0.2400.31"
                }
              , {   "address": 140098770254462
                ,   "build_id": "83b153c37b177bbcfcab011672f28fba50de4e44"
                ,   "build_id_offset": 2460286
                ,   "function_name": "gtk_tree_view_button_press"
                ,   "file_name": "/usr/lib64/libgtk-x11-2.0.so.0.2400.31"
                }
              , {   "address": 140098769116062
                ,   "build_id": "83b153c37b177bbcfcab011672f28fba50de4e44"
                ,   "build_id_offset": 1321886
                ,   "function_name": "_gtk_marshal_BOOLEAN__BOXED"
                ,   "file_name": "/usr/lib64/libgtk-x11-2.0.so.0.2400.31"
                }
              , {   "address": 140098738856933
                ,   "build_id": "8f0af3ac13665e292515639f3557b9f9c9b59b7c"
                ,   "build_id_offset": 62437
                ,   "function_name": "g_closure_invoke"
                ,   "file_name": "/usr/lib64/libgobject-2.0.so.0.5000.3"
                }
              , {   "address": 140098738931757
                ,   "build_id": "8f0af3ac13665e292515639f3557b9f9c9b59b7c"
                ,   "build_id_offset": 137261
                ,   "function_name": "signal_emit_unlocked_R"
                ,   "file_name": "/usr/lib64/libgobject-2.0.so.0.5000.3"
                }
              , {   "address": 140098738965391
                ,   "build_id": "8f0af3ac13665e292515639f3557b9f9c9b59b7c"
                ,   "build_id_offset": 170895
                ,   "function_name": "g_signal_emit_valist"
                ,   "file_name": "/usr/lib64/libgobject-2.0.so.0.5000.3"
                }
              , {   "address": 140098738967615
                ,   "build_id": "8f0af3ac13665e292515639f3557b9f9c9b59b7c"
                ,   "build_id_offset": 173119
                ,   "function_name": "g_signal_emit"
                ,   "file_name": "/usr/lib64/libgobject-2.0.so.0.5000.3"
                }
              , {   "address": 140098770362764
                ,   "build_id": "83b153c37b177bbcfcab011672f28fba50de4e44"
                ,   "build_id_offset": 2568588
                ,   "function_name": "gtk_widget_event_internal"
                ,   "file_name": "/usr/lib64/libgtk-x11-2.0.so.0.2400.31"
                }
              , {   "address": 140098769108564
                ,   "build_id": "83b153c37b177bbcfcab011672f28fba50de4e44"
                ,   "build_id_offset": 1314388
                ,   "function_name": "gtk_propagate_event"
                ,   "file_name": "/usr/lib64/libgtk-x11-2.0.so.0.2400.31"
                }
              , {   "address": 140098769109531
                ,   "build_id": "83b153c37b177bbcfcab011672f28fba50de4e44"
                ,   "build_id_offset": 1315355
                ,   "function_name": "gtk_main_do_event"
                ,   "file_name": "/usr/lib64/libgtk-x11-2.0.so.0.2400.31"
                }
              , {   "address": 140098765268124
                ,   "build_id": "16c954204107c0ae164394dc9199be8c2968a47a"
                ,   "build_id_offset": 390300
                ,   "function_name": "gdk_event_dispatch"
                ,   "file_name": "/usr/lib64/libgdk-x11-2.0.so.0.2400.31"
                }
              , {   "address": 140098731593298
                ,   "build_id": "3b5186f89b9971902d8124e8eee90486b1e569de"
                ,   "build_id_offset": 302674
                ,   "function_name": "g_main_context_dispatch"
                ,   "file_name": "/usr/lib64/libglib-2.0.so.0.5000.3"
                }
              , {   "address": 140098731594192
                ,   "build_id": "3b5186f89b9971902d8124e8eee90486b1e569de"
                ,   "build_id_offset": 303568
                ,   "function_name": "g_main_context_iterate.isra.24"
                ,   "file_name": "/usr/lib64/libglib-2.0.so.0.5000.3"
                }
              , {   "address": 140098731594994
                ,   "build_id": "3b5186f89b9971902d8124e8eee90486b1e569de"
                ,   "build_id_offset": 304370
                ,   "function_name": "g_main_loop_run"
                ,   "file_name": "/usr/lib64/libglib-2.0.so.0.5000.3"
                }
              , {   "address": 140098769105511
                ,   "build_id": "83b153c37b177bbcfcab011672f28fba50de4e44"
                ,   "build_id_offset": 1311335
                ,   "function_name": "gtk_main"
                ,   "file_name": "/usr/lib64/libgtk-x11-2.0.so.0.2400.31"
                }
              , {   "address": 140098775106087
                ,   "build_id": "38210970d2c7d87a1c94d62a3f682f20a3fdf331"
                ,   "build_id_offset": 463399
                ,   "function_name": "main_lib"
                ,   "file_name": "/usr/lib64/libgeany.so.0.0.0"
                } ]
        } ]
}
lpaulsen93 commented 6 years ago

@codebrainz: I can re-produce that only on enabling and then disabling the plugin again. Let me know if you want to have a backtrace of it.

lpaulsen93 commented 5 years ago

As mentioned before I can re-produce the crash on disabling the plugin. But it needs about 10-20 on-off clicks to get the crash, it doesn't happen always. Here is a backtrace from my system:

(gdb) backtrace
#0  0x00007fffd3593b84 in  () at /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
#1  0x00007fffd35cbf7c in  () at /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
#2  0x00007fffd35cbf7c in  () at /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
#3  0x00007fffd3638e1a in _PyImport_Fini () at /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
#4  0x00007fffd35b5bb6 in Py_Finalize () at /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
#5  0x00007fffd39fc063 in GeanyPy_stop_interpreter () at geanypy-plugin.c:140
#6  0x00007fffd39fcc75 in geanypy_cleanup (plugin=0x555556bbf0c8, pdata=0x55555689cfe0) at geanypy-plugin.c:407
#7  0x00007ffff792a6df in plugin_cleanup (plugin=0x555556bbf0a0) at plugins.c:897
#8  0x00007ffff792a9bb in plugin_free (plugin=0x555556bbf0a0) at plugins.c:985
#9  0x00007ffff792bad6 in pm_plugin_toggled (cell=0x555555ad35a0, pth=0x555556c1c900 "14", data=0x0) at plugins.c:1530
#10 0x00007ffff5a0710d in g_closure_invoke () at /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#11 0x00007ffff5a1a05e in  () at /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#12 0x00007ffff5a22715 in g_signal_emit_valist () at /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#13 0x00007ffff5a2312f in g_signal_emit () at /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#14 0x00007ffff6efec31 in  () at /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#15 0x00007ffff709a281 in  () at /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#16 0x00007ffff709a529 in  () at /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#17 0x00007ffff708f480 in  () at /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#18 0x00007ffff6f9238b in  () at /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#19 0x00007ffff5a0710d in g_closure_invoke () at /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#20 0x00007ffff5a19de8 in  () at /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#21 0x00007ffff5a220af in g_signal_emit_valist () at /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#22 0x00007ffff5a2312f in g_signal_emit () at /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#23 0x00007ffff70a82bc in  () at /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#24 0x00007ffff6f9062c in gtk_propagate_event () at /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#25 0x00007ffff6f90a2b in gtk_main_do_event () at /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#26 0x00007ffff6c0602c in  () at /usr/lib/x86_64-linux-gnu/libgdk-x11-2.0.so.0
#27 0x00007ffff5528417 in g_main_context_dispatch () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#28 0x00007ffff5528650 in  () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#29 0x00007ffff5528962 in g_main_loop_run () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#30 0x00007ffff6f8fa37 in gtk_main () at /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#31 0x00007ffff792364c in main_lib (argc=1, argv=0x7fffffffde08) at libmain.c:1259
#32 0x000055555555472a in main (argc=1, argv=0x7fffffffde08) at main.c:27
(gdb) 
elextr commented 5 years ago

Only going to be worth it if its simple to fix, the rate that distros are removing Python 2 things Geanypy won't be packaged by the next release. Sadly the developer of the replacement has not made it available as part of Geany or Geany-plugins. Its not even mentioned on the geany-plugins website :(