The value of ESP was not properly saved across a function ca

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
ulao
Posts: 274
Joined: Fri Mar 28, 2008 2:13 am

The value of ESP was not properly saved across a function ca

Post by ulao »

I have this strange situation. I get this error "The value of ESP was not properly saved across a function call." when I run my application. I know this commonly points to dll's not matching libs and what not but that just can't be in this case. I had my application working ( irrlicth 1.7.2 ) with the irrODE physics wrapper ( 2009 ). I when a head and did a back up of my source and proceed updating the irrOde to (2011). After doing so I get this error.

I figured I would revert, well I only backed up my source not the libs and dlls. So I tried to find the old files and put them in place. I did a clean and build with again, the same error. I talked to brainsaw ( irrOde author ) and he has no idea. The debug crashes at the ODE initphysiscs function. So I'm guessing its not irrlicht. The irrODE is a static lib no dll. In order to use it I must include the ode_single.dll form the ODE engine but this file has not changed since 09.

At this point I have no idea what could have cause this and having nothing left to revert to. So I'm faced fighting it. The calling convention I use is the default ( __cdecl ). the irrOde lib is also built with this calling convention and I can only assume the ode_single is as well. So I don't think that is the issue. The static lib has no dll, so its not a miss match and the ode_single.dll is just an ODE reference for the wrapper that has never changed. So what left could this mean?


____________
small update
____________
I went a head and built my own new ODE_single.dll and the environment is in fact the same calling convention. My new dll did not fix anything.

Figured I'd also include some code.

This is the line I crash on

Code: Select all

void initPhys (){ CIrrOdeManager::getSharedInstance()->initPhysics();}
this is the lib function that gets called.

Code: Select all

 
void CIrrOdeManager::initPhysics() {
  m_iNodesInitialized=0;
  m_bPhysicsInitialized=false;
 
  list<CIrrOdeWorld *>::Iterator itw;
  for (itw=m_lWorlds.begin(); itw!=m_lWorlds.end(); itw++)
    (*itw)->initPhysics();
 
  core::list<irr::ode::IIrrOdeStepMotor *>::Iterator it;
  for (it=m_lStepMotors.begin(); it!=m_lStepMotors.end(); it++) (*it)->initPhysics();
 
  m_bPhysicsInitialized=true;
}
 
Call stack

Code: Select all

Metroid64.exe!irr::ode::CIrrOdeGeomBox::initPhysics()  + 0x158 bytes    
        Metroid64.exe!irr::ode::CIrrOdeBody::initPhysics()  + 0x4f7 bytes       
        Metroid64.exe!irr::ode::CIrrOdeWorld::initPhysics()  + 0x503 bytes      
        Metroid64.exe!irr::ode::CIrrOdeManager::initPhysics()  + 0xb0 bytes     
>       Metroid64.exe!CPhysManager::initPhys()  Line 26 + 0x2f bytes    C++
        Metroid64.exe!CGamePlayState::loadMap(CGameManager * pManager=0x0012fcec, const char * map=0x005a6a50, irr::core::vector3d<float> mapPosition={...}, irr::core::vector3d<float> camPosition={...})  Line 227    C++
        Metroid64.exe!CGamePlayState::loadMap(CGameManager * pManager=0x0012fcec, const char * map=0x005a6a50)  Line 117        C++
        Metroid64.exe!CGameStateLevel01::Init(CGameManager * pManager=0x0012fcec)  Line 60      C++
        Metroid64.exe!CGameManager::ChangeState(CGameState * pState=0x005db8f8)  Line 88 + 0x18 bytes   C++
        Metroid64.exe!CGameState::ChangeState(CGameManager * pManager=0x0012fcec, CGameState * pState=0x005db8f8)  Line 51      C++
        Metroid64.exe!CGameStateLoad01::Update(CGameManager * pManager=0x0012fcec)  Line 70     C++
        Metroid64.exe!CGameManager::Update()  Line 101 + 0x19 bytes     C++
        Metroid64.exe!CGame::run()  Line 27     C++
        Metroid64.exe!main()  Line 24   C++
        Metroid64.exe!__tmainCRTStartup()  Line 582 + 0x19 bytes        C
        Metroid64.exe!mainCRTStartup()  Line 399        C
        kernel32.dll!7c816fd7()         
        [Frames below may be incorrect and/or missing, no symbols loaded for kernel32.dll]      
        Metroid64.exe!irr::ode::CIrrOdeDevice::CIrrOdeDevice()  + 0xf7 bytes    
        cccccccc()      
REDDemon
Developer
Posts: 1044
Joined: Tue Aug 31, 2010 8:06 pm
Location: Genova (Italy)

Re: The value of ESP was not properly saved across a functio

Post by REDDemon »

already tried a complete recompile of all the libraries? I got blue screens in past for an out-to date dll. In this cases is much help using a single compile target for all your libraries (so that you are sure that everything is correctly compiled with 1 click.. I also had problems with my IDE wich was not compiling some new files and I had to clean from object files and recompile everything from 0).
Junior Irrlicht Developer.
Real value in social networks is not about "increasing" number of followers, but about getting in touch with Amazing people.
- by Me
ulao
Posts: 274
Joined: Fri Mar 28, 2008 2:13 am

Re: The value of ESP was not properly saved across a functio

Post by ulao »

yeah I recompiled from ODE to Irrlicht. This one is continuously beating me. I'm pretty sure its the irrOde wrapper at this point.
bitplane
Admin
Posts: 3204
Joined: Mon Mar 28, 2005 3:45 am
Location: England
Contact:

Re: The value of ESP was not properly saved across a functio

Post by bitplane »

You'll see problems like this if your includes, libs and dlls don't match up. You probably have an old DLL knocking around in your search path
Submit bugs/patches to the tracker!
Need help right now? Visit the chat room
ulao
Posts: 274
Joined: Fri Mar 28, 2008 2:13 am

Re: The value of ESP was not properly saved across a functio

Post by ulao »

was dirty source file I guess. The author re-uploaded the source and I did a rebuild on the lib. Now it works.
Post Reply