spotted two bugs

This commit is contained in:
Basile Burg 2015-11-22 22:20:04 +01:00
parent 7e1118cc24
commit 0062b58a74
3 changed files with 12 additions and 1 deletions

View File

@ -1744,7 +1744,7 @@ begin
{$ENDIF} {$ENDIF}
dmdproc.OnReadData := @asyncprocOutput; dmdproc.OnReadData := @asyncprocOutput;
dmdproc.OnTerminate:= @asyncprocTerminate; dmdproc.OnTerminate:= @asyncprocTerminate;
dmdproc.Options := [poStdErrToOutput, poUsePipes]; dmdproc.Options := [poUsePipes, poStderrToOutPut];
dmdproc.Executable := DCompiler; dmdproc.Executable := DCompiler;
dmdproc.Parameters.Add(fDoc.fileName); dmdproc.Parameters.Add(fDoc.fileName);
dmdproc.Parameters.Add('-J' + ExtractFilePath(fDoc.fileName)); dmdproc.Parameters.Add('-J' + ExtractFilePath(fDoc.fileName));

View File

@ -871,6 +871,8 @@ var
pos: TPoint; pos: TPoint;
msg: string; msg: string;
begin begin
//TODO-cbugfix: AV the the 3rd time a same message is clicked (optin singleClick only),
// click to open matching file, back to editor, click (nothing, item is null), then click again: AV
if List.Selected = nil then if List.Selected = nil then
exit; exit;
msg := List.Selected.Text; msg := List.Selected.Text;

View File

@ -123,9 +123,18 @@ var
toread: Integer; toread: Integer;
buff: Byte = 0; buff: Byte = 0;
str: TMemoryStream; str: TMemoryStream;
err: array[0..255] of Byte;
begin begin
if not Running then if not Running then
begin begin
//TODO-cbugfix: errors not displayed when a runnable crashes
//if poStderrToOutPut in Options then
//if Stderr <> nil then while (true) do
//begin
// toread := Stderr.Read(err[0], length(err));
// if toread = 0 then break;
// fOutputStack.Write(err[0], toread);
//end;
list.LoadFromStream(fOutputStack); list.LoadFromStream(fOutputStack);
if consume then if consume then
fOutputStack.Clear; fOutputStack.Clear;