[Mono-bugs] [Bug 536036] New: segfault / stack corruption when embedding a Winforms ToolStrip inside a UserControl

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Tue Sep 1 14:11:44 EDT 2009


http://bugzilla.novell.com/show_bug.cgi?id=536036


           Summary: segfault / stack corruption when embedding a Winforms
                    ToolStrip inside a UserControl
    Classification: Mono
           Product: Mono: Class Libraries
           Version: SVN
          Platform: i686
        OS/Version: Ubuntu
            Status: NEW
          Severity: Critical
          Priority: P5 - None
         Component: Windows.Forms
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: tom_hindle at sil.org
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---


Created an attachment (id=316232)
 --> (http://bugzilla.novell.com/attachment.cgi?id=316232)
Testcase for recreating seg fault

User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.13)
Gecko/2009080315 Ubuntu/9.04 (jaunty) Firefox/3.0.13

Please note to recreate this one needs to run with gdb or valgrind.

Attaching test program showing issue.

Output when running with gdb

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0xb6cf0b90 (LWP 4410)]
0xb5a2567b in ?? ()
(gdb) mono_backtrace 30


#0 0xb5a2567b in  System.Windows.Forms.ToolStripOverflow:SetDisplayedItems () +
0x10b (0xb5a25570 0xb5a259b0) [0x25e70 - TestToolStripAggrigation.exe]
#1 0xb5a24c64 in  System.Windows.Forms.ToolStripOverflow:OnLayout
(System.Windows.Forms.LayoutEventArgs) + 0x1cc (0xb5a24a98 0xb5a25555) [0x25e70
- TestToolStripAggrigation.exe]
#2 0xb606761c in  System.Windows.Forms.Control:PerformLayout
(System.Windows.Forms.Control,string) + 0x204 (0xb6067418 0xb606775c) [0x25e70
- TestToolStripAggrigation.exe]
#3 0xb5a3cb05 in  System.Windows.Forms.Control:PerformLayout () + 0x15
(0xb5a3caf0 0xb5a3cb0a) [0x25e70 - TestToolStripAggrigation.exe]
#4 0xb5a3f49c in  (wrapper remoting-invoke-with-check)
System.Windows.Forms.Control:PerformLayout () + 0x54 (0xb5a3f448 0xb5a3f4a5)
[0x25e70 - TestToolStripAggrigation.exe]
#5 0xb5a2433f in  System.Windows.Forms.ToolStripItemCollection:Clear () + 0x37
(0xb5a24308 0xb5a24374) [0x25e70 - TestToolStripAggrigation.exe]
#6 0xb5a2561e in  System.Windows.Forms.ToolStripOverflow:SetDisplayedItems () +
0xae (0xb5a25570 0xb5a259b0) [0x25e70 - TestToolStripAggrigation.exe]
#7 0xb5a242c7 in  System.Windows.Forms.ToolStrip:SetDisplayedItems () + 0x2c7
(0xb5a24000 0xb5a242e1) [0x25e70 - TestToolStripAggrigation.exe]
#8 0xb5a3fb90 in  System.Windows.Forms.ToolStrip:OnLayout
(System.Windows.Forms.LayoutEventArgs) + 0x28 (0xb5a3fb68 0xb5a3fbbc) [0x25e70
- TestToolStripAggrigation.exe]
#9 0xb606761c in  System.Windows.Forms.Control:PerformLayout
(System.Windows.For---Type <return> to continue, or q <return> to quit---
ms.Control,string) + 0x204 (0xb6067418 0xb606775c) [0x25e70 -
TestToolStripAggrigation.exe]
#10 0xb5a3cb05 in  System.Windows.Forms.Control:PerformLayout () + 0x15
(0xb5a3caf0 0xb5a3cb0a) [0x25e70 - TestToolStripAggrigation.exe]
#11 0xb5a3f49c in  (wrapper remoting-invoke-with-check)
System.Windows.Forms.Control:PerformLayout () + 0x54 (0xb5a3f448 0xb5a3f4a5)
[0x25e70 - TestToolStripAggrigation.exe]
#12 0xb5a3f3a7 in  System.Windows.Forms.ToolStripItem:OnParentChanged
(System.Windows.Forms.ToolStrip,System.Windows.Forms.ToolStrip) + 0x10f
(0xb5a3f298 0xb5a3f3c4) [0x25e70 - TestToolStripAggrigation.exe]
#13 0xb5a3f28f in  System.Windows.Forms.ToolStripItem:set_Parent
(System.Windows.Forms.ToolStrip) + 0x2f (0xb5a3f260 0xb5a3f298) [0x25e70 -
TestToolStripAggrigation.exe]
#14 0xb5a15ef8 in  (wrapper remoting-invoke-with-check)
System.Windows.Forms.ToolStripItem:set_Parent (System.Windows.Forms.ToolStrip)
+ 0x58 (0xb5a15ea0 0xb5a15f02) [0x25e70 - TestToolStripAggrigation.exe]
#15 0xb5a15a33 in  System.Windows.Forms.ToolStripItemCollection:Remove
(System.Windows.Forms.ToolStripItem) + 0x5b (0xb5a159d8 0xb5a15ac8) [0x25e70 -
TestToolStripAggrigation.exe]
#16 0xb5a159ae in  System.Windows.Forms.ToolStripItem:Dispose (bool) + 0x66
(0xb5a15948 0xb5a159c8) [0x25e70 - TestToolStripAggrigation.exe]
#17 0xb5a15881 in  System.Windows.Forms.ToolStripDropDownItem:Dispose (bool) +
0x3a1 (0xb5a154e0 0xb5a158a2) [0x25e70 - TestToolStripAggrigation.exe]
---Type <return> to continue, or q <return> to quit---
#18 0xb5a14ad9 in  System.ComponentModel.Component:Finalize () + 0x19
(0xb5a14ac0 0xb5a14af2) [0x25e70 - TestToolStripAggrigation.exe]
#19 0xb5a268a6 in  (wrapper runtime-invoke)
object:runtime_invoke_virtual_void__this__ (object,intptr,intptr,intptr) + 0x46
(0xb5a26860 0xb5a268f5) [0x25e70 - TestToolStripAggrigation.exe]


output when runniging with valgrind:
==4269== 
==4269== Thread 4:
==4269== Invalid read of size 4
==4269==    at 0x755867B: ???
==4269==    by 0x7557C63: ???
==4269==    by 0x6F2B61B: ???
==4269==    by 0x754FB04: ???
==4269==    by 0x755249B: ???
==4269==    by 0x755733E: ???
==4269==    by 0x755861D: ???
==4269==    by 0x75572C6: ???
==4269==    by 0x7552B8F: ???
==4269==    by 0x6F2B61B: ???
==4269==    by 0x754FB04: ???
==4269==    by 0x755249B: ???
==4269==  Address 0x0 is not stack'd, malloc'd or (recently) free'd
==4269== Thread 4 return signal frame corrupted.  Killing process.
==4269== 
==4269== Process terminating with default action of signal 11 (SIGSEGV)
==4269==  General Protection Fault

Reproducible: Always

Steps to Reproduce:
1. gdb /usr/local/bin/mono
2. r TestToolStripAggrigation.exe 
Or
3. valgrind /usr/local/bin/mono TestToolStripAggrigation.exe
Actual Results:  
seg fault 

Expected Results:  
no seg fault

I will continue looking into this to see if I can narrow this problem down
further.

-- 
Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the mono-bugs mailing list