Talk:FMX.COLLADAModelViewer Sample

From RAD Studio Code Examples
Jump to: navigation, search

FP> This sample trigger an exception "floating point stack check at 0x004047c0" at runtime before showing anything on screen. I updated the source code from the SVN to the current release (revision 418, RadStudio_XE2 branch) and compiled using Embarcadero® Delphi® XE2 Version 16.0.4429.46931. Actually it used to work month ago when I first tryed it. So something has changed since then...

DT> Thank you for your input! We added the problem you reported to our work queue. -- Denisa Tibeica


The issue comes from the line:

     Res := IDirect3D9Ex(Direct3D9Obj).CreateDeviceEx(D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, 0, VP, @FPresentParams, nil, IDirect3DDevice9Ex(FDevice));

This line is in FMX.Context.DX9 into constructor TDirectXContext.CreateFromWindow.

This line call System._CopyRecord which in turn calls System.Move which triggers the exception.

Strangely, the SVN repository contains two files which are part of FireMonky source code: FMX.Context.DX9 and FMX.Defines.inc. In my opinion, those files should not be in the SVN repository since they are part of Delphi itself ! And the files in the SVN are not the same as the one delivered with Delphi itself.


Anyway, using the two units provided with XE2 doesn't solve the issue.

Update 05-19-2012: Using XE2 HF1 for Upd4 (Version 16.0.4504.48759), the application runs but gives scrambled graphical result. Activating RangeCheck error in the project options triggers the ERangeError exception on line 322 in MV.ColladaImport:

   VetexData.Specular[i] := LTangentColor.Color;

This happen on the first loop when i is 0 while VetexData length is 2830. No reason to trigger the exception.

The sample is no longer supported by the current version. It will be fixed in a future release. Thank you again for your feedback! -- Denisa Tibeica