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 » U++ Library support » U++ Widgets - General questions or Mixed problems » Strange behavior of Point in watches
Strange behavior of Point in watches [message #22890] Tue, 25 August 2009 09:42 Go to previous message
dolik.rce is currently offline  dolik.rce
Messages: 1789
Registered: August 2008
Location: Czech Republic
Ultimate Contributor

Hello,
I've encountered strange problem while debugging my code... Here is simplest possible testcase:
#include <CtrlLib/CtrlLib.h>
using namespace Upp;

class win : public TopWindow{
public:
	typedef win CLASSNAME;
	virtual void LeftDown(Point p,dword flags){
		DUMP(p);
	}
};

GUI_APP_MAIN{
	win().Run();
}

I setup breakpoint in LeftDown() and run in debug mode. When the execution stops at the breakpoint, opening Quick watch window and entering "p" yields:
{
  <Upp::Moveable<Upp::Point_<int>, Upp::EmptyClass>> = {
    <Upp::EmptyClass> = {<No data fields>}, <No data fields>}, 
  members of Upp::Point_<int>: 
  x = -1078378568, 
  y = 8388608
}

Same values are shown if I add watch in the bottom panel of theide. But the most interesting (or puzzling) thing is, that the output in log file is correct, i.e. something like "p = [59, 138]".

At first, I thought that it is a problem in watches, but for something like "Point P(10,20);" watches show correct result. It can be very confusing, I was looking for bug almost an hour on absolutely wrong place, because of this...

Just in case this is compiler/platform specific: I use gcc 4.3 on ubuntu.

Regards,
Honza

PS: I'm not sure if this belongs here. If not, feel free to move this topic to some better place.
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: tutorial Gui20c's defect
Next Topic: DropList + AddSeparator + mouse wheel problem
Goto Forum:
  


Current Time: Tue Apr 23 18:53:16 CEST 2024

Total time taken to generate the page: 0.02217 seconds