test:pas is my file: cat /tmp/test.pas type {coucou} L3=string[3]; L2=string[2];
if open with geany it crash. Remove the space after "type", load it in geany, type a space in geany in the same place, it crash
(I tried before the 1.35 with same bug)
geany -V geany 1.36 (construit le Oct 14 2019 avec GTK 3.24.1, GLib 2.58.3)
gdb geany GNU gdb (Gentoo 8.1 p1) 8.1 Copyright (C) 2018 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-pc-linux-gnu". Type "show configuration" for configuration details. For bug reporting instructions, please see: https://bugs.gentoo.org/. 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...(no debugging symbols found)...done. (gdb) set args /tmp/test.pas (gdb) r Starting program: /usr/bin/geany /tmp/test.pas [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib64/libthread_db.so.1". [New Thread 0x7fffed6f3700 (LWP 15105)] [New Thread 0x7fffecef2700 (LWP 15106)]
Thread 1 "geany" received signal SIGSEGV, Segmentation fault. 0x00007ffff7abfcef in ?? () from /usr/lib64/libgeany.so.0 (gdb) bt #0 0x00007ffff7abfcef in ?? () from /usr/lib64/libgeany.so.0 #1 0x00007ffff7adbe95 in ?? () from /usr/lib64/libgeany.so.0 #2 0x00007ffff7ad822e in ?? () from /usr/lib64/libgeany.so.0 #3 0x00007ffff7adb5a0 in ?? () from /usr/lib64/libgeany.so.0 #4 0x00007ffff7ab3807 in ?? () from /usr/lib64/libgeany.so.0 #5 0x00007ffff7ab4ad6 in ?? () from /usr/lib64/libgeany.so.0 #6 0x00007ffff78e3c73 in ?? () from /usr/lib64/libgeany.so.0 #7 0x00007ffff78e3f9a in document_set_filetype () from /usr/lib64/libgeany.so.0 #8 0x00007ffff78e5a72 in ?? () from /usr/lib64/libgeany.so.0 #9 0x00007ffff7907696 in ?? () from /usr/lib64/libgeany.so.0 #10 0x00007ffff7909b3b in main_lib () from /usr/lib64/libgeany.so.0 #11 0x00007ffff748f6eb in __libc_start_main () from /lib64/libc.so.6 #12 0x000055555555464a in ?? () (gdb) quit
Confirmed on
08:45:44: Geany INFO : Geany 1.37 (git >= 82590af4), en_AU.UTF-8 08:45:44: Geany INFO : GTK 3.22.30, GLib 2.56.4
ctags crash, see bt with symbols below
```#0 0x00007ffff7b0bc6f in makeTagEntry (tag=tag@entry=0x7fffffffb9f0) at main/entry.c:1255 #1 0x00007ffff7b27ac7 in makePascalTag (tag=0x7fffffffb9f0) at parsers/pascal.c:61 #2 0x00007ffff7b27ac7 in findPascalTags () at parsers/pascal.c:272 #3 0x00007ffff7b23fb6 in createTagsForFile (language=<optimised out>, passCount=1) at main/parse.c:2158 #4 0x00007ffff7b2725e in createTagsWithFallback1 (userData=0x555555a922f0, passCallback=0x7ffff7afe720 <ctags_pass_start>, language=4) at main/parse.c:2233 #5 0x00007ffff7b2725e in createTagsWithFallback (buffer=<optimised out>, bufferSize=<optimised out>, fileName=<optimised out>, language=4, tagCallback=<optimised out>, passCallback=0x7ffff7afe720 <ctags_pass_start>, userData=0x555555a922f0) at main/parse.c:2320 #6 0x00007ffff7b09c22 in ctagsParse (buffer=buffer@entry=0x5555559f39a0 "type {coucou}\nL3=string[3];\nL2=string[2];\n", bufferSize=bufferSize@entry=42, fileName=fileName@entry=0x5555566b4000 "/tmp/test.pas", language=<optimised out>, tagCallback=tagCallback@entry=0x7ffff7afe8d0 <ctags_new_tag>, passCallback=passCallback@entry=0x7ffff7afe720 <ctags_pass_start>, userData=<optimised out>) at main/ctags-api.c:74 #7 0x00007ffff7aff872 in tm_source_file_parse (source_file=source_file@entry=0x555555a922f0, text_buf=text_buf@entry=0x5555559f39a0 "type {coucou}\nL3=string[3];\nL2=string[2];\n", buf_size=buf_size@entry=42, use_buffer=use_buffer@entry=1) at tm_source_file.c:829 ---Type <return> to continue, or q <return> to quit--- #8 0x00007ffff7b00d26 in update_source_file (source_file=0x555555a922f0, text_buf=0x5555559f39a0 "type {coucou}\nL3=string[3];\nL2=string[2];\n", buf_size=42, use_buffer=1, update_workspace=<optimised out>) at tm_workspace.c:159 #9 0x00007ffff7922273 in document_update_tags (doc=0x5555562b1800) at document.c:2695 #10 0x00007ffff792255c in document_set_filetype (doc=0x5555562b1800, type=0x555555de8180) at document.c:2843 #11 0x00007ffff7923f6a in document_open_file_full (doc=0x5555562b1800, doc@entry=0x0, filename=<optimised out>, pos=pos@entry=0, readonly=readonly@entry=0, ft=ft@entry=0x0, forced_enc=forced_enc@entry=0x0) at document.c:1469 #12 0x00007ffff7924124 in document_open_file (locale_filename=<optimised out>, readonly=readonly@entry=0, ft=ft@entry=0x0, forced_enc=forced_enc@entry=0x0) at document.c:912 #13 0x00007ffff7924211 in document_open_files (filenames=filenames@entry=0x55555652e350, readonly=0, ft=ft@entry=0x0, forced_enc=forced_enc@entry=0x0) at document.c:1563 ```
Can't reproduce on Windows, recent git:
15:47:20: Geany INFO : Geany 1.36, English_United Kingdom.1252 15:47:20: Geany INFO : GTK 2.24.32, GLib 2.60.6
I even tried to reproduce with drmemory.org, no mention of ctags files.
i think you miss-understood some thing or we don't have the same source :) new win10 =-> install the geany 1.36 from website open test.pas put a space just after "type" => crash You need to put in a ".pas" file (need to recognise of colour syntax language) Here is the content of file: (even you could remove the word "coucou") type{coucou} L3=string[3]; L2=string[2];
With Geany windows today nightly builds and gtk (https://sourceforge.net/projects/gtk-win/ or gtk2-runtime-2.24.32-2019-10-04-ts-win64.exe ) but failed run it due to miss libgcc_s_sjlj-1.dll ....
i think you miss-understood some thing or we don't have the same source :)
I am using a recent git checkout, Win 8 and x86 Geany, but I followed your instructions already.
Geany has implemented reading an identifier after the `type` keyword for Pascal, but it creates a function tag. I've made #2360 to create a type tag instead.
Because it currently creates a function tag, I think this bug may occur the same if you replace the `type` keyword with `function`. On my system, a tag is not created when there is a space before the `{}` comment, but it doesn't crash.
#2360 has been updated and may fix this issue, please test.
Closed #2358 via #3043.
github-comments@lists.geany.org