compileWithDebugSymbols breaks the export on Windows (malformed XML)
-
Small bug, but it blocked me for a while: enabling Project Settings → CompileWithDebugSymbols makes the export fail on Windows with:
xml parsing error, expected '=' after attribute '1'
The cause (found while debugging something else): in
hi_backend/backend/ProjectTemplate.cpp, the %STRIP_SYMBOLS_WIN%placeholder sits inside the quoted prebuildCommand attribute:prebuildCommand="%PREBUILD_COMMAND%;%STRIP_SYMBOLS_WIN%"/>but what gets substituted into it is itself a set of quoted XML attributes:
alwaysGenerateDebugSymbols="1" debugInformationFormat="ProgramDatabase"so the inner quote closes the attribute early and the parser trips on the 1. With the setting off it substitutes an empty string, which is why nobody hits it normally.
Fix: move the placeholder outside the quotes, matching how
%STRIP_SYMBOLS_MACOS%is already written elsewhere in the same file:prebuildCommand="%PREBUILD_COMMAND%"%STRIP_SYMBOLS_WIN%/>Same fix applies in
StandaloneProjectTemplate.cpp(line ~66), which has the identical issue.Worth fixing since this option is exactly what you need when you're trying to debug a crash, it's what was stopping me from getting usable symbols in the first place.
Best,
Jon