Archived

This topic is now archived and is closed to further replies.

Corillian

Need help with Direct Play

Recommended Posts

Corillian    122
I am having some problems with unhandled exceptions with Direct Play and memory leaks. I initialize DP at the startup of my game (no probs here). If I exit the game without trying to connect then there are unhandled exceptions with releasing the DP object, local address device, and host address device. If I exit the game during a connection attempt or while it's connected I get unhandled exceptions and a bunch of assembler spit out at me. Here is my destructor code: if( dpClient && connected == true) { // Close our connection dpClient->Close(0); // Release the DirectPlay object } CloseHandle( ConnectCompleteEvent ); SAFE_RELEASE( dpClient ); //unhandled exception if not connected SAFE_RELEASE( device_address ); //same as dpClient SAFE_RELEASE( host_address ); //same as dpClient Here are some of the assertion errors that show up in the debug console: COMMON:0:fff77bef:fff78a53:************************************************************ COMMON:0:fff77bef:fff78a53:ASSERTION FAILED! File: d:\nt_chk\multimedia\directx\dplay\dnet\common\fpm.cpp Line: 214: 0 COMMON:0:fff77bef:fff78a53:************************************************************ COMMON:0:fff77bef:fff78a53:************************************************************ COMMON:0:fff77bef:fff78a53:ASSERTION FAILED! File: d:\nt_chk\multimedia\directx\dplay\dnet\common\fpm.cpp Line: 214: 0 COMMON:0:fff77bef:fff78a53:************************************************************ COMMON:0:fff77bef:fff78a53:DirectPlay8 memory leak detected! ( #1 of 8 )68 bytes leaked at address 0x04a0fb10! Any help would be appreciated, thanks. -Corillian Edited by - Corillian on August 5, 2001 1:45:11 PM

Share this post


Link to post
Share on other sites
Corillian    122
Yes I did look at the source. I implemented it almost the exact same as it is in the book. I have no clue what it could be. It used to work fine. I havn''t changed anything in the destructor or construction code and all the sudden DP started wacking out.

Share this post


Link to post
Share on other sites