Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Die Delphi-IDE (https://www.delphipraxis.net/62-die-delphi-ide/)
-   -   Delphi IDE Bug (https://www.delphipraxis.net/71383-delphi-ide-bug.html)

ErazerZ 14. Jun 2006 11:57


Delphi IDE Bug
 
hi Leute,
mir ist neulich ein bug in Delphi (6+7) aufgefallen (bei uall's ring0 unit) der dazu führt das Delphi total abstürzt. Also ich zeig mal ein Beispiel:
Delphi-Quellcode:
// dieser record muss in z.b. Unit1 deklariert werden, unter TForm usw.
type
  PMyRecord = ^PMyRecord; // das ist das Problem ..
  TMyrecord = packed record
    Value1: PChar;
    Value2: Integer;
    Value3: ShortString;
    Value4: Cardinal;
    Value5: Pointer;
  end;
ruft man nun z.B. "Unit1." auf sollte normalerweise die Box (wo alle Befehle, Klassen stehen) kommen. Jedoch kommt es das erste mal zu einer Fehlermeldung:
Zitat:

---------------------------
Danger
---------------------------
Stack overflow - save your work and restart Delphi.
---------------------------
OK
---------------------------
Tippt man das jetzt erneut ein, und die Box normalweiße anzeigt werden sollte, stürzt Delphi dabei total ab und muss neu gestartet werden.
Ich bin jedoch nicht sicher ob der Fehler noch unter Delphi 2005 und 2006 noch dabei ist.

Kroko1999 14. Jun 2006 12:04

Re: Delphi IDE Bug
 
ich habe D6 Pro und bei mir gibt es keinerlei Probleme, er komp. und startet einwandfrei!

mkinzler 14. Jun 2006 12:08

Re: Delphi IDE Bug
 
1.) (Sicher nur tippfehler) müßte es
Delphi-Quellcode:
PMyRecord = ^TMyRecord;
heißen.

Aber unter D2006 funktioniert es problemlos.

ErazerZ 14. Jun 2006 12:14

Re: Delphi IDE Bug
 
Zitat:

Zitat von Kroko1999
ich habe D6 Pro und bei mir gibt es keinerlei Probleme, er komp. und startet einwandfrei!

ja das Kompilieren ist auch kein Problem, das Problem ist wenn Delphi die Box aufruft wo alle Befehle, Variablen der Unit stehen.
Zitat:

Zitat von mkinzler
1.) (Sicher nur tippfehler) müßte es
Delphi-Quellcode:
PMyRecord = ^TMyRecord;
heißen.
Aber unter D2006 funktioniert es problemlos.

Ja mir ist auch bewusst das es ein Tippfehler ist, ich wollte nur sagen das Delphi ein Problem mit diesem Code hat.
Ich hab mir das so vorgestellt:
Delphi-Quellcode:
unit Unit1;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs;

type
  TForm1 = class(TForm)
    procedure FormCreate(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;
type
  PMyRecord = ^PMyRecord; // das ist das Problem ..
  TMyrecord = packed record
    Value1: PChar;
    Value2: Integer;
    Value3: ShortString;
    Value4: Cardinal;
    Value5: Pointer;
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.FormCreate(Sender: TObject);
begin
  { wenn man das hier eintippt kommt die box, und weil man oben PMyRecord = ^PMyReord gemacht hat stürzt Delphi ab wenn
    es alle Funktionen auflisten sollte }
  Unit1.  
end;

mkinzler 14. Jun 2006 12:18

Re: Delphi IDE Bug
 
Also D2006 weigert sich das zu kompilieren, da die "Typdefinition unvollständig" sei.

sakura 14. Jun 2006 12:26

Re: Delphi IDE Bug
 
Zitat:

Zitat von mkinzler
Also D2006 weigert sich das zu kompilieren, da die "Typdefinition unvollständig" sei.

Das war ein Compilerbug, welcher in iirc D2005 behoben wurde. :P

Das war auch der Grund für den Absturz, da hier die Code-Insight Methoden sich bis zum Stack-Overflow iterativ aufgerufen haben.

...:cat:...


Alle Zeitangaben in WEZ +1. Es ist jetzt 12:52 Uhr.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz