source-sdk-2013 icon indicating copy to clipboard operation
source-sdk-2013 copied to clipboard

engine.dll crashes when running the game using custom launcher

Open funniman-exe opened this issue 11 months ago • 1 comments

Right after 'execing valve.rc', the engine dll encounters an access violation.

The exact error is as follows: Exception thrown at 0x00007FF8301D09E7 (engine.dll) in mod_tf_win64.exe: 0xC0000005: Access violation reading location 0x0000000000000000.

The code breakpoints at if ( engine->IsPlayingDemo() ) in SetupViews() of view.cpp on the client side.

Image

For some reason, it doesn't do this when running the mod using the source 2013 sdk multiplayer base hl2mp_win64.exe. Any help would be appreciated.

funniman-exe avatar Feb 23 '25 23:02 funniman-exe

Looks like nullptr deference.

Looking at the implementation of IsPlayingDemo: https://github.com/sr2echa/TF2-Source-Code/blob/master/tf2_src/engine/cdll_engine_int.cpp#L1295

bool CEngineClient::IsPlayingDemo( void )
{
	return demoplayer->IsPlayingBack();
}
  1. Check engine is not nullptr.
  2. Check you are not using editdemo command in config.cfg & friends. Drop it.
  3. May be somehow demoplayer is nullptr somehow and TF2 source is different from https://github.com/sr2echa/TF2-Source-Code

dimhotepus avatar Feb 24 '25 11:02 dimhotepus