19336d2 effectively removed AsciiDoc support by deleting the reference to the lexer module:
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.
// __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à!
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 , 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
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 😉.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.