You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I try to save my work on Linux I get a segfault. I compiled the app with debug information and run with gdb to trace the error. The problem seems to be caused in src/loadave.c line 431:
The problem is that fp is NULL. Upon inspecting the flags passed on to fopen() I noticed the t flag which I've never seen before. Upon looking at the documentation for fopen() I see no mention of that flag. I removed the flag (just left the standard w) and it seems to work fine. I'm submitting a patch to fix this and also check to make sure fp is non-null so that you don't loose everything if fopen() fails.
The text was updated successfully, but these errors were encountered:
Hmmm... checking the Windows documentation it seems that the t flag exists and is called "text-mode translation flag". I searched a bit and I can't find anywhere saying it is available in Linux. On my computer fp returns NULL and the call to mxmlSaveFile(xml, fp, whitespaceCallback) with a NULL fp segaults.
Hmm... strange. I'm not able to reproduce this. I did notice that if you try to write to a directory you don't have permissions to write to (like /) then fp will be NULL so I think this patch is harmless and makes sure rocket doesn't crash if you have permission issues. The t flag does nothing in Linux so I guess we can remove it. But it doesn't seem to crash Rocket. 🤔 why was fopen() returning NULL to me ...
When I try to save my work on Linux I get a segfault. I compiled the app with debug information and run with gdb to trace the error. The problem seems to be caused in
src/loadave.c
line 431:The problem is that
fp
isNULL
. Upon inspecting the flags passed on tofopen()
I noticed thet
flag which I've never seen before. Upon looking at the documentation forfopen()
I see no mention of that flag. I removed the flag (just left the standardw
) and it seems to work fine. I'm submitting a patch to fix this and also check to make surefp
is non-null so that you don't loose everything iffopen()
fails.The text was updated successfully, but these errors were encountered: