Opened 8 years ago
Last modified 2 years ago
#6956 new defect
GUI: LAUNCHER: ScummVM returned with unfreed signals (AmigaOS4)
Reported by: | raziel- | Owned by: | |
---|---|---|---|
Priority: | normal | Component: | Port: AmigaOS4 |
Version: | Keywords: | ||
Cc: | Game: |
Description
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 (14)
comment:1 by , 6 years ago
Component: | → GUI |
---|
comment:2 by , 5 years ago
comment:3 by , 5 years ago
Component: | GUI → Port: AmigaOS4 |
---|
comment:4 by , 5 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 , 5 years ago
Hmm.. http://forum.hyperion-entertainment.biz/viewtopic.php?f=26&t=590
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 , 5 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 , 5 years ago
If i do a "content" search over the scummvm code i can find "AllocSignal" in
backends/libbackends.o
backends/fs/amigaos4/amigaos4-fs.o
backends/fs/amigaos4/amigaos4-fs-factory.o
backends/midi/camd.o
backends/platform/sdl/amigaos/amigaos-main.o
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
backends/libbackends.a
backends/fs/amigaos4/amigaos4-fs.o
backends/fs/amigaos4/amigaos4-fs-factory.o
backends/midi/camd.o
backends/platform/sdl/amigaos/amigaos-main.o
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)?
comment:8 by , 5 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 , 5 years ago
Summary: | LAUNCHER: ScummVM returned with unfreed signals → AMIGAOS4: Launcher - ScummVM returned with unfreed signals |
---|
comment:10 by , 5 years ago
Could this be the culprit?
https://github.com/scummvm/scummvm/blob/master/base/commandLine.cpp#L197
It doesn't seem to do any cleanup, unless i missed an atexit() somewhere.
comment:11 by , 5 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:13 by , 3 years ago
Summary: | AMIGAOS4: Launcher - ScummVM returned with unfreed signals → LAUNCHER: ScummVM returned with unfreed signals (AmigaOS4) |
---|
comment:14 by , 2 years ago
Summary: | LAUNCHER: ScummVM returned with unfreed signals (AmigaOS4) → GUI: LAUNCHER: ScummVM returned with unfreed signals (AmigaOS4) |
---|
That message appears to be AmigaOS4 specific, but not sure what it actually means.
@raziel-: What exactly does that warning/error mean?