Opened 5 years ago

Last modified 4 months ago

#6956 new defect

LAUNCHER: ScummVM returned with unfreed signals (AmigaOS4)

Reported by: raziel- Owned by:
Priority: normal Component: Port: AmigaOS4
Keywords: Cc:


ScummVM 1.8.0git (Nov 21 2015 06:56:08) Features compiled in: Vorbis FLAC MP3 RGB zLib MPEG2 Theora AAC FreeType2 JPEG PNG

When using scummvm with a wrong option in shell i get this warning/error message.

scummvm -version scummvm: Unrecognized option '-version' Usage: scummvm [OPTIONS]... [GAME]

Try 'scummvm --help' for more options. ***Command 'scummvm' returned with unfreed signals 30000000!

While it's not a crash or anything it shouldn't do that, i think?

AmigaOS4 - PPC - SDL - BE gcc (GCC) 4.2.4 (adtools build 20090118)

Ticket imported from: bugs/6956.

Change History (13)

comment:1 by sev-, 4 years ago

Component: GUI

comment:2 by digitall, 2 years ago

That message appears to be AmigaOS4 specific, but not sure what it actually means.

@raziel-: What exactly does that warning/error mean?

comment:3 by digitall, 2 years ago

Component: GUIPort: AmigaOS4

comment:4 by raziel-, 2 years ago

Thank you for caring about my old bug reports.

I'll go check with the os devs/sdk maintainers and report back.

comment:5 by digitall, 2 years ago


Odd as the AmigaOS4 specific code is in backends/sdl/amigaos4 and backends/fs/amigaos4 and doesn't use AllocSignal as far as I can find. I suspect this is either a leak in the FS code or maybe in SDL.

Firstly and most importantly, @raziel- , can you still replicate this bug with the latest git master i.e. this is not an outdated bug?

comment:6 by raziel-, 2 years ago

Yes, this still happens, i just tried with latest master, though the signal number changed from my original report

*Command 'scummvm' returned with unfreed signals 1C000000!

comment:7 by raziel-, 2 years ago

If i do a "content" search over the scummvm code i can find "AllocSignal" in


but nowhere in the source (.cpp/.h) files, so it seems as they are being added by the system/sdk on compiling.

I can also find "FreeSignal" in


so it again seems that the system at least sets most of the FreeSignal() correctly (while i can't really check), except libbackends.a (instead of .o)?

Last edited 2 years ago by raziel- (previous) (diff)

comment:8 by raziel-, 2 years ago

Basically what is happening is this....

A shell runs in its own process, when you start a program from that shell
process, the program uses the shells process to execute, the shell code
goes to sleep during the program execution, when the program ends,
the shell code resumes and is ready to take another command line.

So, when the program is being executed, it's apparently allocating a signal,
such as would happen if the program was to allocate a message port or
other such activity during its operation.

However, the program is exiting without freeing all the resources it allocated,
so the shell notices this and posts the message because as the shell process
is continually reused by subsequent programs, it will eventually run out of
signals to allocate (only 16 user signals available) and all sorts of bad juju
will happen if that occurs.

So, yes, the program being run is doing something it shouldn't when it exits
in an unexpected way.

comment:9 by raziel-, 2 years ago

Summary: LAUNCHER: ScummVM returned with unfreed signalsAMIGAOS4: Launcher - ScummVM returned with unfreed signals

comment:10 by raziel-, 2 years ago

Could this be the culprit?

It doesn't seem to do any cleanup, unless i missed an atexit() somewhere.

comment:11 by digitall, 2 years ago

That could very well be the culprit. There are no atexit() in the code, so maybe when usage is printed something is being left dangling. Will need to look at this. Beyond this, we should probably audit the codebase for exit() calls and remove / reduce the need for them down to a single call if needs be... but that is beyond the scope of just this bug.

comment:12 by raziel-, 2 years ago


Thank you, i'll stand by for testing

comment:13 by raziel-, 4 months ago

Summary: AMIGAOS4: Launcher - ScummVM returned with unfreed signalsLAUNCHER: ScummVM returned with unfreed signals (AmigaOS4)
Note: See TracTickets for help on using tickets.