Click here to Skip to main content
15,899,679 members
Home / Discussions / ATL / WTL / STL
   

ATL / WTL / STL

 
QuestionTAPI Sample Pin
Rocky Marrone11-Aug-06 2:39
Rocky Marrone11-Aug-06 2:39 
AnswerRe: TAPI Sample Pin
Eytukan11-Aug-06 5:20
Eytukan11-Aug-06 5:20 
QuestionATL events in web page. Pin
Eytukan11-Aug-06 0:53
Eytukan11-Aug-06 0:53 
AnswerRe: ATL events in web page. Pin
Michael Dunn11-Aug-06 17:54
sitebuilderMichael Dunn11-Aug-06 17:54 
GeneralRe: ATL events in web page. Pin
Eytukan15-Aug-06 6:39
Eytukan15-Aug-06 6:39 
QuestionTAPI Problem ??????? Pin
Rocky Marrone10-Aug-06 1:37
Rocky Marrone10-Aug-06 1:37 
AnswerRe: TAPI Problem ??????? Pin
Eytukan10-Aug-06 21:18
Eytukan10-Aug-06 21:18 
QuestionDestroying map cause exception [modified] Pin
mr_tawan8-Aug-06 23:51
mr_tawan8-Aug-06 23:51 
Hello,

I'm developing a casual game using DirectX. In the game there is class called "CEnergyBall" which contains several animations(in fact, it is 407 altogather) according to its state. I've used the map to managed the animation here.

below is the code snippet :

...
map<AnimationKey,CAnimation> CEnergyBall::s_aBallAnimation;
...


bool operator<(const AnimationKey& a,const AnimationKey& b)
{
	if(a.type<b.type)
		return true;
	if(a.type>b.type)
		return false;
	
	if(a.oldState<b.oldState)
		return true;
	if(a.oldState>b.oldState)
		return false;


	if(a.newState<b.newState)
		return true;
	
	return false;
}


struct AnimationKey
{
	ENERGYBALL_TYPE type;
	DWORD oldState;
	DWORD newState;

	friend bool operator<(const AnimationKey& a,const AnimationKey&);
	AnimationKey(ENERGYBALL_TYPE type, 	DWORD newState, DWORD oldState)
	{
		this->type = type;
		this->newState = newState;
		this->oldState = oldState;
	}
};


This work fine, everything is run smoothly. But when the application is closed (and the object is destroying) the exception is rised :

Unhandled exception at 0x7c901230 in Pick'n Pile.exe: User breakpoint.

Below is stack trace :
 	ntdll.dll!7c901230() 	
 	d3d9d.dll!0103e3ff() 	
 	d3d9d.dll!0103e579() 	
 	d3d9d.dll!0103e581() 	
 	d3d9d.dll!0103db0d() 	
 	ntdll.dll!7c91056d() 	
 	oleaut32.dll!77121b3d() 	
 	oleaut32.dll!77121b26() 	
 	ntdll.dll!7c926abe() 	
 	ntdll.dll!7c9268ad() 	
 	ntdll.dll!7c91056d() 	
 	ntdll.dll!7c914652() 	
 	ntdll.dll!7c910970() 	
 	ntdll.dll!7c90fb71() 	
 	ntdll.dll!7c91056d() 	
 	ntdll.dll!7c911962() 	
 	ntdll.dll!7c911993() 	
 	ntdll.dll!7c911970() 	
 	kernel32.dll!7c814b84() 	
 	ntdll.dll!7c911970() 	
 	ntdll.dll!7c911902() 	
 	ntdll.dll!7c91056d() 	
 	msvcrt.dll!77c2c2de() 	
 	msvcrt.dll!77c2c2e3() 	
 	ntdll.dll!7c911902() 	
 	crypt32.dll!77aa4469() 	
 	d3d9d.dll!010fdbc0() 	
 	ntdll.dll!7c9011a7() 	
 	ntdll.dll!7c923f31() 	
 	ntdll.dll!7c910945() 	
 	ntdll.dll!7c91094e() 	
 	ntdll.dll!7c915b4f() 	
 	kernel32.dll!7c81c9ae() 	
 	ntdll.dll!7c915b4f() 	
 	Pick'n Pile.exe!std::map<AnimationKey,CAnimation,std::less<AnimationKey>,std::allocator<std::pair<AnimationKey const ,CAnimation> > >::~map<AnimationKey,CAnimation,std::less<AnimationKey>,std::allocator<std::pair<AnimationKey const ,CAnimation> > >()  + 0x3b	C++
>	Pick'n Pile.exe!doexit(int code=0, int quick=0, int retcaller=0)  Line 414 + 0x9	C
 	Pick'n Pile.exe!exit(int code=0)  Line 303 + 0xd	C
 	Pick'n Pile.exe!WinMainCRTStartup()  Line 267	C
 	kernel32.dll!7c816f97() 	
 	ntdll.dll!7c915b4f() 	


Since there is only s_aBallAnimation declared as map<AnimationKey,CAnimation>, I supect that it caused the exception, but I don't know why it is rised.

I'm using Visual Studio .Net 2003 (which is VC7.1) along with DirectX SDK (June 2006).

Thank you,
Wutipong
NewsRe: Destroying map cause exception Pin
Anonymuos11-Aug-06 8:32
Anonymuos11-Aug-06 8:32 
AnswerRe: Destroying map cause exception Pin
Zac Howland11-Aug-06 8:43
Zac Howland11-Aug-06 8:43 
QuestionMS WORD Dictionary for Web Page???????? Pin
MANOJ BATRA8-Aug-06 19:21
MANOJ BATRA8-Aug-06 19:21 
QuestionDestructors in STL? Pin
sawerr8-Aug-06 19:19
sawerr8-Aug-06 19:19 
AnswerRe: Destructors in STL? Pin
Christian Graus8-Aug-06 19:53
protectorChristian Graus8-Aug-06 19:53 
GeneralRe: Destructors in STL? Pin
Anonymuos11-Aug-06 8:37
Anonymuos11-Aug-06 8:37 
AnswerRe: Destructors in STL? Pin
sunit510-Aug-06 22:52
sunit510-Aug-06 22:52 
GeneralRe: Destructors in STL? [modified] Pin
George L. Jackson11-Aug-06 18:01
George L. Jackson11-Aug-06 18:01 
AnswerRe: Destructors in STL? Pin
dfields32617-Aug-06 10:24
dfields32617-Aug-06 10:24 
Answerstd::auto_ptr in containers [modified] Pin
George L. Jackson17-Aug-06 11:47
George L. Jackson17-Aug-06 11:47 
GeneralCode Using boost::shared_ptr Pin
George L. Jackson17-Aug-06 12:07
George L. Jackson17-Aug-06 12:07 
GeneralRe: Destructors in STL? Pin
Zac Howland25-Aug-06 8:59
Zac Howland25-Aug-06 8:59 
AnswerRe: Destructors in STL? Pin
Zac Howland11-Aug-06 4:40
Zac Howland11-Aug-06 4:40 
QuestionCalling m_spClientSite->GetContainer from another thread Pin
TClarke8-Aug-06 3:34
TClarke8-Aug-06 3:34 
QuestionDEBUG_NEW for ATL apps? Pin
Rob Caldecott7-Aug-06 5:49
Rob Caldecott7-Aug-06 5:49 
AnswerRe: DEBUG_NEW for ATL apps? Pin
Michael Dunn7-Aug-06 7:41
sitebuilderMichael Dunn7-Aug-06 7:41 
GeneralRe: DEBUG_NEW for ATL apps? Pin
Rob Caldecott7-Aug-06 7:50
Rob Caldecott7-Aug-06 7:50 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.