RiskSrv

I have an application that used to work fine compiled with VC2003. Recently I re-compiled it with VC2005 and it started getting access violations.

Application has 2 dlls that and one of them creates instance of std::map which it than passes to the other dll. I can see contents of the map in the debugger after and it looks fine. However when that second library calls map::begin() result returned from that function looks completely bogus and not at all points to the first element (or any other element) in the map.

Can this be caused by different versions of STL used to compile each library

The map in question is only accessed by a single thread so it's unlikely to be some race condition.



Re: Visual C++ General Access violation after porting project to VC2005

Damien Watkins - MSFT

Hello

Re: Access violation after porting project to VC2005

So did you rebuild all the files after porting I am not sure what the part about ¡°different versions of the STL¡± means here

Thanks

Damien






Re: Visual C++ General Access violation after porting project to VC2005

TilakGopi

Can this be caused by different versions of STL used to compile each library

Do u mean that the dlls also need to be built again in VS2005 I too guess so,it may solve the problem(to be frank i don't much about compilation and all, but i just exposed my idea,that's it.Don't mind,if my idea is faulty.

Thanx,

Ch.T.Gopi Kumar.






Re: Visual C++ General Access violation after porting project to VC2005

Damien Watkins - MSFT

Hello

I would first recompile everything and see if your problem disappears.

Thanks

Damien






Re: Visual C++ General Access violation after porting project to VC2005

RiskSrv

I rebuilt all files after porting and before posting this message.

Turned out the issue was caused by a race condition that freed my stl datastructure from different thread. It was exposed by porting to 2005 but had to be fixed anyway.

Thanks for your helf and sorry for the false alarm.