AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Thema durchsuchen
Ansicht
Themen-Optionen

Neue Variable -> CPU-Fenster kommt

Ein Thema von Die Muhkuh · begonnen am 5. Jan 2005 · letzter Beitrag vom 5. Jan 2005
Antwort Antwort
Seite 1 von 2  1 2      
Benutzerbild von Die Muhkuh
Die Muhkuh

Registriert seit: 21. Aug 2003
7.332 Beiträge
 
Delphi 2009 Professional
 
#1

Neue Variable -> CPU-Fenster kommt

  Alt 5. Jan 2005, 10:25
Moin,

ich habe im private Abschnitt eine neue Variable eingefügt:

Delphi-Quellcode:
private
    { Private-Deklarationen }
    FEnemyAdventPos: Integer;
    FFrame: Integer;
    FMusik: array[0..1] of string;
    FPlayer1: Boolean; //<<-- Da, da, da!
Seit dem kommt bei jedem Start das CPU-Fenster. Kommentiere ich die Variable aus, kommt das CPU-Fenster nicht.

So, jetzt gehts aber noch weiter. Kommentiere ich irendeine Variable von da oben aus, kommt das CPU-Fenster auch nicht.

Ich kann mir das absolut nicht erklären.

Hier ist noch ein Bild vom CPU-Fenster.
  Mit Zitat antworten Zitat
Benutzerbild von Sprint
Sprint

Registriert seit: 18. Aug 2004
Ort: Edewecht
712 Beiträge
 
Delphi 5 Professional
 
#2

Re: Neue Variable -> CPU-Fenster kommt

  Alt 5. Jan 2005, 10:43
Zitat von Spider:
Ich kann mir das absolut nicht erklären.
Kurze Frage: Windows 2000 ohne aktuellem Service Pack?
Ciao, Sprint.

"I don't know what I am doing, but I am sure I am having fun!"
  Mit Zitat antworten Zitat
Benutzerbild von Die Muhkuh
Die Muhkuh

Registriert seit: 21. Aug 2003
7.332 Beiträge
 
Delphi 2009 Professional
 
#3

Re: Neue Variable -> CPU-Fenster kommt

  Alt 5. Jan 2005, 10:53
Nein. WinXP mit SP1.
  Mit Zitat antworten Zitat
Christian Seehase
(Co-Admin)

Registriert seit: 29. Mai 2002
Ort: Hamburg
11.105 Beiträge
 
Delphi 11 Alexandria
 
#4

Re: Neue Variable -> CPU-Fenster kommt

  Alt 5. Jan 2005, 11:55
Moin Spider,

und was steht im OnCreate des Formulares?
Ich vermute mal, dass da irgendwo etwas überschrieben wird.
Tschüss Chris
Die drei Feinde des Programmierers: Sonne, Frischluft und dieses unerträgliche Gebrüll der Vögel.
Der Klügere gibt solange nach bis er der Dumme ist
  Mit Zitat antworten Zitat
Benutzerbild von Die Muhkuh
Die Muhkuh

Registriert seit: 21. Aug 2003
7.332 Beiträge
 
Delphi 2009 Professional
 
#5

Re: Neue Variable -> CPU-Fenster kommt

  Alt 5. Jan 2005, 12:03
Moin Chris,

Delphi-Quellcode:
procedure Tfmain.FormCreate(Sender: TObject);
begin
  Randomize;
  SetVariables;

{$IFDEF debug}
{$ELSE}
  FMusik[0] := ExtractFilePath(Application.ExeName) + 'Musik1.mid';
  FMusik[1] := ExtractFilePath(Application.ExeName) + 'Musik2.mid';

  mpPlayer1.FileName := FMusik[0];
  mpPlayer1.Open;

  mpPlayer2.FileName := FMusik[1];
  mpPlayer2.Open;
  mpPlayer2.Play;
  FPlayer1 := false;
{$ENDIF}
end;
Delphi-Quellcode:
procedure Tfmain.SetVariables;
begin
  ExePath := ExtractFilePath(Application.ExeName);

  Engine := SpriteEngine.Engine;
  Draw := DXDraw;
  Images := ImageList;
  InputStates := Input.States;

  FEnemyAdventPos := 0;
  FFrame := 0;
  FAnzahl := 0;
  FCounter := 0;
  FOldCounter := 0;
  FScore := 0;
  FGoodieCounter := 0;
  FOldGoodieCounter := 0;
  FPointCounter := 0;
  FOldPointCounter := 0;
  FBaustelleCounter := 0;
  FOldBaustelleCounter := 0;

  if Debug = 2 then
    DebugSL := TStringList.Create;
end;
  Mit Zitat antworten Zitat
Christian Seehase
(Co-Admin)

Registriert seit: 29. Mai 2002
Ort: Hamburg
11.105 Beiträge
 
Delphi 11 Alexandria
 
#6

Re: Neue Variable -> CPU-Fenster kommt

  Alt 5. Jan 2005, 12:21
Moin Manu,

die Zeilen mit denen ich nichts anfangen kann:

Delphi-Quellcode:
  Engine := SpriteEngine.Engine;
  InputStates := Input.States;
wenn vor der Anzeige des Formulares, sonst nichts passiert erscheinen mir diese als "verdächtig", zumal ich nicht weiss, was jeweils dahintersteckt.
Tschüss Chris
Die drei Feinde des Programmierers: Sonne, Frischluft und dieses unerträgliche Gebrüll der Vögel.
Der Klügere gibt solange nach bis er der Dumme ist
  Mit Zitat antworten Zitat
Benutzerbild von Die Muhkuh
Die Muhkuh

Registriert seit: 21. Aug 2003
7.332 Beiträge
 
Delphi 2009 Professional
 
#7

Re: Neue Variable -> CPU-Fenster kommt

  Alt 5. Jan 2005, 12:27
Moin Chris,

das sind von den DelphiX Komponenten einmal die SpriteEngine und einmal die ein DXInput zum überprüfen welche Tasten gedrückt werden. Mit denen hat das nichts zu tun.
  Mit Zitat antworten Zitat
Christian Seehase
(Co-Admin)

Registriert seit: 29. Mai 2002
Ort: Hamburg
11.105 Beiträge
 
Delphi 11 Alexandria
 
#8

Re: Neue Variable -> CPU-Fenster kommt

  Alt 5. Jan 2005, 12:37
Moin Manu,

dann starte das Programm doch mal mit F7/F8, und versuch' mal den Fehler im Einzelschrittmodus einzukreisen.
Tschüss Chris
Die drei Feinde des Programmierers: Sonne, Frischluft und dieses unerträgliche Gebrüll der Vögel.
Der Klügere gibt solange nach bis er der Dumme ist
  Mit Zitat antworten Zitat
Benutzerbild von mirage228
mirage228

Registriert seit: 23. Mär 2003
Ort: Münster
3.750 Beiträge
 
Delphi 2010 Professional
 
#9

Re: Neue Variable -> CPU-Fenster kommt

  Alt 5. Jan 2005, 12:38
Hi,

hast Du mal versucht, das ganze Schrittweise auszuführen, um herauszufinden, wo der Fehler genau auftritt?

mfG
mirage228

Edit: Mist, zu spät
David F.

May the source be with you, stranger.
PHP Inspection Unit (Delphi-Unit zum Analysieren von PHP Code)
  Mit Zitat antworten Zitat
Benutzerbild von Die Muhkuh
Die Muhkuh

Registriert seit: 21. Aug 2003
7.332 Beiträge
 
Delphi 2009 Professional
 
#10

Re: Neue Variable -> CPU-Fenster kommt

  Alt 5. Jan 2005, 12:43
So,

ich habs mal einkreisen können.

Hier kommt das CPU-Fenster:

Delphi-Quellcode:
procedure TJvHookInfos.WindowProc(var Msg: TMessage);
var
  TmpHookInfo: PJvHookInfo;
  { FStack[Index] is used to travel through the hook infos;
    FStack[Index] points to the current hook info (and might be nil)
    Note that the address of FStack may change due to ReallocMem calls in
    IncDepth; thus we can't assign FStack[Index] to a local var.
  }

  Index: Integer;
begin
  { An object can now report for every possible message that he has
    handled that message, thus preventing the original control from
    handling the message; this is probably not a good idea in the case
    of WM_DESTROY, WM_CLOSE etc. But that's the users responsibility,
    I think }


  Msg.Result := 0;

  IncDepth;
  // (rb) Don't know what the performance impact of a try..finally is.
  try
    { The even members in the stack are hoBeforeMsg hooks }
    Index := 2 * (FStackCount - 1);
    FStack[Index] := FFirst[hoBeforeMsg];
    while Assigned(FStack[Index]) do
    begin
      { We retrieve the next hook info *before* the call to Hook(), because,
        see (I) }

      TmpHookInfo := FStack[Index];
      FStack[Index] := FStack[Index].Next;
      if TmpHookInfo.Hook(Msg) or FControlDestroyed then
        Exit;
      { FStack[Index] may now be changed because of register/unregister calls
        inside HookInfo.Hook(Msg). }

    end;

    { Maybe only exit here (before the original control handles the message),
      thus enabling all hooks to respond to the message? Otherwise if you
      have 2 components of the same class, that hook a control, then only 1 will
      get the message }


    if TMethod(FOldWndProc).Data <> nil then //<-- DA DA DA!!! Er wars!
      FOldWndProc(Msg)
    else
    if TMethod(FOldWndProc).Code <> nil then
      Msg.Result := CallWindowProc(TMethod(FOldWndProc).Code, Handle, Msg.Msg,
        Msg.WParam, Msg.LParam);

    if FControlDestroyed then
      Exit;

    { The odd members in the list are hoAftermsg hooks }
    Index := 2 * FStackCount - 1;
    FStack[Index] := FFirst[hoAfterMsg];
    while Assigned(FStack[Index]) do
    begin
      TmpHookInfo := FStack[Index];
      FStack[Index] := FStack[Index].Next;
      if TmpHookInfo.Hook(Msg) or FControlDestroyed then
        Exit;
    end;
  finally
    DecDepth;
    if (Control = nil) and (Msg.Msg = WM_DESTROY) then
      // Handle is being destroyed: remove all hooks on this window
      ControlDestroyed;
  end;

  { (I)
        HookInfos before                                HookInfos after
        call to Hook()                                  call to Hook()

        |----------|  If FStack[Index] point to A        |----------|
    -->| hook A  |  (arrow) and hook A deletes itself  | hook B  |<--
        |----------|  then after the call to Hook,      |----------|
        | hook B  |  FStack[Index] points to B. If we  | hook C  |
        |----------|  then call Next, FStack[Index]      |----------|
        | hook C  |  points to C (should be B)
        |----------|
      }

end;
[edit] Andere Frage: Warum taucht das Fenster auf? Was muss passieren damit das Fenster angezeigt wird?
Achso, wenn ich das Fenster schließe und wieder auf F9 drücke, kann ich das Programm trotzdem starten. [/edit]
  Mit Zitat antworten Zitat
Antwort Antwort
Seite 1 von 2  1 2      


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 17:38 Uhr.
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz