``` ▓▒░frlan@trabant░▒▓██▓▒░ Di Mär 14 05:45:22 /home/frlan> cd /tmp █▓▒░frlan@trabant░▒▓██▓▒░ Di Mär 14 05:45:32 /tmp> virtualenv test Running virtualenv with interpreter /usr/bin/python2 New python executable in /tmp/test/bin/python2 Also creating executable in /tmp/test/bin/python Installing setuptools, pkg_resources, pip, wheel...done. █▓▒░frlan@trabant░▒▓██▓▒░ Di Mär 14 05:45:41 /tmp> cd test █▓▒░frlan@trabant░▒▓██▓▒░ Di Mär 14 05:45:43 /tmp/test> source bin/activate (test) █▓▒░frlan@trabant░▒▓██▓▒░ Di Mär 14 05:45:52 /tmp/test> gdb geany GNU gdb (Debian 7.12-6) 7.12.0.20161007-git Copyright (C) 2016 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-linux-gnu". Type "show configuration" for configuration details. For bug reporting instructions, please see: http://www.gnu.org/software/gdb/bugs/. Find the GDB manual and other documentation resources online at: http://www.gnu.org/software/gdb/documentation/. For help, type "help". Type "apropos word" to search for commands related to "word"... Reading symbols from geany...done. (gdb) r --verbose Starting program: /usr/local/bin/geany --verbose [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1". Geany-INFO: Geany 1.31 (git >= 994cb479), de_DE.utf8 Geany-INFO: GTK 2.24.31, GLib 2.50.3 Geany-INFO: System data dir: /usr/local/share/geany Geany-INFO: User config dir: /home/frlan/.config/geany [New Thread 0x7fffeeb80700 (LWP 31380)] [New Thread 0x7fffee37f700 (LWP 31381)] Geany-INFO: System plugin path: /usr/local/lib/geany Geany-INFO: Added filetype Arduino (61). Geany-INFO: Added filetype CUDA (62). Geany-INFO: Added filetype Clojure (63). Geany-INFO: Added filetype Scala (64). Geany-INFO: Added filetype JSON (65). Geany-INFO: Added filetype Cython (66). Geany-INFO: Added filetype Genie (67). Geany-INFO: Added filetype Graphviz (68). Geany-INFO: Loaded libvte from libvte.so Geany-INFO: Loaded: /usr/local/lib/geany/automark.so (Auto-Mark) Geany-INFO: Loaded: /usr/local/lib/geany/treebrowser.so (Baumnavigator) Geany-INFO: Loaded: /usr/local/lib/geany/commander.so (Commander) Geany-INFO: Loaded: /usr/local/lib/geany/geanydoc.so (Doc) Geany-INFO: Loaded: /usr/local/lib/geany/geanyprj.so (GeanyPrj)
Thread 1 "geany" received signal SIGSEGV, Segmentation fault. 0x00007fffe77bd221 in PyModule_AddObject () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0 (gdb) bt #0 0x00007fffe77bd221 in PyModule_AddObject () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0 #1 0x00007fffe7bde7c8 in initkeybindings () at geanypy-keybindings.c:200 #2 0x00007fffe7bdf5f0 in GeanyPy_start_interpreter () at geanypy-plugin.c:96 #3 geanypy_init (plugin_=0x555555c956a8, pdata=0x555555c96780) at geanypy-plugin.c:376 #4 0x00007ffff79afb75 in plugin_load (plugin=0x555555c95680) at plugins.c:582 #5 plugin_new (proxy=0x7ffff7dcd920 <builtin_so_proxy_plugin>, fname=fname@entry=0x555555ba4e50 "/usr/local/lib/geany/geanypy.so", load_plugin=load_plugin@entry=1, add_to_list=add_to_list@entry=0) at plugins.c:733 #6 0x00007ffff79b1276 in load_active_plugins () at plugins.c:1135 #7 plugins_load_active () at plugins.c:1280 #8 0x00007ffff79aa455 in main_lib (argc=<optimized out>, argv=<optimized out>) at libmain.c:1169 #9 0x00007ffff4ae22b1 in __libc_start_main () from /lib/x86_64-linux-gnu/libc.so.6 #10 0x00005555555547ba in _start ()
```
It's not very surprising since both GeanyPy and Virtualenv go to great pain to screw with the Python environment.
Geanypy installs python modules to $PREFIX/lib/geany/geanypy/geany/. Did you make sure that they can be found inside the virtualenv?
No, of course not. See above.
Expected behaviour would be something like
``` try: import geany except: <some_useable_exit> ``` I don't want to Geany crashes if Geanyy is not available
Not sure we should handle the case where the installation is clearly incomplete.
Me neither. But as virtualenv as well as the bin/activate-shortcut is quiet common in real life it should be introduced some error handling to prevent Geany from crashing when (by accident) called from this virtualenv
Is it common? I never used (or even heard of) virtualenv.
github-comments@lists.geany.org