Jump to content

Weird weapon shader issue I don't understand


Recommended Posts

I have messed up with something related to the weapon in my game project and I can't figure what's wrong... Maybe someone here can help me understanding what's happening.

Everything was working fine, then the game start crashing when the mission start. After some testing I figured it was related to the weapon mounting, everything is fine until I mount a weapon on my player.

I get a AssertFatal in shaderOP.cpp (end of GenOp::GenOp):

	// store langElement
     LangElement *elem = va_arg(args, LangElement* );
     AssertFatal( elem, "NULL argument." );
     mElemList.push_back( elem );

  va_end( args );

Then it keep "breaking" in the GenOp::Print :

void GenOp::print( Stream &stream )
  for( U32 i=0; i<mElemList.size(); i++ )
     mElemList[i]->print( stream ); //<- Break here


I know the 2nd issue is related the assertFatal but I don't understand what's happening. I tried to find something wrong in the weapons materials but everything seem fine (Those are still unmodified T3D weapons). Anyone have a hint about what is causing this crash? Maybe it's relate to the PBR code, I will try a compile with PBR removed...

Someone understand what that code is doing and can explain it roughly?

Link to comment
Share on other sites

I still don't understand what happened but I have been able to figure how to avoid the crash. Seem like something was wrong in my levels and I think it's related to my yesterday PBR experiments. I still can't figure what in the level make the game crash, seem like there's different objects causing the problems. For one, I replaced the LevelInfo object with the one from the EmptyRoom and it fixed it for this level. My LevelInfo had no LevelEnvMap map maybe it's a reason of the crash but for other levels it didn't fixed it. I also suspect the Sun and ScatterSky object of other level was causing problems... Anyway, it's fine now and I'm starting to work on fresh levels. I just wanted to post an update about how I "fixed" it in case someone experience the same crash.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...