Tracing Segfault

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
piccaso
Prole
Posts: 4
Joined: Wed Jul 31, 2019 10:28 pm

Tracing Segfault

Post by piccaso » Wed Jul 31, 2019 10:43 pm

Hi!

I am toying with a game written in/for LÖVE and I'm getting random Segmentation faults.
But there is no stacktrace, the game just crashes and the string `Segmentation fault` is printed to the console.

Is there any way i can trace the problem?
A commandline flag or debug build, something like that?

I'm using `love-11.2-win64` and the game i am toying with is Mari0 (this branch).

Thanks!

User avatar
pgimeno
Party member
Posts: 1944
Joined: Sun Oct 18, 2015 2:58 pm
Location: Valencia, ES

Re: Tracing Segfault

Post by pgimeno » Thu Aug 01, 2019 9:40 am

I don't get a segfault, but I get these messages:

Code: Select all

shader (dotnbloom) is fucked up, yo:
	Cannot compile pixel shader code:
Line 31: error: global variable gl_TexCoord is removed after version 140
shader (scanline-3x) is fucked up, yo:
	Cannot compile pixel shader code:
Line 31: error: global variable gl_TexCoord is removed after version 140
shader (scanline-4x) is fucked up, yo:
	Cannot compile pixel shader code:
Line 31: error: global variable gl_TexCoord is removed after version 140
This suggests that the problem might possibly be that your graphics driver is less graceful when it encounters these errors. See if you can fix or disable these shaders.

piccaso
Prole
Posts: 4
Joined: Wed Jul 31, 2019 10:28 pm

Re: Tracing Segfault

Post by piccaso » Thu Aug 01, 2019 11:11 am

This looks like a compilation error, did the game even run?

It works fine for me for at least 10 minutes until it crashes.
But i never used any shaders and they should be disabled by default. But i'll look into that.

Which LÖVE version did you use?

Howerver, not sure if this is even related to my segfault.
So, is there anything I can enable to get more information out of the crash?
There must be some way to narrow it down...

User avatar
pgimeno
Party member
Posts: 1944
Joined: Sun Oct 18, 2015 2:58 pm
Location: Valencia, ES

Re: Tracing Segfault

Post by pgimeno » Thu Aug 01, 2019 11:21 am

piccaso wrote:
Thu Aug 01, 2019 11:11 am
This looks like a compilation error, did the game even run?
Yes, a shader compilation error. Yes, it did run despite the errors.

piccaso wrote:
Thu Aug 01, 2019 11:11 am
It works fine for me for at least 10 minutes until it crashes.
Ah ok, I didn't try that long. I'll try when I can and report back if I can reproduce the crash.

piccaso wrote:
Thu Aug 01, 2019 11:11 am
Which LÖVE version did you use?
11.2 compiled by myself (no custom patches, but liblove is linked statically for me).

piccaso wrote:
Thu Aug 01, 2019 11:11 am
Howerver, not sure if this is even related to my segfault.
So, is there anything I can enable to get more information out of the crash?
There must be some way to narrow it down...
Run it under gdb.

Code: Select all

gdb --args love <folder>
(gdb) run
Once it crashes, get a backtrace with:

Code: Select all

(gdb) bt
If it crashes in Lua code, though, a backtrace won't be very useful, as chances are that it crashes in either the LuaJIT interpreter or in code generated by the interpreter.

User avatar
slime
Solid Snayke
Posts: 2858
Joined: Mon Aug 23, 2010 6:45 am
Location: Nova Scotia, Canada
Contact:

Re: Tracing Segfault

Post by slime » Thu Aug 01, 2019 11:23 am

Since you're using windows, you could try the latest LÖVE 11.3 prerelease build and see if the issue persists: https://ci.appveyor.com/project/AlexSzp ... /artifacts

LÖVE 11.3 has a bunch of fixes - one of the bigger ones is an updated version of OpenAL Soft which fixes some glitches and potential crashes around streaming audio sources.

piccaso
Prole
Posts: 4
Joined: Wed Jul 31, 2019 10:28 pm

Re: Tracing Segfault

Post by piccaso » Thu Aug 01, 2019 11:57 am

pgimeno wrote:
Thu Aug 01, 2019 11:21 am
Ah ok, I didn't try that long. I'll try when I can and report back if I can reproduce the crash.
Thanks!
pgimeno wrote:
Thu Aug 01, 2019 11:21 am
If it crashes in Lua code, though, a backtrace won't be very useful, as chances are that it crashes in either the LuaJIT interpreter or in code generated by the interpreter.
Too bad, but I'll give it a try.
And i could turn off JIT right?
`jit.off()`
Found it on the forum, but not (jet) in the documentation - looks like it could disable JIT and switch to just interpretation...

slime wrote:
Thu Aug 01, 2019 11:23 am
Since you're using windows, you could try the latest LÖVE 11.3 prerelease build and see if the issue persists: https://ci.appveyor.com/project/AlexSzp ... /artifacts

LÖVE 11.3 has a bunch of fixes - one of the bigger ones is an updated version of OpenAL Soft which fixes some glitches and potential crashes around streaming audio sources.
Thanks, I'll try that first.
I'm already suspecting that it has someting to do with the background music looping over to the start.

User avatar
pgimeno
Party member
Posts: 1944
Joined: Sun Oct 18, 2015 2:58 pm
Location: Valencia, ES

Re: Tracing Segfault

Post by pgimeno » Thu Aug 01, 2019 3:09 pm

I couldn't reproduce the crash on my Linux machine. Yes, there have been reports of crashes on Windows related to music looping, which were solved by updating OpenAL.

Re shaders, found them. In the MISC tab of the options there are shaders to select from, and the four above are not working in my system.

piccaso
Prole
Posts: 4
Joined: Wed Jul 31, 2019 10:28 pm

Re: Tracing Segfault

Post by piccaso » Thu Aug 01, 2019 8:48 pm

That did it! (Using the latest CI build).
Just put it through its paces with a second Player.
Used gamepads, tried all mappacks/dlc's we could find even did some screen recording with obs :)
Audio sounds perfect, not a single glicht!
This build feels so much more stable than 11.2 - on my machine :)

Thank you so much for helping out, we're having a lot of fun here!

Post Reply

Who is online

Users browsing this forum: No registered users and 5 guests