Autor Beitrag
UGrohne
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Veteran
Beiträge: 5502
Erhaltene Danke: 220

Windows 8 , Server 2012
D7 Pro, VS.NET 2012 (C#)
BeitragVerfasst: Fr 11.04.03 15:58 
Kann es sein, dass der OpenDialog einen Bug hat?
Hab folgenden Code:

ausblenden Quelltext
1:
2:
3:
4:
5:
6:
if OpenDialog1.Execute then begin
   loadfile(OpenDialog1.FileName);
   for i:=0 to High(felder) do
       for i2:=0 to High(felder[i]) do
           paintfield(i*10,i2*10,felder[i][i2]);
   end;


Vor loadfile gibts ne AccessViolation uind ich weiß net warum. Hat jmd ne Idee?

Gruß


Zuletzt bearbeitet von UGrohne am Sa 12.04.03 18:20, insgesamt 1-mal bearbeitet
matze
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 4613
Erhaltene Danke: 24

XP home, prof
Delphi 2009 Prof,
BeitragVerfasst: Sa 12.04.03 11:20 
geht doch mal den code per F7 (einzelschritt) zeile für zeile durch und schau wo der fehler auftritt.

_________________
In the beginning was the word.
And the word was content-type: text/plain.
UGrohne Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Veteran
Beiträge: 5502
Erhaltene Danke: 220

Windows 8 , Server 2012
D7 Pro, VS.NET 2012 (C#)
BeitragVerfasst: Sa 12.04.03 12:37 
*g* Das hab ich natürlich auch schon gemacht, er tritt beim Aufruf der ganzen Funktion bzw. vom OpenDialog auf nd zwar in der Unit System n Zeile 16037 inzwischen isses ne Bereichsüberschreitung.....

*grübel*
matze
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 4613
Erhaltene Danke: 24

XP home, prof
Delphi 2009 Prof,
BeitragVerfasst: Sa 12.04.03 15:48 
puhh das ist bei mir noch nie passiert.

_________________
In the beginning was the word.
And the word was content-type: text/plain.
UGrohne Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Veteran
Beiträge: 5502
Erhaltene Danke: 220

Windows 8 , Server 2012
D7 Pro, VS.NET 2012 (C#)
BeitragVerfasst: Sa 12.04.03 15:54 
Mir auch noch nicht, das ist ja das Problem. Folgendermaßen sieht der Code aus, der den Fehler ausführt (kommt aus der System.pas):
ausblenden Quelltext
1:
2:
3:
4:
5:
6:
  newLength := PLongint(lengthVec)^;
  if newLength <= 0 then
  begin
    if newLength < 0 then
      Error(reRangeError);
    DynArrayClear(a, typeInfo);

Newlength ist kleiner als 0 und deswegen wird der RangeError ausgelöst. Aber woher kommt das? Passiert nachdem ich, im OpenDialog ne Datei ausgewählt und auf Öffnen geklickt hab.
MSCH
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 1448
Erhaltene Danke: 3

W7 64
XE2, SQL, DevExpress, DevArt, Oracle, SQLServer
BeitragVerfasst: Sa 12.04.03 17:31 
hi,
schau mal in deine prog-optionen. Sieht eher danach aus, dass hier was mit den huge-strings danneben läuft.
grez
msch
UGrohne Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Veteran
Beiträge: 5502
Erhaltene Danke: 220

Windows 8 , Server 2012
D7 Pro, VS.NET 2012 (C#)
BeitragVerfasst: Sa 12.04.03 17:44 
Hmmm, hab die eigentlich standardmäßig aktiviert, habs grad auch mal ohne probiert, aber leider ohne Erfolg, ich verzweifel hier noch, so ein blödes Prob, das mich vom weitermachen abhält *g*

Gruß
UGrohne Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Veteran
Beiträge: 5502
Erhaltene Danke: 220

Windows 8 , Server 2012
D7 Pro, VS.NET 2012 (C#)
BeitragVerfasst: Sa 12.04.03 18:21 
Ich bzw. Aya (*nochmalsdankendnickend*) hat den Fehler gefunden, es war in der loadfile-Proz ein Fehler in einer Schleife. Aber weiß der Geier, warum der Fehler immer vorher ausgegeben wurde....

Trotzdem danke an alle