![]() |
Andorra - Imagelist.Add -> SIGSEGV
Hallo!
Folgender Quellcode erzeugt eine SIGSEGV Fehlermeldung
Delphi-Quellcode:
Anschließend springt der Compiler in folgende Prozedur der Unit "AdDraws":
//-----FillImagelist
//-----fills in the imagelist with alle the necessary images/textures procedure TMainForm.FillImagelist(path: String); begin { Tables } if ImageList <> nil then begin with Imagelist.Add('Table_Blue') do begin Texture.LoadGraphicFromFile(path+'/Tische/blau.bmp'); end; with Imagelist.Add('Table_Red') do begin Texture.LoadGraphicFromFile(path+'/Tische/rot.bmp'); end; with Imagelist.Add('Table_Green') do begin Texture.LoadGraphicFromFile(path+'/Tische/gruen.bmp'); end; ImageList.Restore; //very important line! end; end;
Delphi-Quellcode:
Ein Eine Instanz des Typs "TAdDraw" ist erstellt und der Imagelist zugewiesen:
procedure TAdCustomImage.Initialize;
begin //Finalize the image, if it is still initialized Finalize; //Create a new mesh AdMesh := FParent.AdAppl.CreateMesh; end;
Delphi-Quellcode:
Danke schonmal für die Hilfe...
procedure TMainForm.FormCreate(Sender: TObject);
begin //Surface: Surface := TAdDraw.Create(MainForm); //creates the Surface Surface.DllName := 'AndorraOGLLaz.dll'; //Loads the Dll-library; based on OpenGL //SpriteEngine: SpriteEngine := TSpriteEngine.Create(nil); SpriteEngine.Surface := Surface; //Connect the main-loop of the application with the andorra-loop Application.OnIdle := @Idle; //Create ImageList and fill in the images: ImageList := TAdImageList.Create(Surface); FillImagelist('Data/Bilder'); NewGame(); end; |
AW: Andorra - Imagelist.Add -> SIGSEGV
Hallo!
Das Problem tritt jetzt auch allgemein auf, wenn ich meiner AdImagelist ein Bild hinzufügen möchte:
Delphi-Quellcode:
procedure TMainForm.FormCreate(Sender: TObject);
begin //Surface: Surface := TAdDraw.Create(MainForm); //creates the Surface Surface.DllName := 'AndorraOGLLaz.dll'; //Loads the Dll-library; based on OpenGL //SpriteEngine: SpriteEngine := TSpriteEngine.Create(nil); SpriteEngine.Surface := Surface; //Connect the main-loop of the application with the andorra-loop Application.OnIdle := Idle; //Create ImageList and fill in the images: AdImageList := TAdImageList.Create(Surface); with AdImageList.Add('test') do Texture.LoadGraphicFromFile('Bilder/Data/Kugeln/Kugel1.bmp'); //FillImagelist('Data/Bilder'); NewGame(); end; |
AW: Andorra - Imagelist.Add -> SIGSEGV
Du hast ein TAdDraw mit dem Namen "Surface"?
Diesen Namen vielleicht mal ändern, denn TAdDraw hat ebenfralls intern ein Surface. Vielleicht ist es ja nur der Namenskonflikt? "Surface" mal durch "myDraw" (oder was du willst) ersetzen? |
AW: Andorra - Imagelist.Add -> SIGSEGV
Delphi-Quellcode:
Danke für die Antwort, aber es tritt immer noch der selbe Fehler auf...
procedure TMainForm.FormCreate(Sender: TObject);
begin //Surface: AdDraw := TAdDraw.Create(MainForm); //creates the Surface AdDraw.DllName := 'AndorraOGLLaz.dll'; //Loads the Dll-library; based on OpenGL //SpriteEngine: SpriteEngine := TSpriteEngine.Create(nil); SpriteEngine.Surface := AdDraw; //Connect the main-loop of the application with the andorra-loop Application.OnIdle := Idle; //Create ImageList and fill in the images: AdImageList := TAdImageList.Create(AdDraw); with AdImageList.Add('test') do Texture.LoadGraphicFromFile('Bilder/Data/Kugeln/Kugel1.bmp'); //FillImagelist('Data/Bilder'); //NewGame(); end; |
Alle Zeitangaben in WEZ +1. Es ist jetzt 11:07 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 by Thomas Breitkreuz