AccessViolationException in simple WinForms app

PDF-XChange Editor SDK for Developers

Moderators: TrackerSupp-Daniel, Tracker Support, Paul - Tracker Supp, Vasyl-Tracker Dev Team, Chris - Tracker Supp, Sean - Tracker, Ivan - Tracker Software, Tracker Supp-Stefan

Forum rules
DO NOT post your license/serial key, or your activation code - these forums, and all posts within, are public and we will be forced to immediately deactivate your license.

When experiencing some errors, use the IAUX_Inst::FormatHRESULT method to see their description and include it in your post along with the error code.
Post Reply
edvschu
User
Posts: 127
Joined: Fri Jun 25, 2010 6:54 am

AccessViolationException in simple WinForms app

Post by edvschu »

hello *,

we've created a simple forms app with two windows. the second form contains the activex control. the first win is creating/calling the second win on button click. the click-code is this:

Code: Select all

Using f = New Form2
            f.ShowDialog()
End Using
until version 7.0.323.2 it worked perfectly. now with version 7.0.325.1 we get an AccessViolationException:

Code: Select all

System.AccessViolationException: Es wurde versucht, im geschützten Speicher zu lesen oder zu schreiben. Dies ist häufig ein Hinweis darauf, dass anderer Speicher beschädigt ist.
   bei System.Windows.Forms.UnsafeNativeMethods.CoCreateInstance(Guid& clsid, Object punkOuter, Int32 context, Guid& iid)
   bei System.Windows.Forms.AxHost.CreateWithLicense(String license, Guid clsid)
   bei System.Windows.Forms.AxHost.CreateInstanceCore(Guid clsid)
   bei System.Windows.Forms.AxHost.CreateInstance()
   bei System.Windows.Forms.AxHost.GetOcxCreate()
   bei System.Windows.Forms.AxHost.TransitionUpTo(Int32 state)
   bei System.Windows.Forms.AxHost.CreateHandle()
   bei System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
   bei System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
   bei System.Windows.Forms.AxHost.EndInit()
   bei WindowsApp1.Form2.InitializeComponent() in D:\TestPdfCtl\Gen\Solution1\WindowsApp1\Form2.Designer.vb:Zeile 49.
   bei WindowsApp1.Form2..ctor()
   bei WindowsApp1.Form1.Button1_Click(Object sender, EventArgs e) in D:\TestPdfCtl\Gen\Solution1\WindowsApp1\Form1.vb:Zeile 3.
   bei System.Windows.Forms.Control.OnClick(EventArgs e)
   bei System.Windows.Forms.Button.OnClick(EventArgs e)
   bei System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
   bei System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   bei System.Windows.Forms.Control.WndProc(Message& m)
   bei System.Windows.Forms.ButtonBase.WndProc(Message& m)
   bei System.Windows.Forms.Button.WndProc(Message& m)
   bei System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
   bei System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
   bei System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
   bei System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
   bei System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
   bei Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun()
   bei Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.DoApplicationModel()
   bei Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run(String[] commandLine)
   bei WindowsApp1.My.MyApplication.Main(String[] Args) in :Zeile 81.
best regards,
edvschu
Sasha - Tracker Dev Team
User
Posts: 5522
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: AccessViolationException in simple WinForms app

Post by Sasha - Tracker Dev Team »

Hello edvschu,

Please give us a sample project and we will try to recreate it here.

Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
edvschu
User
Posts: 127
Joined: Fri Jun 25, 2010 6:54 am

Re: AccessViolationException in simple WinForms app

Post by edvschu »

Here is a sample project:
Attachments
Solution1.zip
(14.45 KiB) Downloaded 68 times
Sasha - Tracker Dev Team
User
Posts: 5522
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: AccessViolationException in simple WinForms app

Post by Sasha - Tracker Dev Team »

Please read this topic:
viewtopic.php?f=66&t=25161

Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
edvschu
User
Posts: 127
Joined: Fri Jun 25, 2010 6:54 am

Re: AccessViolationException in simple WinForms app

Post by edvschu »

Problem solved. Thank you.
User avatar
Tracker Supp-Stefan
Site Admin
Posts: 17906
Joined: Mon Jan 12, 2009 8:07 am
Location: London
Contact:

Re: AccessViolationException in simple WinForms app

Post by Tracker Supp-Stefan »

:D
Post Reply