StackOverflowException

SyntaxEditor for Windows Forms Forum

Posted 16 years ago by meathook - Genesys Telecommunications
Avatar
I have been able to reproduce and partially isolate the StackOverflowException reported originally at <A HREF="http://www.actiprosoftware.com/cgi-bin/ubb/ultimatebb.cgi?ubb=get_topic&f=9&t=000396." TARGET=_blank>http://www.actiprosoftware.com/cgi-bin/ubb/ultimatebb.cgi?ubb=get_topic&f=9&t=000396.</A>

Using VS.NET 2003 and creating an application with a single form (and references to the Actipro controls), I placed the following code into the Load event handler:

' Declared at class scope
m_map = New Hashtable

Dim se As New ActiproSoftware.SyntaxEditor.SyntaxEditor
se.Text = "Some text"
se.Visible = True
se.Parent = Me

m_map(1) = se

se.Visible = False
se.Parent = Nothing
se = Nothing

If you run this application then essentially ignore it, about 3 hours later a StackOverflowException occurs. It seems the problem relates to controls that aren't bound to controls but still have a valid object reference, but I'm not sure (it takes a long time to test different variations).

Can you look into this and see if you can reproduce and identify the issue?

Thanks.

Comments (6)

Posted 16 years ago by meathook - Genesys Telecommunications
Avatar
The link should be <A HREF="http://www.actiprosoftware.com/cgi-bin/ubb/ultimatebb.cgi?ubb=get_topic&f=9&t=000396" TARGET=_blank>http://www.actiprosoftware.com/cgi-bin/ubb/ultimatebb.cgi?ubb=get_topic&f=9&t=000396</A> (the BBS added the period to the URL).
Posted 16 years ago by painetraine
Avatar
uh, I just got a StackOverflowException after the app idled for a while. Sounds like it relates to this post. Below is the call stack of the error

&gt; system.drawing.dll!System.Drawing.Region::GetHrgn(System.Drawing.Graphics g) + 0x72 bytes
system.windows.forms.dll!System.Windows.Forms.Control::GetHRgn(System.Drawing.Region region) + 0x1a bytes
system.windows.forms.dll!System.Windows.Forms.Control::Invalidate(System.Drawing.Region region, bool invalidateChildren) + 0x6d bytes
system.windows.forms.dll!System.Windows.Forms.Control::Invalidate(System.Drawing.Region region) + 0x8 bytes
actiprosoftware.winuicore.dll!ActiproSoftware.WinUICore.UIControl::AddToInvalidatedRegion(System.Drawing.Rectangle rect) + 0x71 bytes
actiprosoftware.winuicore.dll!ActiproSoftware.WinUICore.UIObject::Invalidate(System.Drawing.Rectangle rect) + 0x46 bytes
actiprosoftware.syntaxeditor.dll!ActiproSoftware.SyntaxEditor.EditorView::&#5121;(System.Object , System.EventArgs ) + 0xd8 bytes
actiprosoftware.syntaxeditor.dll!ActiproSoftware.SyntaxEditor.Caret::OnPaint(System.EventArgs e) + 0x15 bytes
actiprosoftware.syntaxeditor.dll!ActiproSoftware.SyntaxEditor.Caret::&#5123;(bool ) + 0x1a bytes
actiprosoftware.syntaxeditor.dll!ActiproSoftware.SyntaxEditor.Caret::&#5121;(System.Object , System.EventArgs ) + 0x28 bytes
system.windows.forms.dll!System.Windows.Forms.Timer::OnTick(System.EventArgs e) + 0x18 bytes
system.windows.forms.dll!System.Windows.Forms.Timer::Callback(__int32 hWnd, __int32 msg, __int32 idEvent, __int32 dwTime) + 0x1d bytes
system.windows.forms.dll!System.Windows.Forms.Application::ComponentManagerSystem.Windows.Forms.UnsafeNativeMethods+IMsoComponentManager.FPushMessageLoop(__int32 dwComponentID, __int32 reason, __int32 pvLoopData) + 0x390 bytes
system.windows.forms.dll!ThreadContext::RunMessageLoopInner(__int32 reason, System.Windows.Forms.ApplicationContext context) + 0x15f bytes
system.windows.forms.dll!ThreadContext::RunMessageLoop(__int32 reason, System.Windows.Forms.ApplicationContext context) + 0x45 bytes
system.windows.forms.dll!System.Windows.Forms.Application::Run(System.Windows.Forms.Form mainForm) + 0x34 bytes

Thanks
Posted 16 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Painetraine,

Does it only happen when the control has focus or doesn't have focus? Also, what version of VS.NET do you have? Did this happen at any time before the last several releases? The odd thing is that I don't think we changed anything in a while that would cause this.


Actipro Software Support

Posted 16 years ago by painetraine
Avatar
When it happened, I was running IE and the app with the editor was completely hidden. Kinda confused me since I got the exception block while I was reading something in IE.

I am using VS2003, .NET 1.1. I have seen it happen on WinXP and Win2000 boxes.

I have never gotten the error while using the app that has the control, it only seems to happen when I leave the machine and come back after some time or in this case was working in another app.

I have only noticed it happening since I switched to the 65 release. Before that, I cannot remember ever getting the problem.

Hope this helps.
Posted 16 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
I ran the sample application for several hours on both a .NET 1.0 box and a .NET 1.1 box and couldn't get this exception to occur.

After examining the code, I noticed that in a certain situation, the caret timer can be going even when the control doesn't have focus, which shouldn't happen. The next maintenance release will try to correct that. Once the next release comes out (probably this weekend), please post back after testing with it to see if that still happens since we're unable to dupe it here.


Actipro Software Support

Posted 16 years ago by meathook - Genesys Telecommunications
Avatar
I have run the small test from earlier in this thread for a little under 24 hours without any issue. It appears that the recent change has fixed the problem.

Thanks.
The latest build of this product (v2020.1 build 0400) was released 1 month ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.