Some manipulation with pathes in compiler dialogs sometimes leads to crash
Original Reporter info from Mantis: Maxerist
-
Reporter name: Max Vlasov
Original Reporter info from Mantis: Maxerist
- Reporter name: Max Vlasov
Description:
If project dialogs contains only [Include files:$(ProjOutDir)] and all other pathes blank (for a new project blank them and return), if I go to [Unit output directory] and add $(ProjOutDir)\Anything a crash "division by zero appears"
Additional information:
I tracked it to the file \ide\compileroptions.pp
where in method
function TParsedCompilerOptions.GetParsedValue(Option: TParsedCompilerOptString;
WithOverrides: boolean): string;
the following branch executed
...
if ParsedStamp[Option]<>CompilerParseStamp then begin
if Parsing[Option] then begin
DebugLn('TParsedCompilerOptions.GetParsedValue Circle in Options: ',ParsedCompilerOptStringNames[Option],' Unparsed="',UnparsedValues[Option],'"');
RaiseException('');
exit('');
end;
...
With the variables:
ParsedStamp[Option] = -2147483648
CompilerParseStamp = 126
Option = PCOSOUTPUTDIR
Parsing[Option] =true
-------
The error is irrelevant since current RaiseException for empty string executes an expression with actual division by zero
Mantis conversion info:
- Mantis ID: 18042
- Version: 0.9.29 (SVN)
- Monitored by: » Maxerist (Max Vlasov)
- Target version: 1.0.0
- LazTarget: 1.0