Bug 471068

Summary: DataGridView. Crash when adding Row and listening for Rows.CollectionChanged
Product: [Mono] Mono: Class Libraries Reporter: Mario Carrion <mcarrion>
Component: Windows.FormsAssignee: Mono Bugs <mono-bugs>
Status: RESOLVED FIXED QA Contact: Mono Bugs <mono-bugs>
Severity: Normal    
Priority: P5 - None CC: forgotten_CRPsQFwJ3b
Version: SVN   
Target Milestone: ---   
Hardware: Other   
OS: Other   
Whiteboard:
Found By: Beta-Customer Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Bug Depends on:    
Bug Blocks: 468504    
Attachments: Example.
Mono output
Updated example.

Description Mario Carrion 2009-01-30 18:22:44 UTC
Created attachment 268988 [details]
Example.

1. Compile the attached file
2. Run
3. Click "Add row"
4. Crash.

Expected: No crash.

.NET output: "Row: Add/1"
Comment 1 Mario Carrion 2009-01-30 18:24:48 UTC
Created attachment 268990 [details]
Mono output
Comment 2 Mario Carrion 2009-01-30 19:46:57 UTC
Created attachment 269007 [details]
Updated example.

Ok, I've found the reason of the crash, seems that in Mono you need to explicitly add the cells before adding the row, in .NET this doesn't crash.
Comment 3 Mario Carrion 2009-01-30 19:49:50 UTC
Line 50 fixed the crash. BTW
Comment 4 Forgotten User CRPsQFwJ3b 2009-02-01 20:03:18 UTC
Fixed in trunk in r125277 and in 2.4 branch in r125278. Thanks for the bug report!