armory3d / armortools

3D Content Creation Tools
https://armorpaint.org
Other
3.23k stars 334 forks source link

Segmentation Fault (Core Dumped) when trying to run on Linux #1589

Closed N0tallion6 closed 1 year ago

N0tallion6 commented 1 year ago

Around 4 days ago I compiled the latest build of Armorpaint for Linux from this repository using the instructions found here: https://github.com/armory3d/armortools/tree/main/armorpaint

Everything seemed to work fine, I even got the program to run at the time, however, I came to use it today, and now it just won't run at all. Gives me the following error:

segmentation fault (core dumped) ./ArmorPaint ../../armorpaint/build/krom

I tried re-compiling using the same instructions. Everything seemed to work fine up until the point in the instructions where I attempt to run the program again, still giving me the same error.

I've checked the krom directory, the krom.js file certainly exists, and trying to change the filepath for krom returns a different error of could not load krom.js, aborting. as expected.

The only thing I've done differently in the instructions is compiled using GCC instead of Clang, as Clang just won't compile the program no matter what I do.

Any ideas as to what I might be doing wrong?

I'm trying to build/use the non-Vulkan version if that makes any difference. Also let me know if you need me to post any logs.

Razzaline commented 1 year ago

Hello! I don't know how much I can help, but I'll try. The Vulkan version can't compile right now (patch hasn't been updated for over a year), so don't worry about that. You might be able to get more diagnostic information if you compile with debugging symbols (probably --debug), and then use GDB and try to run it until the segmentation fault. It should print a stack trace pointing to the function it crashed on.

Unfortunately, I can't reproduce your issue as I'm also on Linux (Manjaro with kernel 6.3) and have been able to compile and run the OpenGL version without any trouble so far. >.< That makes me wonder if it's an issue of what system library ArmorPaint expects compared to what you have installed on your system.

N0tallion6 commented 1 year ago

@Razzaline Funny you mention Manjaro because that's exactly what I'm using also, though you caused me to realize I was still using Kernel 5.13! Thought I'd try updating to 6.3 just on the off-chance that fixes it, but no dice as I expected...

What's interesting is that while it won't work on my main Manjaro machine, if I compile the exact same way on my laptop running ArchLinux it runs with no issues at all. (Other than Clang still doesn't work, but GCC does...) I even tried copying the entire repo over to my Manjaro machine and running it there, but still the same issue.

I'm beginning to suspect it's something to do with my Manjaro desktop specifically, rather than the program or compilation process itself...

I'll try what you suggested trying to trace the fault with GDB...

luboslenco commented 1 year ago

Not sure what is going on there, sorry. There has been a recent fix at https://github.com/armory3d/armorcore/pull/64, maybe there is a tiny chance it helps but I am not sure if it's related.