mkaring / ConfuserEx

An open-source, free protector for .NET applications
https://mkaring.github.io/ConfuserEx/
MIT License
2.26k stars 349 forks source link

DevExpress + ReferenceProxyProtection (strong mode) crashes #515

Open vmpsoft opened 1 year ago

vmpsoft commented 1 year ago

Steps to Reproduce:

using System.Windows.Forms;
using DevExpress.XtraBars;
using DevExpress.XtraEditors;

namespace Test
{
        public class Form1 : XtraForm
    {
        protected override void Dispose(bool disposing)
        {
            if (disposing && this.components != null)
            {
                this.components.Dispose();
            }
            base.Dispose(disposing);
        }

crproj:

 <protection id="ref proxy">
          <argument name="mode" value="strong" />
 </protection>

The proitected application crashes inside OnClose event:

System.Security.VerificationException: Operation could destabilize the runtime.
   at (XtraForm , Boolean )
   at System.Windows.Forms.Form.WmClose(Message& m)
   at DevExpress.XtraEditors.DForm.WndProc(Message& m)
   at DevExpress.XtraEditors.XtraForm.WndProc(Message& msg)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)