19336d2 effectively removed AsciiDoc support by [deleting the reference to the lexer module][0]:
https://github.com/geany/geany/blob/4246298dd8b3c70528cdad0554000f5d54f39765...
The upshot is that `sci_set_lexer()` now gets a null pointer from `LexerNameFromID()` when `catalogueLexilla.Find()` fails to map `SCLEX_ASCIIDOC` to a module, and `CreateLexer()` ends up calling `strcmp(NULL, ...)`. The faulting instruction is deep inside the standard C library; you need an IDE with a disassembly viewer to see it precisely, e.g.
~~~as // __strcmp_sse42 (@__strcmp_sse42:12) // . . . 7FFFF799021A: F3 0F 6F 16 movdqu (%rsi), %xmm2 // RSI: 0x0000000000000000 // . . . ~~~
Or just take a backtrace with GDB. Simply try to open any AsciiDoc file, *et volià!*
<details> <summary>gdb ./geany</summary> <pre> <code> Thread 1 "geany" received signal SIGSEGV, Segmentation fault. __strcmp_sse42 () at ../sysdeps/x86_64/multiarch/strcmp-sse4_2.S:174 174 ../sysdeps/x86_64/multiarch/strcmp-sse4_2.S: No such file or directory. (gdb) backtrace #0 __strcmp_sse42 () at ../sysdeps/x86_64/multiarch/strcmp-sse4_2.S:174 #1 0x00007ffff7afae91 in CreateLexer(char const*) (name=0x0) at ../../scintilla/lexilla/src/Lexilla.cxx:403 #2 0x00007ffff7ac733a in sci_set_lexer (sci=0x5555563682b0, lexer_id=134) at ../../src/sciwrappers.c:704 #3 0x00007ffff7a99a07 in styleset_from_mapping (sci=0x5555563682b0, ft_id=53, lexer=134, styles=0x7ffff7de1ee0 <highlighting_styles_ASCIIDOC>, n_styles=24, keywords=0x0, n_keywords=0, properties=0x0, n_properties=0) at ../../src/highlighting.c:867 #4 0x00007ffff7a9ad55 in highlighting_set_styles (sci=0x5555563682b0, ft=0x5555561ecf60) at ../../src/highlighting.c:1095 #5 0x00007ffff7a7ed00 in document_load_config (doc=0x555556364c20, type=0x5555561ecf60, filetype_changed=1) at ../../src/document.c:2823 #6 0x00007ffff7a7ee74 in document_set_filetype (doc=0x555556364c20, type=0x5555561ecf60) at ../../src/document.c:2860 #7 0x00007ffff7a7bbf9 in document_open_file_full (doc=0x555556364c20, filename=0x55555642d310 "/home/rob/contrib/samples/example.asciidoc", pos=0, readonly=0, ft=0x0, forced_enc=0x0) at ../../src/document.c:1491 #8 0x00007ffff7a7a894 in document_open_file (locale_filename=0x55555642d310 "/home/rob/contrib/samples/example.asciidoc", readonly=0, ft=0x0, forced_enc=0x0) at ../../src/document.c:904 #9 0x00007ffff7a7bf68 in document_open_files (filenames=0x55555601c770 = {...}, readonly=0, ft=0x0, forced_enc=0x0) at ../../src/document.c:1579 #10 0x00007ffff7a7535c in open_file_dialog_handle_response (dialog=0x55555659a2f0, response=-3) at ../../src/dialogs.c:164 #11 0x00007ffff7a76606 in dialogs_show_open_file () at ../../src/dialogs.c:474 #12 0x00007ffff7a7028a in on_open1_activate (menuitem=0x555555dcb5b0, user_data=0x0) at ../../src/callbacks.c:324 #13 0x00007ffff765b3b0 in g_closure_invoke () at /lib/x86_64-linux-gnu/libgobject-2.0.so.0 #14 0x00007ffff766e076 in () at /lib/x86_64-linux-gnu/libgobject-2.0.so.0 #15 0x00007ffff7674bf5 in g_signal_emit_valist () at /lib/x86_64-linux-gnu/libgobject-2.0.so.0 #16 0x00007ffff7674dbf in g_signal_emit () at /lib/x86_64-linux-gnu/libgobject-2.0.so.0 #17 0x00007ffff716c8a4 in gtk_widget_activate () at /lib/x86_64-linux-gnu/libgtk-3.so.0 #18 0x00007ffff701f996 in gtk_menu_shell_activate_item () at /lib/x86_64-linux-gnu/libgtk-3.so.0 #19 0x00007ffff701fcd1 in () at /lib/x86_64-linux-gnu/libgtk-3.so.0 #20 0x00007ffff6e90cb4 in () at /lib/x86_64-linux-gnu/libgtk-3.so.0 #21 0x00007ffff765b5a9 in () at /lib/x86_64-linux-gnu/libgobject-2.0.so.0 #22 0x00007ffff767405e in g_signal_emit_valist () at /lib/x86_64-linux-gnu/libgobject-2.0.so.0 #23 0x00007ffff7674dbf in g_signal_emit () at /lib/x86_64-linux-gnu/libgobject-2.0.so.0 #24 0x00007ffff7169844 in () at /lib/x86_64-linux-gnu/libgtk-3.so.0 #25 0x00007ffff700783e in () at /lib/x86_64-linux-gnu/libgtk-3.so.0 #26 0x00007ffff70092f6 in gtk_main_do_event () at /lib/x86_64-linux-gnu/libgtk-3.so.0 #27 0x00007ffff7ed9815 in () at /lib/x86_64-linux-gnu/libgdk-3.so.0 #28 0x00007ffff7f337a2 in () at /lib/x86_64-linux-gnu/libgdk-3.so.0 #29 0x00007ffff6b3e7a9 in g_main_context_dispatch () at /lib/x86_64-linux-gnu/libglib-2.0.so.0 #30 0x00007ffff6b3ea38 in () at /lib/x86_64-linux-gnu/libglib-2.0.so.0 #31 0x00007ffff6b3ecef in g_main_loop_run () at /lib/x86_64-linux-gnu/libglib-2.0.so.0 #32 0x00007ffff7008495 in gtk_main () at /lib/x86_64-linux-gnu/libgtk-3.so.0 #33 0x00007ffff7aad667 in main_lib (argc=1, argv=0x7fffffffdf08) at ../../src/libmain.c:1256 #34 0x0000555555555159 in main (argc=1, argv=0x7fffffffdf08) at ../../src/main.c:27 </code> </pre> </details>
Rebuilding Geany after patching the module reference back in will fix it. I would open a PR but I'm not sure if Lexilla changes are supposed to be recorded in `scintilla_changes.patch` or not. The patch is pretty out of date already, so I don't mind leaving this for someone else :wink:.
[0]: https://github.com/geany/geany/commit/19336d22946b77bbcb5131544ea0e6317cdcf6...
@rdipardo big kudos for the detailed and investigated report, hugely appreciated! See #3616 which should fix the crash and bring AsciiDoc back.
sorry
sorry
Don't worry. Crashes caused by my commits will start appearing _after_ the release :-)
Closed #3615 as completed via bc9f6e4dccea09b746510c0f262c2e3bf0ce11c9.
@kugel- no problem, it happens, even if it's kinda stressful right now. And as @techee says, better see this now than in 24 hours… :laughing:
github-comments@lists.geany.org