geanypy icon indicating copy to clipboard operation
geanypy copied to clipboard

Plugin initiation hangs with segmentation fault on geany 0.21 with python 2.7.2 on arch-linux

Open sagarchalise opened this issue 13 years ago • 6 comments

Got this error on gdb and bt

Program received signal SIGSEGV, Segmentation fault. 0x00007fffe8a1a565 in PyObject_GetAttrString () from /usr/lib/libpython2.7.so.1.0 (gdb) bt #0 0x00007fffe8a1a565 in PyObject_GetAttrString () from /usr/lib/libpython2.7.so.1.0 #1 0x00007fffe8a1a8b6 in PyObject_HasAttrString () from /usr/lib/libpython2.7.so.1.0 #2 0x00007fffe8a895f0 in ensure_fromlist () from /usr/lib/libpython2.7.so.1.0

Cannot access memory at address 0x7fffffffc5c8

sagarchalise avatar Feb 04 '12 18:02 sagarchalise

Can you post the code of the plugin being loaded (if any)?

Also can you try deleting (or emptying) the file ~/.config/geany/plugins/geanypy/plugins/.loaded_plugins and see if it still crashes?

codebrainz avatar Feb 04 '12 23:02 codebrainz

I was not trying to load any plugin written with geanypy. I guess I have to load GeanyPy first and it happened when I was loading/enabling GeanyPy . I tried what you said but still doesnot work. It crashes with segmentation fault as soon as I check the plugin loading box for GeanyPy.

sagarchalise avatar Feb 05 '12 05:02 sagarchalise

Hmm, any chance of trying again with gdb or even valgrind and using the -v argument to Geany? I can't tell what's going on from that backtrace since the calls before that memory access message are all inside Python itself.

codebrainz avatar Feb 05 '12 06:02 codebrainz

If I enable it through geany.conf and then load gdb I get this otherwise its the same as above when I run geany and then enable it (gdb) run -v Starting program: /usr/bin/geany -v [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/libthread_db.so.1". Geany-INFO: Geany 0.21, en_US.utf8 Geany-INFO: GTK 2.24.9, GLib 2.30.2 Geany-INFO: System data dir: /usr/share/geany Geany-INFO: User config dir: /home/sagarchalise/.config/geany Geany-INFO: Added filetype Cython (52). Geany-INFO: Added filetype Scala (53). Geany-INFO: Added filetype Genie (54). [New Thread 0x7fffeddea700 (LWP 6749)] Geany-INFO: Loaded: /usr/lib/geany/addons.so (Addons) Geany-INFO: Loaded: /usr/lib/geany/geanydoc.so (Doc) Geany-INFO: Loaded: /usr/lib/geany/geanygendoc.so (Documentation Generator) Geany-INFO: Loaded: /usr/lib/geany/export.so (Export) Geany-INFO: Loaded: /usr/lib/geany/geanyextrasel.so (Extra Selection) Geany-INFO: Loaded: /usr/lib/geany/gproject.so (GProject) Geany-INFO: Loaded: /usr/lib/geany/geanylipsum.so (GeanyLipsum) GeanyPG: Using libgpgme version: 1.3.1 Geany-INFO: Loaded: /usr/lib/geany/geanypg.so (GeanyPG) Geany-INFO: Loaded: /usr/lib/geany/htmlchars.so (HTML Characters) Geany-INFO: Loaded: /usr/lib/geany/geanyinsertnum.so (Insert Numbers) Lua Script: Using support library path: /usr/lib/geany-plugins/geanylua/libgeanylua.so

 ==>> Lua Script: Building menu from '/usr/share/geany-plugins/geanylua'

Lua Script: File not found /usr/share/geany-plugins/geanylua/hotkeys.cfg

Geany-INFO: Loaded: /usr/lib/geany/geanylua.so (Lua Script) Geany-INFO: Loaded: /usr/lib/geany/geanymacro.so (Macros) Geany-INFO: Loaded: /usr/lib/geany/geanynumberedbookmarks.so (Numbered Bookmarks) Geany-INFO: Loaded: /usr/lib/geany/shiftcolumn.so (Shift Column) Geany-INFO: Loaded: /usr/lib/geany/spellcheck.so (Spell Check) Geany-INFO: Loaded: /usr/lib/geany/splitwindow.so (Split Window) Geany-INFO: Loaded: /usr/lib/geany/tableconvert.so (Tableconvert) Geany-INFO: Loaded: /usr/lib/geany/treebrowser.so (TreeBrowser) Geany-INFO: Loaded: /usr/lib/geany/pretty-print.so (XML PrettyPrinter) Geany-INFO: Loaded: /usr/lib/geany/xmlsnippets.so (XML Snippets) Geany-INFO: Loaded: /usr/lib/geany/zencoding.so (Zen Coding)

Program received signal SIGSEGV, Segmentation fault. 0x00007fffe8a1a565 in PyObject_GetAttrString () from /usr/lib/libpython2.7.so.1.0 (gdb) bt #0 0x00007fffe8a1a565 in PyObject_GetAttrString () from /usr/lib/libpython2.7.so.1.0 #1 0x00007fffe8a1a8b6 in PyObject_HasAttrString () from /usr/lib/libpython2.7.so.1.0 #2 0x00007fffe8a895f0 in ensure_fromlist () from /usr/lib/libpython2.7.so.1.0 #3 0x00007fffe8a89b64 in import_module_level.isra.9 () from /usr/lib/libpython2.7.so.1.0 #4 0x00007fffe8a8a01a in PyImport_ImportModuleLevel () from /usr/lib/libpython2.7.so.1.0 #5 0x00007fffe8a6ea1f in builtin___import__ () from /usr/lib/libpython2.7.so.1.0 #6 0x00007fffe89df603 in PyObject_Call () from /usr/lib/libpython2.7.so.1.0 #7 0x00007fffe89df6db in call_function_tail () from /usr/lib/libpython2.7.so.1.0 #8 0x00007fffe89df7ae in PyObject_CallFunction () from /usr/lib/libpython2.7.so.1.0 #9 0x00007fffe8a8a51d in PyImport_Import () from /usr/lib/libpython2.7.so.1.0 #10 0x00007fffe8a8a6ec in PyImport_ImportModule () from /usr/lib/libpython2.7.so.1.0 #11 0x00007fffe760e2f3 in signal_manager_new (geany_plugin=0x12e6ce0) at signalmanager.c:43 #12 0x00007fffe760a530 in plugin_init (data=) at plugin.c:161 #13 0x0000000000478fc6 in ?? () #14 0x000000000047a4cf in ?? () #15 0x000000000041be6f in ?? () #16 0x00007ffff4feb38d in __libc_start_main () from /lib/libc.so.6 #17 0x000000000041d281 in ?? () #18 0x00007fffffffe818 in ?? () #19 0x00000000ffffffff in ?? () #20 0x0000000000000002 in ?? () #21 0x00007fffffffeacb in ?? () ---Type to continue, or q to quit--- #22 0x0000000000000000 in ?? ()

UPDATE: Seems like I need to load the GeanyPy plugin first then I need to load others. Its working right now. let me see if I can trace something more.

sagarchalise avatar Feb 05 '12 06:02 sagarchalise

It's probably a conflict with the Zen Coding plugin since both load the Python interpreter and I have doubts whether this would work OK. Eventually I want to port the Zen Coding plugin to be a GeanyPy plugin to avoid this conflict.

Do you mind trying combinations of both to see if it is a conflict?

codebrainz avatar Feb 05 '12 09:02 codebrainz

Well I am using both. If I enable geanypy through geany.conf and then start enabling other plugins through GUI. I havenot faced any problem. On a very different note, Does GeanyPy work with older geany i.e. 0.20 or 0.19 ?. I want to package GeanyPy and Geany-Zencoding for ubuntu as well as archlinux. Especially in ubuntu, 0.21 is not shipped until 12.04, so wanted to know if it works on older version ? I have already setup ppa https://launchpad.net/~chalisesagar/+archive/geany-extras.

Anyway let me see if I can catch anything else. But now its working smoothly [Both plugins].

sagarchalise avatar Feb 06 '12 15:02 sagarchalise