TIC-80
TIC-80 copied to clipboard
Segmentation fault
Problem
Specs
Description
Attempted to both run the already compiled binary and also compile my own. Used the Fedora 36 instructions since 40 would not apply (and when i tested out of curiosity it did not worked).
Other
Can't uninstall it either
I have the same on Fedora 40.
Thread 1 "tic80" received signal SIGSEGV, Segmentation fault.
0x0000000000462fbe in isDevMode (studio=0xa551f0) at /home/gautier/src/TIC-80/src/studio/studio.c:1751
1751 const char *devmode = tic_tool_metatag(tic->cart.code.data, "devmode", tic_get_script(tic)->singleComment);
(gdb) bt
#0 0x0000000000462fbe in isDevMode (studio=0xa551f0) at /home/gautier/src/TIC-80/src/studio/studio.c:1751
#1 0x0000000000463582 in processShortcuts (studio=0xa551f0) at /home/gautier/src/TIC-80/src/studio/studio.c:1863
#2 0x0000000000463bfa in renderStudio (studio=0xa551f0) at /home/gautier/src/TIC-80/src/studio/studio.c:2028
#3 0x00000000004646c3 in studio_tick (studio=0xa551f0, input=...) at /home/gautier/src/TIC-80/src/studio/studio.c:2259
#4 0x000000000045bdf2 in gpuTick () at /home/gautier/src/TIC-80/src/system/sdl/main.c:1716
#5 0x000000000045c4d5 in start (argc=1, argv=0x7fffffffdc48, folder=0x958000 <appFolder.4> "/home/gautier/.local/share/com.nesbox.tic/TIC-80/") at /home/gautier/src/TIC-80/src/system/sdl/main.c:1934
#6 0x000000000045c5e2 in main (argc=1, argv=0x7fffffffdc48) at /home/gautier/src/TIC-80/src/system/sdl/main.c:2081
Which version of TIC-80 is it? That seems related to DevMode, do you have the same issue before and after this PR: https://github.com/nesbox/TIC-80/pull/2581 ?
Yep, I confirm tic80 starts normally using commit d8c554fa407759eaac67bee0cceb4dd5a877ca66
still happens to me on current main (921d5e6e42fdb4bf16963f5e474594e0ed539457) when loading a cart, for example, the config cart.
@andreyorst can't reproduce it, could you pls test CI binaries https://nightly.link/nesbox/TIC-80/workflows/build/main? Thank you.
tried out the nightly build and the crash didn't happen. However, I tried rebuilding the current master, tested it after build in the build/bin without problems, then did make install to a local directory, and got the crash again.
So perhaps the language shared libraries are unavailable after make install?
The complete steps are:
- build, install
cmake -DCMAKE_INSTALL_PREFIX=~/.local/ -DSDL_ALSA=On .. make install -j8 - run from the system menu
load configrun- crash
Hello, I've run into a similar problem as well on EndeavourOS (Arch Linux) with a freshly-built installation of TIC-80 from Github.
I found that I get a segfault if I start TIC-80 from a location that is not where its executable and supporting libraries are found (either from a custom menu entry command or from the terminal, like ~/Applications/Tic80/build/bin/tic80), when I attempt to run a cart. I'm guessing this is because it doesn't find lua.so, python.so, ruby.so, etc. for whatever language the cart uses in the current working directory.
A workaround for this is to spawn a sub-process with the correct working directory. This can be done as follows:
(cd ~/Applications/Tic80/build/bin/; ./tic80)
You could also only start it from the build directory from terminal.
Maybe it's worth noting this in the build+install instructions?