Closed neuromancer closed 4 years ago
Hm, it works fine on my linux, check the config/sys_config.json , I think it can be broken - just rename it temporarily to quick test.
Oh, sorry about that. You are right. Using the default file will work. To reproduce this crash, use an empty config file. This probably means some default value is incorrect or invalid. Feel free to close this issue if you require some valid values in the config file.
Hi! I made some changes in config reading/writing routines recently, it might be more robust than previous, could you please check if the problem still occurs?
PS: unfortunately new config format is not compatible with old one
Still happening in 679f07c6ed3aef5b5ab43c74de80f8189a47a0be:
$ make run_demoversion
./bin/carnage3d-debug -mapname SANB.CMP -gtadata "gamedata/demoversions/GTAECTS/GTADATA"
Carnage3D 0.0.3
System initialize
Working directory: '/home/g/Games/carnage3d/gamedata'
carnage3d-debug: ../src/FileSystem.cpp:311: bool FileSystem::ReadConfig(const std::string &, cxx::json_document &): Assertion `false' failed.
make: *** [Makefile:39: run_demoversion] Aborted (core dumped)
IMO, this is a user error. An empty string is invalid JSON, maybe {}
is what you want.
If you run jq .
with an empty file, it will return zero (the same as running with a file that contains {}
. However, I believe it is still acceptable to have an error saying that the file is empty and you expect at least a dictionary.
Okay, I've change default build configuration to 'release', so that will stop firing asserts on users machines.
Latest revision (1d44f7a19c7ec7076f0d94aa9f483a3ae0cced0e) fails to run: