Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.


Welcome, Guest
Guest Settings
Help

Thread: Berlin Update 1 - FMX 3D Form TControl3D.RenderInternal Access Violation


This question is not answered. Helpful answers available: 2. Correct answers available: 1.


Permlink Replies: 2 - Last Post: Apr 19, 2017 9:01 PM Last Post By: Registered User
Registered User

Posts: 46
Registered: 3/4/05
Berlin Update 1 - FMX 3D Form TControl3D.RenderInternal Access Violation  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Apr 13, 2017 4:30 AM
Anyone aware of a reason for this:

Access violation at address 6881C9D6 in module 'nvwgf2um.dll'. Read of address FEEEFEFE.

Was testing an App on how well firemonkey works in 3D - and after running a couple of times i got this error.

Havent been able to reproduce but dont want to do a whole lot of dev to find this is unstable.


main thread ($4054):
6881c9d6 +000 nvwgf2um.dll
009bb9d2 +2e6 landscape.exe FMX.Controls3D TControl3D.RenderInternal
00873615 +0cd landscape.exe FMX.Context.DX11 TDX11Context.DoEndScene
0063b001 +00d landscape.exe FMX.Types3D TContext3D.EndScene
009e4044 +904 landscape.exe FMX.Forms3D TCustomForm3D.PaintRects
004f9bec +010 landscape.exe System.Generics.Defaults Equals_Class
009135c7 +073 landscape.exe FMX.Platform.Win {System.Generics.Collections}TDictionary<FMX.Types.TWindowHandle,FMX.Platform.Win.TUpdateRects>.GetBucketIndex
004f9bfe +00e landscape.exe System.Generics.Defaults GetHashCode_Class
00905911 +281 landscape.exe FMX.Platform.Win WMPaint
00907235 +479 landscape.exe FMX.Platform.Win WndProc
0040e7cc +010 landscape.exe System @IntfClear
009067dd +111 landscape.exe FMX.Platform.Win HandleMouseGestures
00907cc9 +f0d landscape.exe FMX.Platform.Win WndProc
775ddf12 +092 user32.dll CallWindowProcW
77da08c4 +034 ntdll.dll KiUserCallbackDispatcher
775ddf9b +00b user32.dll DispatchMessageW
00902c3b +02f landscape.exe FMX.Platform.Win TPlatformWin.HandleMessage
0098b1bf +03b landscape.exe FMX.Forms TApplication.HandleMessage
00902a77 +033 landscape.exe FMX.Platform.Win TPlatformWin.Run
0098bbc1 +05d landscape.exe FMX.Forms TApplication.Run
009ff9f4 +04c landscape.exe landscape 18 +4 initialization
76b462c2 +022 KERNEL32.DLL BaseThreadInitThunk

Whole entire source code is literally:

{code}
procedure TMain.Form3DCreate(Sender: TObject);
begin
FMouseDown := False;
FAddable := aTree;
FHouseAngle := 30;
FSunAngle := -45;
FSeparation := 0.3;
end;

procedure TMain.landMouseDown(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Single; RayPos, RayDir: TVector3D);
begin
FMouseDown := True;
FLastX := -99;
FLastZ := -99;
end;

procedure TMain.landMouseMove(Sender: TObject; Shift: TShiftState; X,
Y: Single; RayPos, RayDir: TVector3D);
var
newObj: TProxyObject;
HitPos: TPoint3D;
RayPosPt : TPoint3D;
RayDirPt : TPoint3D;

begin
if FMouseDown then begin

RayPosPt := TPoint3D(RayPos);
RayDirPt := TPoint3D(RayDir);

land.RayCastIntersect(RayPosPt, RayDirPt, HitPos);
// if moved far enough
if (Abs(HitPos.X - FLastX) > FSeparation) or (Abs(HitPos.Z - FLastZ) > FSeparation) then begin
// add new object as a proxy object
newObj := TProxyObject.Create(self);
land.AddObject(newObj);

Label1.Text := IntToStr(Land.ChildrenCount);

case FAddable of
aTree: begin
newObj.SourceObject := tree;
newObj.Scale.Assign(tree.Scale);
newObj.RotationAngle.X := tree.RotationAngle.X;
newObj.RotationAngle.Y := tree.RotationAngle.Y;
newObj.RotationAngle.Z := tree.RotationAngle.Z;
FSeparation := 0.5;
end;
aHouse: begin
newObj.SourceObject := walls; // need to point at material !!!
newObj.Scale.Assign(house.Scale);
newObj.RotationAngle.Y := house.RotationAngle.Y;
newObj.RotationAngle.Z := FHouseAngle;
FSeparation := 1.0;
end;
end;

HitPos := land.AbsoluteToLocal3D(HitPos);
newObj.Position.Z := newObj.SourceObject.Position.Z;
newObj.Position.X := HitPos.X;
newObj.Position.Y := HitPos.Y; // Z -> Y

newObj.HitTest := False;

FLastX := HitPos.X;
FLastZ := HitPos.Z;
end;
end;
end;

procedure TMain.landMouseUp(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Single; RayPos, RayDir: TVector3D);
begin
FMouseDown := False;
end;

procedure TMain.BtnHouseClick(Sender: TObject);
begin
FAddable := aHouse;
FHouseAngle := (FHouseAngle + 45) mod 360;
Label1.Text := IntToStr(FHouseAngle);
end;

procedure TMain.BtnTreeClick(Sender: TObject);
begin
FAddable := aTree;
end;

procedure TMain.BtnUndoClick(Sender: TObject);
begin
if land.ChildrenCount > 2 then
land.RemoveObject(land.ChildrenCount-1);
end;

procedure TMain.BtnSunClick(Sender: TObject);
begin
FSunAngle := (FSunAngle + 10) mod 360;
sun.RotationAngle.Y := FSunAngle;
Label2.Text := IntToStr(FSunAngle);
end;

{Code}

Edited by: Registered User on Apr 13, 2017 4:31 AM

Douglas Rudd

Posts: 314
Registered: 5/16/97
Re: Berlin Update 1 - FMX 3D Form TControl3D.RenderInternal Access Violation  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Apr 13, 2017 7:32 PM   in response to: Registered User in response to: Registered User
nvwgf2um.dll is the nvidia graphics driver. Maybe check that it is up to date?
Registered User

Posts: 46
Registered: 3/4/05
Re: Berlin Update 1 - FMX 3D Form TControl3D.RenderInternal Access Violation  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Apr 19, 2017 9:01 PM   in response to: Registered User in response to: Registered User
Driver is a 3 months old, running plenty of other 3D apps with no issues. I press on with dev and see if this error reproduces and then can maybe work out why.
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02