Seg fault on quit on macOS Mojave

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.
robotron9000
Prole
Posts: 8
Joined: Tue Sep 06, 2016 8:45 am

Seg fault on quit on macOS Mojave

Post by robotron9000 »

When I quit a game with this code:

Code: Select all

function love.draw()
    love.graphics.print("hi", 10, 10)
end
I always get "Segmentation fault: 11" on the console in MacOS 10.14.

If I change the settings in the screenshot below so the the Console and love are ticked, I don't get the error. I am using love 11.1. Any ideas why this is happening? Thanks.

Also I'm never updating my Macs OS again. Stuff breaks every time.

screen.png
screen.png (313.76 KiB) Viewed 8556 times
MissDanish
Citizen
Posts: 65
Joined: Wed Mar 07, 2018 11:21 pm

Re: Seg fault on quit on macOS Mojave

Post by MissDanish »

A fix is in the works from what I read on the LÖVE discord
robotron9000
Prole
Posts: 8
Joined: Tue Sep 06, 2016 8:45 am

Re: Seg fault on quit on macOS Mojave

Post by robotron9000 »

That's good to hear :)

Not really a big deal for now, because it does actually work.
User avatar
SiENcE
Party member
Posts: 792
Joined: Thu Jul 24, 2008 2:25 pm
Location: Berlin/Germany
Contact:

Re: Seg fault on quit on macOS Mojave

Post by SiENcE »

I've maybe an equal problem but on 0.10.2. When love.event.push('quit') is called the window closes but love stays in the Dock until I kill it. It seems it hangs/ is freezed.

Is there a "hard" way to quit löve? I need an urgent fix or solution ... :-/

Maybe os.exit of lua or by use of ffi ?
grump
Party member
Posts: 947
Joined: Sat Jul 22, 2017 7:43 pm

Re: Seg fault on quit on macOS Mojave

Post by grump »

SiENcE wrote: Thu Oct 25, 2018 9:56 pm Maybe os.exit of lua or by use of ffi ?
os.exit calls the normal C exit() function. It definitely works to quit LÖVE. Have you tried to call it?
User avatar
SiENcE
Party member
Posts: 792
Joined: Thu Jul 24, 2008 2:25 pm
Location: Berlin/Germany
Contact:

Re: Seg fault on quit on macOS Mojave

Post by SiENcE »

[quote=grump post_id=223773 time=1540544344 user_id=139355]
SiENcE wrote: Thu Oct 25, 2018 9:56 pm Maybe os.exit of lua or by use of ffi ?
os.exit calls the normal C exit() function. It definitely works to quit LÖVE. Have you tried to call it?
[/quote]

Yes os.exit(0) or os.exit(1)?

There is also this ffi option. I hope it works on osx.

Code: Select all

        local ffi = require("ffi")
	local C = ffi.C
	ffi.cdef[[
		void _exit(int status);
	]]
	C._exit(-1)   -- exec never returns
When i exit via os.exit(0) or the ffi thing this is written in the console log:

Code: Select all

AL lib: (EE) alc_cleanup: 1 device not closed
It does not appear when i exit normally via love.event.quit.

So maybe löve waits for the device to close and on OSX it doesn't...!?

Maybe this is the problem?
grump
Party member
Posts: 947
Joined: Sat Jul 22, 2017 7:43 pm

Re: Seg fault on quit on macOS Mojave

Post by grump »

Call exit(0) if no error happened, exit(anything else) if you want to return that error code to the parent process.
SiENcE wrote: Fri Oct 26, 2018 9:54 am When i exit via os.exit(0) or the ffi thing this is written in the console log:

Code: Select all

AL lib: (EE) alc_cleanup: 1 device not closed
It does not appear when i exit normally via love.event.quit.

So maybe löve waits for the device to close and on OSX it doesn't...!?

Maybe this is the problem?
When you call os.exit, love can't properly free allocated resources. This is normally not a problem, because the OS will clean up after the process.
User avatar
SiENcE
Party member
Posts: 792
Joined: Thu Jul 24, 2008 2:25 pm
Location: Berlin/Germany
Contact:

Re: Seg fault on quit on macOS Mojave

Post by SiENcE »

grump wrote: Fri Oct 26, 2018 10:07 am When you call os.exit, love can't properly free allocated resources. This is normally not a problem, because the OS will clean up after the process.
Thx I'll try.

Btw. did you finished the layered effects of your particle editor?
grump
Party member
Posts: 947
Joined: Sat Jul 22, 2017 7:43 pm

Re: Seg fault on quit on macOS Mojave

Post by grump »

SiENcE wrote: Fri Oct 26, 2018 1:12 pm Btw. did you finished the layered effects of your particle editor?
No. The project I used it for died, there was no interest in it from the community, and with LÖVE 11.0 the Nuklear UI library broke and still hasn't been fully fixed to this day. I might get back to it (or rather, rewrite it, because Nuklear sucks) one day, but chances are it's dead for good.
User avatar
SiENcE
Party member
Posts: 792
Joined: Thu Jul 24, 2008 2:25 pm
Location: Berlin/Germany
Contact:

Re: Seg fault on quit on macOS Mojave

Post by SiENcE »

grump wrote: Fri Oct 26, 2018 1:33 pm No. The project I used it for died, there was no interest in it from the community, and with LÖVE 11.0 the Nuklear UI library broke and still hasn't been fully fixed to this day. I might get back to it (or rather, rewrite it, because Nuklear sucks) one day, but chances are it's dead for good.
Hm it's a pity. I learned in this years when developing Aeon that the missing tools and integrations into well known tools is the biggest problem of löve creating bigger games. Good tools is important if you need to create content. One has no time to first develop all your tools and than the game. And it's harder to work externals. As a hobby, yes...at work...no.

Back to topic:

So..bu is fixed using os.exit(0) on MacOSX Mojave. Löve closes. Not a very nice solution...but hey..it works :).
Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot] and 54 guests