Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » Community » Newbie corner » GridCtrl out-of-bound crash with test case
GridCtrl out-of-bound crash with test case [message #32629] Sun, 29 May 2011 20:17 Go to next message
bushman is currently offline  bushman
Messages: 134
Registered: February 2009
Experienced Member
Running the following code causes GridCtrl to crash:

ASSERT FAILED: Assertion failed in c:\upp\uppsrc\core\Vcont.h, line 33
i >= 0 && i < items


class Ma_app : public TopWindow {
	
	public:
	Ma_app() {

		Zoomable().Sizeable();
				
		for(int col = 0; col < 10; col++) {
			grid.AddColumn(Format("col %d", col));
			for(int row = 0; row < 10; row++) {
				grid.Set(row, col , "x");
			}
		}
		
      //VVVVVVVVVVV HERE COMES THE FAULT LINE VVVVVVVVVVVVV
		grid.SelectRow(false).RowChanging(false);
		
		Add(grid.SizePos());
	}
	
	GridCtrl grid;
};

GUI_APP_MAIN
{
	Ma_app().Run();
}



Pressing Ctrl + LMB on a cell, just like when you do a Ctrl-selection, or anywhere in the grid, will trigger the exception.

What is GridCtrl::RowChanging(bool) for?
The crash happens when both GridCtrl::SelectRow and GridCtrl::RowChanging methods are combined.
Why? (bug?)

tks!

[Updated on: Sun, 29 May 2011 21:00]

Report message to a moderator

Re: GridCtrl out-of-bound crash with test case [message #32652 is a reply to message #32629] Tue, 31 May 2011 14:17 Go to previous messageGo to next message
unodgs is currently offline  unodgs
Messages: 1366
Registered: November 2005
Location: Poland
Ultimate Contributor

Thanks!. It's fixed now and it will be commited today evening. RowChanging(false) simply doesn't allow to change row in grid (it is another kind of read-only grid, you cannot click on cell/row but grid is not grayed out)
Re: GridCtrl out-of-bound crash with test case [message #32654 is a reply to message #32652] Tue, 31 May 2011 17:02 Go to previous message
bushman is currently offline  bushman
Messages: 134
Registered: February 2009
Experienced Member
Thanks for the patch and for the explanation!

Thank you also for promptly answering to my other post "GridCtrl help needed [message #32650]" in this very same section (newbie)!

IŽll be waiting for the patch.

Congratulations for your extremely versatile GridCtrl project!

Previous Topic: GridCtrl help needed
Next Topic: reading & writing a file
Goto Forum:
  


Current Time: Fri Mar 29 10:05:38 CET 2024

Total time taken to generate the page: 0.01675 seconds