Remove AABB Asserts for Min <= Max

What it says on the tin: a place to discuss proposed new features.
exe_cutable
Gnoblar
Posts: 4
Joined: Thu Aug 05, 2010 5:00 pm

Re: Remove AABB Asserts for Min <= Max

Post by exe_cutable » Wed Nov 24, 2010 5:57 pm

Hi all,

I understand that this assert is important. But shouldn't this code throw an exception if the OGRE_ASSERT_MODE is set for assert to do so?

I rebuilt Ogre with OGRE_ASSERT_MODE 2 and I still get this assert... Is this assert special or something?
0 x

User avatar
Klaim
Old One
Posts: 2565
Joined: Sun Sep 11, 2005 1:04 am
Location: Paris, France
Contact:

Re: Remove AABB Asserts for Min <= Max

Post by Klaim » Thu Nov 25, 2010 12:03 am

I guess it's only because it's old code.
0 x

Jinx
Gnoblar
Posts: 5
Joined: Tue Jun 04, 2013 5:17 pm

Re: Remove AABB Asserts for Min <= Max

Post by Jinx » Fri Dec 06, 2013 12:29 am

I know this is an old discussion, but just in case it helps out anyone else searching for a solution to the AABB problem, like I was, then I'll post details of my experience.

The debug build of my Windows application was running just fine most of the time, except for an occasional, intermittent heap assertion. To try and track the cause of this heap problem down, I decided to try using Microsoft's application verifier tool. As far as I can tell, this app-verifier tool is simply a GUI for adding a registry entry that tells Windows to enable certain debugging and verification options when your executable is started up. So I configured the verification options for my executable using the app-verifier and then debugged my application using VS 2012. The problem was immediately flagged up as being caused by multiple threads manipulating a heap at the same time, which I tracked down to a bit of faulty logic in one of my custom memory allocators that wasn't setting the HEAP_NO_SERIALISE flag correctly. I fixed this with a single one-line change, re-ran under the debugger, and all was fine. Satisfied that I had solved the problem I removed my application from the list in app-verifier. Just to double check, I re-ran my app under the debugger (with no app-verification this time, or so I thought) and suddenly this AABB assertion cropped up. I hadn't changed anything Ogre related, and I'd never seen this assertion before, so I was a bit mystified as to why it was suddenly occurring.

On a hunch I trawled through my Windows registry and found that an empty key with the name of my executable under the registry key HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options. I deleted this empty key, re-ran my application, and now it worked fine. As a quick test, I tried adding this empty key back again (using regedit, rather than app-verifier), re-ran my application, and the assertion appeared. I've tried adding and removing this key a few times now, getting consistent results each time, so this behaviour is definitely related to this particular key in the registry.

It seems to me that when you remove your application from the list of executable to be verified in the app-verifier tool, then the registry key created when you initially added your executable to the list of those to be verified is not being removed. Only values below this key (which hold the actual verification options you selected) are being deleted. This remaining empty key seems to cause Windows to use some default verification settings for the executable. Presumably these defaults include enabling some weird floating point mode that affects calculations in Ogre, causing the AABB error.

So if you're running on Windows and having problems with that assertion, and you've run app-verifier for your app at any time in the past, it may be worth checking the registry key mentioned above and removing any sub-keys with the same name as your executable.
0 x

User avatar
Klaim
Old One
Posts: 2565
Joined: Sun Sep 11, 2005 1:04 am
Location: Paris, France
Contact:

Re: Remove AABB Asserts for Min <= Max

Post by Klaim » Fri Dec 06, 2013 12:47 am

Wow that's important information. :shock:
0 x

Post Reply