Message: 49630 System.AccessViolationException + crash

Add-in Express™ Support Service
That's what is more important than anything else

Message: 49630 System.AccessViolationException + crash
 
Cs?k?s Erik




Posts: 11
Joined: 2009-08-13
Hi,

We have a strange situation, where in the end result the application crashes.

Windows 10 64bit / Office 2016 64bit (only this configuration seems to be affected, 32 bit Office is Ok)

Loader version: 7.1.4050.0
Operating System: Microsoft (build 16299), 64-bit
Process Owner: Administrator
Command Line: "C:\Program Files\Microsoft Office\root\Office16\OUTLOOK.EXE"
Run 'As Administrator': Yes
Process Elevated: Yes
Integrity Level: High
UAC (User Account Control): Off

The exception is>

Message: 49630 0 0
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
--- End of inner exception stack trace ---
at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
at System.Delegate.DynamicInvokeImpl(Object[] args)
at System.Windows.Forms.Control.InvokeMarshaledCallbackDo(ThreadMethodEntry tme)
at System.Windows.Forms.Control.InvokeMarshaledCallbackHelper(Object obj)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Windows.Forms.Control.InvokeMarshaledCallback(ThreadMethodEntry tme)
at System.Windows.Forms.Control.InvokeMarshaledCallbacks()
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.Form.WndProc(Message& m)
at MyApp.WndProc(Message& m)
System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.

The wndproc override i have changed this way>

[System.Runtime.ExceptionServices.HandleProcessCorruptedStateExceptions]
protected override void WndProc(ref Message m) {}

to be able to at least log the error. Ignoring message 49630 doesnt help. The exception is thrown cca on every second start of the application

Thanks for the help
Erik
Posted 02 Jul, 2018 08:29:39 Top
Andrei Smolin


Add-in Express team


Posts: 18830
Joined: 2006-05-11
Hello Erik,

I assume the issue relates to your overriding WndProc of some form, not to Add-in Express. Do I understand it right?


Andrei Smolin
Add-in Express Team Leader
Posted 04 Jul, 2018 01:12:55 Top
Cs?k?s Erik




Posts: 11
Joined: 2009-08-13
Hello Andrei

Yes, the issue occurs in the main form of the app, the reason why i am is asking, is that the form is hosted in an addin, and the message id 49630 i have seen is associated with addin express (Registered message WM_ADXHIDEALLREGIONFORMS=49630, Registered message WM_ADXSETLATESTPROC=49630) . If i simply filter this message (for this ID doesnt call base... ), then the addin form is not displayed.

Regards,
Erik
Posted 04 Jul, 2018 01:50:54 Top
Andrei Smolin


Add-in Express team


Posts: 18830
Joined: 2006-05-11
Hello Erik,

Is the issue reproducible on a simple add-in project? If so, please send us the project for testing. You can find the support email address in {Add-in Express installation folder}\readme.txt. Please make sure your email contains a link to this topic.


Andrei Smolin
Add-in Express Team Leader
Posted 04 Jul, 2018 10:59:24 Top