Summary
The Crossfire Resource Editor (CRE) crashes immediately on startup when built from source because it uses server-side code before initializing the Crossfire common library globals.
The crash occurs when CRE loads resources and the server module initialization code calls LOG(). The global logfile pointer has not been initialized and remains NULL, causing a segmentation fault inside fputs().
Environment
See enclosed backtrace file. The important detail is:
fputs(..., fp=0x0)
The FILE logfile parameter passed to fputs() is NULL.
Root Cause:
The Crossfire server logging system requires initialization before any code calls LOG().
Enclosed patch file resolved the issue for my testing VM.
Content and bug fix generated with ChatGPT.
Thanks for the analysis and the patch :)
The proposed solution isn't totally satisfactory, as that means init_library() is called twice.
So I applied another fix, at d8d5f0522acc0cae2f80adc217eeb75041b51442
With the current Crossfire code base, CRE now builds and launches with no issues on Fedora 44.
I also tested on Ubuntu 26.04 and Debian 13.6 - build works and no issues launching CRE.
Thank you for working on and fixing this.
I'll close out the ticket.