Open tempral opened 5 months ago
Which OS are you running this on?
windows 11
I'm not a Windows user myself; the binaries here for Windows were produced by cross-compiling from Linux.
However, with MinWG installed, as well as all the SDL development headers and libraries, it should be possible to build the Windows version using:
make -f makefile.win32
finally i was able to build the project but, as I adapted the whole thing into Visual Studio, I guess some configuration equivalents to the various make
instructions are missing...
cJSON_GetObjectItem(cJSON object, const char string)
cJSON.c Line 1036
cJSON *c = object->child;
Exception thrown: read access violation. object was nullptr.
call stack
loadConfigFile(char filename)
init.c Line 259
app.winWidth = cJSON_GetObjectItem(root, "winWidth")->valueint; loadConfig(int argc, char argv)Line 232
initSDL(int argc, char argv)Line 107
SDL_main(int argc, char * argv)main.c Line 77
main_getcmdline()Line 80
That particular error is resulting from attempting to load the configuration file from your user directory, so:
C:/Users/
By the look of it, the file has become corrupt; it's having trouble reading the JSON values. Try deleting the file and trying again.
I followed back where the "null" start ...
`file = fopen(getFileLocation(filename), "rb");` io.c LINE 58
fopen(...) FAILS even with a correct file location passed to it
in stdio.h is declared as
_ACRTIMP FILE* __cdecl fopen( _In_z_ char const* _FileName, _In_z_ char const* _Mode );
but it's just an header i guess, if I ask to find the definition, I get a warning message telling :
A definition for the symbol 'fopen' could not be located.
Could you try this build here:
https://www.battleforthesolarsystem.com/downloads/tbftss-1.5.1.win.x86_64-w32.zip
and let me know if that runs without issue. That binary was created by cross compiling from Linux.
yes I already played it, no issue... I was searching for an example game written with SDL, especially one without a huge amount of source code to study... I tried fews and choosed yours because matched my criteria of low demanding in CPU/GPU resources, and also because was pretty and fun, of course !
i made some progress, I am not sure how... the game start but crash when starting a challange...
i add a log error after fopen
and this is the result
data/app/config.json: File exists C:\Users\carmi\tbftss/config.json: File exists data/atlas/atlas.json: File exists data/locale/characters.dat: File exists data/widgets/battleLost.json: File exists data/widgets/battleWon.json: File exists data/widgets/challenges.json: File exists data/widgets/controls.json: File exists data/widgets/fighterDB.json: File exists data/widgets/galacticMap.json: File exists data/widgets/inBattle.json: File exists data/widgets/modal.json: File exists data/widgets/options.json: File exists data/widgets/starSystem.json: File exists data/widgets/startBattle.json: File exists data/widgets/stats.json: File exists data/widgets/title.json: File exists data/widgets/trophies.json: File exists
data/fighters: Permission denied WARN: Failed to load 'data/fighters' data/fighters: Permission denied WARN: Failed to load 'data/fighters' data/fighters: Permission denied WARN: Failed to load 'data/fighters' data/fighters: Permission denied WARN: Failed to load 'data/fighters' data/fighters: Permission denied WARN: Failed to load 'data/fighters' data/fighters: Permission denied WARN: Failed to load 'data/fighters' data/fighters: Permission denied WARN: Failed to load 'data/fighters' data/fighters: Permission denied WARN: Failed to load 'data/fighters' data/fighters: Permission denied WARN: Failed to load 'data/fighters' data/fighters: Permission denied WARN: Failed to load 'data/fighters' data/fighters: Permission denied WARN: Failed to load 'data/fighters' data/fighters: Permission denied WARN: Failed to load 'data/fighters' data/fighters: Permission denied WARN: Failed to load 'data/fighters' data/fighters: Permission denied WARN: Failed to load 'data/fighters' data/fighters: Permission denied WARN: Failed to load 'data/fighters' data/fighters: Permission denied WARN: Failed to load 'data/fighters' data/fighters: Permission denied WARN: Failed to load 'data/fighters' data/fighters: Permission denied WARN: Failed to load 'data/fighters' data/fighters: Permission denied WARN: Failed to load 'data/fighters' data/fighters: Permission denied WARN: Failed to load 'data/fighters' data/fighters: Permission denied WARN: Failed to load 'data/fighters' data/fighters: Permission denied WARN: Failed to load 'data/fighters' data/fighters: Permission denied WARN: Failed to load 'data/fighters' data/fighters: Permission denied WARN: Failed to load 'data/fighters' data/fighters: Permission denied WARN: Failed to load 'data/fighters' data/fighters: Permission denied WARN: Failed to load 'data/fighters' data/fighters: Permission denied WARN: Failed to load 'data/fighters' data/fighters: Permission denied WARN: Failed to load 'data/fighters' data/fighters: Permission denied WARN: Failed to load 'data/fighters' data/fighters: Permission denied WARN: Failed to load 'data/fighters' data/fighters: Permission denied WARN: Failed to load 'data/fighters' data/fighters: Permission denied WARN: Failed to load 'data/fighters' data/fighters: Permission denied WARN: Failed to load 'data/fighters' data/craft: Permission denied
data/craft: Permission denied WARN: Failed to load 'data/craft' data/craft: Permission denied WARN: Failed to load 'data/craft' data/craft: Permission denied WARN: Failed to load 'data/craft' data/craft: Permission denied WARN: Failed to load 'data/craft' data/craft: Permission denied WARN: Failed to load 'data/craft' data/craft: Permission denied WARN: Failed to load 'data/craft'
data/turrets: Permission denied WARN: Failed to load 'data/turrets' data/turrets: Permission denied WARN: Failed to load 'data/turrets' data/turrets: Permission denied WARN: Failed to load 'data/turrets'
csnCorvette01.json: No such file or directory WARN: Failed to load 'csnCorvette01.json' csnCorvette02.json: No such file or directory WARN: Failed to load 'csnCorvette02.json' hmsCorvette01.json: No such file or directory WARN: Failed to load 'hmsCorvette01.json' hmsCorvette02.json: No such file or directory WARN: Failed to load 'hmsCorvette02.json' infCorvette01.json: No such file or directory WARN: Failed to load 'infCorvette01.json' infCorvette02.json: No such file or directory WARN: Failed to load 'infCorvette02.json' unfCorvette01.json: No such file or directory WARN: Failed to load 'unfCorvette01.json' unfCorvette02.json: No such file or directory WARN: Failed to load 'unfCorvette02.json' data/battle/items.json: No such file or directory data/battle/bullets.json: No such file or directory data/galaxy/starSystems.json: No such file or directory data/missions/sol/01 - free flight.json: No such file or directory data/missions/sol/02 - weapons.json: No such file or directory data/missions/sol/03 - moving target.json: No such file or directory data/missions/sol/04 - armed target.json: No such file or directory data/missions/sol/05 - ecm.json: No such file or directory data/missions/sol/06 - mag.json: No such file or directory data/missions/sol/07 - wingmates.json: No such file or directory data/missions/sol/08 - final.json: No such file or directory data/challenges/01.json: No such file or directory data/challenges/02.json: No such file or directory data/challenges/03.json: No such file or directory data/challenges/04.json: No such file or directory data/challenges/05.json: No such file or directory data/challenges/06.json: No such file or directory data/challenges/07.json: No such file or directory data/challenges/08.json: No such file or directory data/challenges/09.json: No such file or directory data/challenges/10.json: No such file or directory data/challenges/11.json: No such file or directory data/challenges/12.json: No such file or directory data/challenges/13.json: No such file or directory data/challenges/14.json: No such file or directory data/challenges/15.json: No such file or directory data/challenges/16.json: No such file or directory data/challenges/17.json: No such file or directory data/challenges/18.json: No such file or directory data/challenges/19.json: No such file or directory data/challenges/20.json: No such file or directory data/challenges/21.json: No such file or directory data/challenges/22.json: No such file or directory data/challenges/23.json: No such file or directory data/challenges/24.json: No such file or directory data/challenges/25.json: No such file or directory data/challenges/26.json: No such file or directory data/challenges/27.json: No such file or directory data/challenges/28.json: No such file or directory data/challenges/29.json: No such file or directory data/challenges/30.json: No such file or directory data/challenges/31.json: No such file or directory data/trophies/trophies.json: No such file or directory C:\Users\carmi\tbftss/game.save: No such file or directory data/missions/sol/02 - weapons.json: No such file or directory Error: no such fighter 'TAF'
[process exited with code 1 (0x00000001)] You can now close this terminal with Ctrl+D, or press Enter to restart.
Something seems very wrong on your system. All of those files exists, and none of them should be returning Permission Denied.
This is still Microsoft Windows 11? Are you trying to run the game using a different user to the one that pulled that repo from github? That's all I can think of. The user who is trying to run the game has different permissions to the one that owns the git data.
Hi, I tried to run "make" but fails