Autor Beitrag
Calyptus
ontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic starofftopic star
Beiträge: 386

Win Xp Prof
D3, D6 Pers, D7 Ent
BeitragVerfasst: So 26.09.04 19:23 
Hallo erstmal...

Ich hab ein ganzschön komisches Problem. Wenn ich mein Programm starte, kommt manchmal diese Fehlermeldung:

Access violation at address 00417827 in module 'BQ.exe'. Read of address 00000100

Manchmal tuts aber !!! (ohne das ich dazwischen was am Code verändert oder neu gestartet habe.)
Das Prog startet zwar auch mit der Fehlermeldung, tut dann aber nicht so richtig.
Kann mir jemand helfen :?: :?: :?:

_________________
Luft- und Raumfahrtechnik an der Uni Stuttgart
.Chef
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 1112



BeitragVerfasst: So 26.09.04 19:39 
Ein bisschen genauer musst du schon werden. Verwendest du Threads oder dynamische Arrays?

_________________
Die Antworten auf die 5 häufigsten Fragen:
1. Copy(), Pos(), Length() --- 2. DoubleBuffered:=True; --- 3. Application.ProcessMessages bzw. TThread --- 4. ShellExecute() --- 5. Keine Vergleiche von Real-Typen mit "="!
Alstar
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 827



BeitragVerfasst: So 26.09.04 19:40 
Quelltext, bitte!
Mich würde der OnCreate-Quelltext der Formulare interessieren!

Alstar
Calyptus Threadstarter
ontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic starofftopic star
Beiträge: 386

Win Xp Prof
D3, D6 Pers, D7 Ent
BeitragVerfasst: So 26.09.04 20:28 
1.Ich verwende weder Threads noch dynamische Arrays.
2.Der Code:

ausblenden volle Höhe Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
procedure TForm1.FormCreate(Sender: TObject);
begin
Data       := TStringlist.Create;
Data2      := TStringlist.Create;
Maus_Data  := TStringlist.Create;
cols       := TStringlist.Create;

SystemParametersInfo(SPI_GETWorkArea, 0, @WorkArea, SPIF_SENDCHANGE);
DockAt(alTop);

Maus_Data.LoadFromFile('C:\Maus.txt');
Maus_Pix := StrToFloat(Maus_Data[0]);


end;

procedure TForm1.DockAt(Align: TAlign);
var
 TempRect: TRect;
begin
 if calign = align then exit;
 calign := align;
 TempRect := WorkArea;
 FormStyle := fsStayOnTop;
 BorderStyle := bsNone;
 SetBounds(WorkArea.Left, WorkArea.Top, defaultWidth, defaultHeight);
 case Align of
  alTop: begin
          width := WorkArea.Right-WorkArea.Left;
          TempRect.Top := height+WorkArea.Top;
         end;
  alBottom: begin
             Width := WorkArea.right - WorkArea.left;
             Top := WorkArea.Bottom - height;
             TempRect.Bottom := WorkArea.Bottom-height;
            end;
  alLeft: begin
           height := WorkArea.Bottom-WorkArea.Top;
           TempRect.Left := width+Workarea.Left;
          end;
  alright: begin
            Height := WorkArea.bottom - WorkArea.top;
            Left := WorkArea.Right - width;
            TempRect.Right := WorkArea.Right-Width;
           end;
 end;
 SystemParametersInfo(SPI_SetWorkArea, 0, @TempRect, SPIF_SENDCHANGE);
end;


Die DockAt Procedure hab ich genau aus dem Tut von obbschtkuche über Symbolleisten hier im DF. Sollte also tun....

Moderiert von user profile iconChristian S.: Code- durch Delphi-Tags ersetzt.

_________________
Luft- und Raumfahrtechnik an der Uni Stuttgart
BenBE
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 8721
Erhaltene Danke: 191

Win95, Win98SE, Win2K, WinXP
D1S, D3S, D4S, D5E, D6E, D7E, D9PE, D10E, D12P, DXEP, L0.9\FPC2.0
BeitragVerfasst: So 26.09.04 20:30 
Ich putze grad meine Glaskugel und kann dir daher nicht helfen ...

_________________
Anyone who is capable of being elected president should on no account be allowed to do the job.
Ich code EdgeMonkey - In dubio pro Setting.
AXMD
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 4006
Erhaltene Danke: 7

Windows 10 64 bit
C# (Visual Studio 2019 Express)
BeitragVerfasst: So 26.09.04 20:31 
Hmmm... setzt mal zwei drei Breakpoints und lokalisier den Fehler - wenn er denn auftritt.

AXMD
Yusha
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 20



BeitragVerfasst: So 26.09.04 21:34 
Titel: Typischer Null Pointer
Ich seh da jetzt auf den ersten Blick auch nix offensichtliches. Würd einfach mal Schritt für Schritt debuggen und mal alle Instanzen auf korrekte Initialisierung überprüfen.
Calyptus Threadstarter
ontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic starofftopic star
Beiträge: 386

Win Xp Prof
D3, D6 Pers, D7 Ent
BeitragVerfasst: Mo 27.09.04 21:47 
Hmm.... jetzt tuts irgendwie.... :shock:

Dank euch allen. (Glaub ich sollte mal wieder Formatieren oder Virenscannen...)

_________________
Luft- und Raumfahrtechnik an der Uni Stuttgart
uall@ogc
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 1826
Erhaltene Danke: 11

Win 2000 & VMware
Delphi 3 Prof, Delphi 7 Prof
BeitragVerfasst: Mo 27.09.04 22:27 
auch wenns jetzt geht aber

StrToFloat(Maus_Data[0]); <- würd ich net so machen :)
Luckie
Ehemaliges Mitglied
Erhaltene Danke: 1



BeitragVerfasst: Mo 27.09.04 23:29 
Wenn Maus_Data ein String ist, fängt der beim Index 1 an und nicht bei 0.
Calyptus Threadstarter
ontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic starofftopic star
Beiträge: 386

Win Xp Prof
D3, D6 Pers, D7 Ent
BeitragVerfasst: Di 28.09.04 12:33 
danke aber maus_data ist eine TStringlist.

_________________
Luft- und Raumfahrtechnik an der Uni Stuttgart