You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The function Core.Util.GetArray uses a static array to lower array allocation costs, but newer version of SlimDX (currently I'm using SlimDX 4.0.13.44) seems to expect a array of exact length needed.
For example, in LightingDemo, running this demo will throw a NullReferenceException, located at this line:
With the help of the debugger I found that all fields of _fxPointLight became invalid. A watch on _fxPointLight shows that the change happens just after the _fxDirLight.SetRawValue call. So I canceled the static buffer and tried to create a new array of len bytes each time, and this modification worked. I suspect SlimDX neither fully checks the parameters nor handles this situation well and internal states of D3D just crash.
This problem also affects other several demos.
The text was updated successfully, but these errors were encountered:
The function
Core.Util.GetArray
uses a static array to lower array allocation costs, but newer version of SlimDX (currently I'm using SlimDX 4.0.13.44) seems to expect a array of exact length needed.For example, in LightingDemo, running this demo will throw a
NullReferenceException
, located at this line:With the help of the debugger I found that all fields of
_fxPointLight
became invalid. A watch on_fxPointLight
shows that the change happens just after the_fxDirLight.SetRawValue
call. So I canceled the static buffer and tried to create a new array oflen
bytes each time, and this modification worked. I suspect SlimDX neither fully checks the parameters nor handles this situation well and internal states of D3D just crash.This problem also affects other several demos.
The text was updated successfully, but these errors were encountered: