-
Notifications
You must be signed in to change notification settings - Fork 273
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bug: Server does not exit gracefully #1571
Comments
I have a similar exit when I try to start CasparCG without a mounted drive. I didn't check the error code to see if is the same. |
I suspect it's the same problem. The server tried to access the media path, an exception gets thrown and it aborts during logging. |
Just confirmed that if I set media path to a non-existent directory and the server doesn't have write access to create it, it will fail in the same way. |
This should be better now. The root problem looks to have been that the main method and thread exited before the logs had been flushed. Adding a simple flush call appears to have fixed this. I've also put a bit of effort into improving the logging when it fails to find a config file, or encounters an invalid config file, so errors here should be a bit more descriptive and not just a long stack trace |
Observed Behavior
For example, starting server in an empty directory (without
casparcg.config
), I get this:If there is an earlier backtrace in the directory, I will get this:
If the config file is corrupt, I may get one of these:
Similar thing happens if I try to launch it with, eg
casparcg -h
orcasparcg --help
or any other invalid path to the config file.Expected behaviour
Looking at the code, I should be getting an error message:
But, I don't. Running in Debug mode, it seems to abort on this line:
server/src/common/log.cpp
Line 152 in 804b8de
There appears to be some sort of a race condition, because if I step through the code it does sometimes display the message...
Steps to reproduce
See above.
Environment
The text was updated successfully, but these errors were encountered: