It does not happen in the release build, since code is using ASSERT that has no meaning in the release build. ASSERT is a debug tool.
It may be a surprise to you but MFC does not use Windows modal dialog. Calling Create or DoModal creates windows modeless dialog.
MFC achieves modality by disabling a parent window (if any) and supplies dialog with own message handling loop similar to application message loop.
That is why tou have the same result regardless of using Create or DoModal.
Does it happen before dialog is even shown?
The error you show in your post indicates that somewhere in your app code you are trying to use an object that has not been instantiated and is NULL during dialog initialization. It seems like it fails IsKindOf check.
Would it be possible to zip your project and post it for us do debug it?