Run error - debug assertion failed!

Get technical support about the C++ source code and about Lua scripts for maps, entities, GUIs, the console, materials, etc. Also covered are the Cafu libraries and APIs, as well as compiling, linking, and the build system.
Post Reply
drwbns
Posts:31
Joined:2011-03-17, 23:57
Run error - debug assertion failed!

Post by drwbns » 2011-03-18, 00:06

File : f:\dd\vctools\crt_bld\self_x86\crt\src\dbgdel.cpp
Line: 52

Expression: _BLOCK_TYPE_IS_INVALID(pHead->nBlockUse)


I compiled ok when I modified the sconstruct script to not use /WX for compiling and now this error when running cafu.exe. Then this next error if I ignore the first error:

File: f:\dd\vctools\crt_bld\self_x86\crt\src\dbgheap.c
Line: 1322

Expression: _CrtIsValidHeapPointer(pUserData)

And then a very similar to the first error if I ignore again but a different file. Then one more ignore and crash. Any ideas?
User avatar
Carsten
Site Admin
Posts:2170
Joined:2004-08-19, 13:46
Location:Germany
Contact:

Re: Run error - debug assertion failed!

Post by Carsten » 2011-03-18, 11:38

Hi,
welcome to the Cafu forums! :welcome:
  • Which compiler do you use?
  • Which OS? 32 bit or 64 bit?
  • Which version of Cafu do you use (svn? r210?)
  • Why did you remove /WX ?
  • When and where do these errors occur? (e.g. right after program start, when loading a map, ...)
Best regards,
Carsten
drwbns
Posts:31
Joined:2011-03-17, 23:57

Re: Run error - debug assertion failed!

Post by drwbns » 2011-03-18, 21:17

Ok, Hi! Thanks for the welcome!

32-bit win xp sp3
r210
I took out the/WX because it stopped compilation.
vstudio 10.0 (non-express) vc10.0
error occurs right at start of program
User avatar
Carsten
Site Admin
Posts:2170
Joined:2004-08-19, 13:46
Location:Germany
Contact:

Re: Run error - debug assertion failed!

Post by Carsten » 2011-03-18, 23:34

Ok, thanks for providing the info.
drwbns wrote:I took out the/WX because it stopped compilation.
Can you please provide the related details?

All Cafu code is written to compile with no warnings. The fact that you get one seems to indicate that something is wrong, which in turn might be the cause of the problems at runtime.
Best regards,
Carsten
drwbns
Posts:31
Joined:2011-03-17, 23:57

Re: Run error - debug assertion failed!

Post by drwbns » 2011-03-19, 07:41

Ok, for r210 I'll rebuild with /WX and get back to you. since then, I've tried to build the new dev trunk release and got this error, maybe you can help with that too.

Loader_fbx.cpp(742) error C2511 : LoaderFbxT::LoaderFbxT(const std::string &) : overloaded member function not found in 'LoaderFbxT'
drwbns
Posts:31
Joined:2011-03-17, 23:57

Re: Run error - debug assertion failed!

Post by drwbns » 2011-03-19, 08:05

The error for r210 is in vc\include\xstring on line 1448. Error is c2220 warning treated as error. No object file generated.
xtring(1448)Warning c4715: 'std::basic_string<char,std::char_traits<char>,std::allocator<char> > ::operator[]' not all control paths return a value
drwbns
Posts:31
Joined:2011-03-17, 23:57

Re: Run error - debug assertion failed!

Post by drwbns » 2011-03-20, 21:21

Sorry, I think I modified the xstring file for a different project that was producing compile errors. I'm verifying it now. Thanks for the help so far.
drwbns
Posts:31
Joined:2011-03-17, 23:57

Re: Run error - debug assertion failed!

Post by drwbns » 2011-03-20, 22:35

I think scons isn't building any renderer dll or sound dll like the binary release of cafu has. Did I miss something in the setup, or is that normal that scons doesn't build them? What should I do?
drwbns
Posts:31
Joined:2011-03-17, 23:57

Re: Run error - debug assertion failed!

Post by drwbns » 2011-03-20, 22:38

Here's my log after copying the renderer dlls from the r240 binary release.

Cafu Engine, Mar 20 2011
cannot open config.lua: No such file or directory
Warning: Failed to open ZIP archive Games/DeathMatch/Textures/TechDemo.zip
Warning: Failed to open ZIP archive Games/DeathMatch/Textures/SkyDomes.zip

Scanning cwd for all available renderers...
./RendererARBprogs.dll ... SUCCESS - first supported renderer (Pref# 2200).
./RendererCgARB1.dll ... SUCCESS - but no higher preference (Pref# 2100).
./RendererCgNV2X.dll ... FAILED - renderer says it's not supported.
./RendererNull.dll ... SUCCESS - but excluded from auto-selection (Pref# 1).
./RendererOpenGL12.dll ... SUCCESS - but no higher preference (Pref# 1000).
Reloading previously auto-selected renderer ./RendererARBprogs.dll ...

Scanning cwd for all available sound systems...
./SoundSysFMOD3.dll ... SUCCESS - first supported sound system (Pref# 1000).
./SoundSysNull.dll ... SUCCESS - but excluded from auto-selection (Pref# 1).
./SoundSysOpenAL.dll ... SUCCESS - higher preference sound system (Pref# 1500).
Reloading previously auto-selected sound system ./SoundSysOpenAL.dll ...


and then a crash at startup. "an error has occurent in cafu.exe and needs to close"

What now?
User avatar
Carsten
Site Admin
Posts:2170
Joined:2004-08-19, 13:46
Location:Germany
Contact:

Re: Run error - debug assertion failed!

Post by Carsten » 2011-03-21, 00:51

Hi drwbns,

please don't copy renderers from one release to the next. It can work, but it might introduce problems that are hard to diagnose as well.

About the svn trunk, I'm sorry, the head revision was indeed broken at the time you initially checked out -- I've fixed them now, please run svn update and re-start SCons.

As you said, the problem with r210 seemed to be related to your MS SDK header files -- if you revert them to vendor version, this should work as well. (Scons might not properly recognize changes in the system headers (MS SDK) properly though, and thus possibly not automatically rebuild files that need to be rebuild. If in doubt, to be sure, please restart from scratch.)

SCons does build the renderers by default, so in summary, you should now be able to build both r210 as well as svn head as documented. :up:
Best regards,
Carsten
drwbns
Posts:31
Joined:2011-03-17, 23:57

Re: Run error - debug assertion failed!

Post by drwbns » 2011-03-21, 07:35

Hey, thanks for the reply! I indeed got scons to run properly without warnings or errors after reverting my edited MS xstring file (oops!) but then I reran scons and it finished building r210 but it didn't build the dlls (renderer, sound, etc). That's when I had tried to put the r240 dlls with it and then ended with the crash. So, anyways. I've now deleted everything but the r240 binary release and I'm going to try a fresh rebuild of both versions. I'm checking out the latest revision as I type and I'll get back to you with the build results. Thanks for the support!
drwbns
Posts:31
Joined:2011-03-17, 23:57

Re: Run error - debug assertion failed!

Post by drwbns » 2011-03-21, 07:47

drwbns wrote:Ok, for r210 I'll rebuild with /WX and get back to you. since then, I've tried to build the new dev trunk release and got this error, maybe you can help with that too.

Loader_fbx.cpp(742) error C2511 : LoaderFbxT::LoaderFbxT(const std::string &) : overloaded member function not found in 'LoaderFbxT'
No joy, I'm still getting the above error for latest trunk revision 283. I'm going to try the stable release again and post here.

Picture of error:
http://img198.imageshack.us/img198/5192/62803331.jpg
drwbns
Posts:31
Joined:2011-03-17, 23:57

Re: Run error - debug assertion failed!

Post by drwbns » 2011-03-21, 10:07

Ok, so the dll files do indeed build (or get copied, e.g. OpenAL32, wrap_oal.dll, cg.dll, cgGL.dll). The copying of files was confusing me because they're modified dates are in the past. I also had to copy the cafu.exe to the top level folder(the one with the dlls) in order for it to start without complaining about the renderer not being found and such(dll files). Is it normal that I had to manually copy it to the correct directory? (It wasn't mentioned as a step from what I remember from the getting started guide, right?if not, maybe it should be added to it, or even a build step for scons to do after compiling).I then had to extract textures and worlds.zip to their respective directories and all is well for r210!

Although I have a few questions... is physics implemented in r210? I don't notice any physics while playing.And why are my FPS so low? (25fps) Is this normal? I also couldn't change the video mode for some reason. I hit apply and nothing happens. Also, what's the changelog from 210 to the current dev version? Any major differences?
User avatar
Carsten
Site Admin
Posts:2170
Joined:2004-08-19, 13:46
Location:Germany
Contact:

Re: Run error - debug assertion failed!

Post by Carsten » 2011-03-21, 19:27

drwbns wrote:I'm still getting the above error for latest trunk revision 283.
Please double-check your working copy -- the code mentioned in the error message is not contained in r283 (or later) any more, so I guess that something didn't update properly.
drwbns wrote:I also had to copy the cafu.exe to the top level folder(the one with the dlls) in order for it to start without complaining about the renderer not being found and such(dll files). Is it normal that I had to manually copy it to the correct directory? (It wasn't mentioned as a step from what I remember from the getting started guide, right?if not, maybe it should be added to it, or even a build step for scons to do after compiling).
Please see http://www.cafu.de/wiki/cppdev:gettings ... w_programs ;-)
I then had to extract textures and worlds.zip to their respective directories and all is well for r210!
Ok, thanks for letting me know.
Although I have a few questions... is physics implemented in r210? I don't notice any physics while playing.
In limited form, yes. Please see the crate example in map Kidney.
And why are my FPS so low? (25fps) Is this normal?
Depending on the details of your system hardware, yes.
Also see http://www.cafu.de/wiki/general:faqs_us ... improve_it for additional information.
I also couldn't change the video mode for some reason. I hit apply and nothing happens.
The new video mode is activated on program restart.
Also, what's the changelog from 210 to the current dev version? Any major differences?
Please see http://trac.cafu.de/timeline and/or http://trac.cafu.de/log/cafu/trunk
Best regards,
Carsten
drwbns
Posts:31
Joined:2011-03-17, 23:57

Re: Run error - debug assertion failed!

Post by drwbns » 2011-03-21, 20:54

It looks like 283 is now building correctly.(fbx loader problem in a previous release- I think SDK was missing). I see you've updated again. Thanks for all your well documented install guides and the questions you answered!
Post Reply

Who is online

Users browsing this forum: No registered users and 19 guests