Hi, I already read about this bug but not on GitHub and never with a solution, so I hope this is not a duplicate. I tried to write a program in pascal, using the command "type". After typing the word "type", pressing any button caused Geany to crash. After that, Geany can be opened as usual, just that since then I cannot even compile simple hello world programs. I get the error message "ld: library not found for -lc" and "/usr/local/bin/ppcx64 returned an error exitcode" as well as exitcode 127. In addition, shell files and files of type .res are created in the working directory. I tried deleting them, uninstalling fcp and Geany but nothing worked. Attached you can find a screenshot of the error message. <img width="562" alt="Screenshot 2021-11-05 at 11 25 50" src="https://user-images.githubusercontent.com/71439619/140496459-d514a52d-fc50-45a3-9657-386fbd6dc61b.png">
Can't duplicate crash on Linux when adding "type" into a Pascal file produced by `Menu->File->New with Template->program.pas`. Can you be more specific how to reproduce it.
The failure to compile appears to be something to do with your Pascal compiler setup, which is outside Geany.
Thanks for the quick answer! I also tried to reproduce the error and this time it did not always crash. But if one presses enter in the following situation, the crash always happens: <img width="562" alt="Screenshot 2021-11-05 at 12 22 51" src="https://user-images.githubusercontent.com/71439619/140503470-9b15fe7c-b7b8-4edc-9eae-6585a7dca5d7.png"> s:
Confirmed, bt:
```
Thread 1 "geany" received signal SIGSEGV, Segmentation fault. 0x00007ffff7efd184 in getLanguageKind (kindIndex=69, language=-154646337) at main/parse.c:333 333 kdef = getKind (LanguageTable [language].kindControlBlock, kindIndex); (gdb) bt #0 0x00007ffff7efd184 in getLanguageKind (kindIndex=69, language=-154646337) at main/parse.c:333 #1 getLanguageKind (language=-154646337, kindIndex=69) at main/parse.c:317 #2 0x00007ffff7efec4d in isLanguageKindEnabled (language=<optimised out>, kindIndex=<optimised out>) at main/parse.c:2225 #3 0x00007ffff7ec04ce in isTagWritable (tag=0x7fffffffda70) at main/entry.c:1472 #4 0x00007ffff7ec2285 in makeTagEntry (tag=tag@entry=0x7fffffffda70) at main/entry.c:1682 #5 0x00007ffff7ee0b21 in makePascalTag (tag=0x7fffffffda70) at parsers/geany_pascal.c:61 #6 findPascalTags () at parsers/geany_pascal.c:272 #7 0x00007ffff7f02647 in createTagsForFile (passCount=1, language=4) at main/parse.c:3722 #8 createTagsWithFallback1 (language=language@entry=4, exclusive_subparser=exclusive_subparser@entry=0x7fffffffdca4) at main/parse.c:3844 #9 0x00007ffff7f02954 in createTagsWithFallback (failureInOpenning=<synthetic pointer>, mio=0x5555562c57a0, language=4, fileName=0x55555612dde0 "/tmp/untitled.pas") at main/parse.c:3934 #10 parseMio (fileName=fileName@entry=0x55555612dde0 "/tmp/untitled.pas", language=language@entry=4, mio=mio@entry=0x5555562c57a0, useSourceFileTagPath=useSourceFileTagPath@entry=false, clientData=clientData@entry=0x5555559cdd50) at main/parse.c:4096 #11 0x00007ffff7f02b81 in parseRawBuffer (fileName=0x55555612dde0 "/tmp/untitled.pas", buffer=<optimised out>, bufferSize=<optimised out>, language=4, clientData=0x5555559cdd50) at main/parse.c:4167 #12 0x00007ffff7ebc1fa in tm_source_file_parse (source_file=source_file@entry=0x5555559cdd50, text_buf=text_buf@entry=0x5555559e4800 "\n\nprogram untitled;\n type\n \n\nbegin\n writeln('hello');\nend.\n", buf_size=buf_size@entry=59, use_buffer=use_buffer@entry=1) at tm_source_file.c:719 #13 0x00007ffff7ebd4de in update_source_file (source_file=0x5555559cdd50, text_buf=0x5555559e4800 "\n\nprogram untitled;\n type\n \n\nbegin\n writeln('hello');\nend.\n", buf_size=59, use_buffer=1, update_workspace=<optimised out>) at tm_workspace.c:157 #14 0x00007ffff7ccb875 in document_update_tags (doc=0x5555560d9c70) at document.c:2694 #15 document_update_tags (doc=0x5555560d9c70) at document.c:2647 #16 0x00007ffff7ccb95d in on_document_update_tag_list_idle (data=0x5555560d9c70) at document.c:2763 #17 on_document_update_tag_list_idle (data=0x5555560d9c70) at document.c:2755 #18 0x00007ffff6ca5be8 in () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0 #19 0x00007ffff6ca504e in g_main_context_dispatch () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0 #20 0x00007ffff6ca5400 in () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0 #21 0x00007ffff6ca56f3 in g_main_loop_run () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0 #22 0x00007ffff74f037d in gtk_main () at /usr/lib/x86_64-linux-gnu/libgtk-3.so.0 #23 0x00007ffff7cf0f60 in main_lib (argc=<optimised out>, argv=<optimised out>) ```
Ctags expert needed.
PS reproduced on current git HEAD.
This is a duplicate of #2428 and #2358.
Closed #2982 via #3043.
github-comments@lists.geany.org