Strange debugger crash

madmark

20-12-2006 15:06:26

I don't know if this is a Mogre issue or a VS 2005 Pro SP1 issue...

I am getting a very weird crash in the debugger. After hitting a breakpoint after a RaySceneQuery with the sort by distance flag set, the debugger crashes when looking at the result handed back from RaySceneQuery::Execute().

It crashes if I use "Quickwatch", Hover over the name of the variable, or hit the "plus" for more info in the watch/locals window. (The nice little "send report to Microsoft" dialog says the app crashed, but it doesn't happen unless I try to view the value)

It seems to be fine if I do not sort for distance.

The app is written in C#, if that matters...

Bekas

20-12-2006 16:47:09

I couldn't reproduce it, can you post a small sample that has this problem ?

madmark

20-12-2006 19:49:47

I realize that I mis-spoke before, it isn't the sort, but putting a mask on the query.

Here is the snippet:

RaySceneQuery pQuery = sceneMgr.CreateRayQuery(mouseRay);
pQuery.SetSortByDistance(true);
// pQuery.QueryTypeMask = (uint)QueryFlagType.QUERY_FLAGS_PLACEABLE;

RaySceneQueryResult qResult = new RaySceneQueryResult();
qResult = pQuery.Execute();
if (qResult != null && !qResult.IsEmpty)
{
//do stuff
}



If I break on the final if and look at the value of qResult, BOOM.

Bekas

21-12-2006 01:16:49

It's a bug with the STL container wrappers. I didn't add checks for empty containers so if you try to access "Back" or "Front" property on an empty one (as the debugger is doing to evaluate the properties of the variable) there will be a crash.

Will be fixed soon.

madmark

21-12-2006 14:34:40

Hot diggity! I'm not crazy!

Thanks for checking into this. I feel much better.

som

18-08-2008 08:04:42

i was also facing the same problem..
after a thorough check what i found was the same u say..
it is a problem when i set some query flag.
now then how to use the query flags :?: :?: :?: :?: :?: :?: