sharpdx / SharpDX

SharpDX GitHub Repository
http://sharpdx.org
MIT License
1.69k stars 638 forks source link

The SharpDX commit b9f7519 caused the .NET Native compiler to crash. #810

Closed JoeErickson closed 7 years ago

JoeErickson commented 7 years ago

This change works around the .NET Native compiler bug by casting to (IntPtr).

I also noticed that DataBuffer had the same issue as DataStream which was fixed by b9f7519 so I applied the same fix to DataBuffer.

FWIW the code in question calls Interop.Fixed which throws NotImplementedException.

xoofx commented 7 years ago

Thanks for digging into this.

JoeErickson commented 7 years ago

Hello Alexandre,

I’m happy to help. I’m looking into a problem where using new WicStream(factory, memoryStream) crashes when used from multiple threads but only with .NET Native, and this was a blocking problem. I was fortunate to know that a build from last summer would run with.NET Native.

Do you have a relatioinship with Microsoft that would enable you to report problems with .NET Native? I’ve not had much luck reporting problems to them. If you have someone you can talk to you might point them to your checkin for this issue so they can hopefully fix .NET Native. If you do that you might mention that it worked with ARM but not with x86 or x64. Also, the .NET Native compiler still crashes on DEBUG builds of SharpDX (not helpful for diagnosing my WicStream problem but not a show stopper for my thankfully).

I’m new to github (that was my first pull request) so please let me know if I do anything incorrectly.

Thanks for SharpDX!

Joe

From: Alexandre Mutel [mailto:notifications@github.com] Sent: Wednesday, October 19, 2016 3:18 AM To: sharpdx/SharpDX Cc: JoeErickson; Author Subject: Re: [sharpdx/SharpDX] The SharpDX commit b9f7519 caused the .NET Native compiler to crash. (#810)

Thanks for digging into this.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/sharpdx/SharpDX/pull/810#issuecomment-254745760 , or mute the thread https://github.com/notifications/unsubscribe-auth/ANdU-kLAfyzUu7Z_6a9mAgwxXUxg6QSDks5q1dJUgaJpZM4KaqU9 . https://github.com/notifications/beacon/ANdU-pzJeEksXovKs--0Z4WFyZmcdm-Yks5q1dJUgaJpZM4KaqU9.gif