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}
dmdproc.OnReadData := @asyncprocOutput;
dmdproc.OnTerminate:= @asyncprocTerminate;
dmdproc.Options := [poStdErrToOutput, poUsePipes];
dmdproc.Options := [poUsePipes, poStderrToOutPut];
dmdproc.Executable := DCompiler;
dmdproc.Parameters.Add(fDoc.fileName);
dmdproc.Parameters.Add('-J' + ExtractFilePath(fDoc.fileName));

View File

@ -871,6 +871,8 @@ var
pos: TPoint;
msg: string;
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
exit;
msg := List.Selected.Text;

View File

@ -123,9 +123,18 @@ var
toread: Integer;
buff: Byte = 0;
str: TMemoryStream;
err: array[0..255] of Byte;
begin
if not Running then
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);
if consume then
fOutputStack.Clear;