Raised This Month: $115 Target: $400
 28% 

[TF2] Thermal Thruster Crash Fix


Post New Thread Reply   
 
Thread Tools Display Modes
Author
Benoist3012
Veteran Member
Join Date: Mar 2014
Location: CWave::ForceFinish()
Plugin ID:
6208
Plugin Version:
0.1
Plugin Category:
Technical/Development
Plugin Game:
Team Fortress 2
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    Fixes the notorious crash server_srv.so!CStudioHdr::GetSharedPoseParameter(int, int) const
    Old 07-29-2018 , 11:54   [TF2] Thermal Thruster Crash Fix
    Reply With Quote #1

    Quote:
    Originally Posted by Benoist3012 View Post
    Fixes CStudioHdr::GetSharedPoseParameter to avoid out of bound array crash.
    Before:
    Code:
    int CStudioHdr::GetSharedPoseParameter( int iSequence, int iLocalPose ) const {     if (m_pVModel == NULL)     {         return iLocalPose;     }     if (iLocalPose == -1)         return iLocalPose;     Assert( m_pVModel );     int group = m_pVModel->m_seq[iSequence].group;     virtualgroup_t *pGroup = m_pVModel->m_group.IsValidIndex( group ) ? &m_pVModel->m_group[ group ] : NULL;     return pGroup ? pGroup->masterPose[iLocalPose] : iLocalPose; }

    After:
    Code:
    int CStudioHdr::GetSharedPoseParameter(int iSequence, int iLocalPose) {     if (m_pVModel == NULL)     {         return iLocalPose;     }     if (iLocalPose == -1)         return iLocalPose;         if (!m_pVModel->m_seq.IsValidIndex(iSequence))         return iLocalPose;         int group = m_pVModel->m_seq[iSequence].group;     virtualgroup_t *pGroup = m_pVModel->m_group.IsValidIndex( group ) ? &m_pVModel->m_group[ group ] : NULL;     return (pGroup && pGroup->masterPose.IsValidIndex( iLocalPose )) ? pGroup->masterPose[iLocalPose] : iLocalPose; }

    Remember this is a fix for unproperly setup models and shouldn't be used as a permanent fix. If you are able to contact the model maker then do so.

    Downloads:
    Linux
    Windows
    GameData

    Don't forget to create poseparameter_fix.autoload 0 byte file inside your extensions folder, otherwise the extension will not load and you will still crash! Or download the zip attached to this post

    Source:
    Github
    Attached Files
    File Type: zip poseparam_fix.zip (374.9 KB, 27 views)

    Last edited by Benoist3012; 05-10-2019 at 19:16.
    Benoist3012 is offline
    Mitchell
    ~lick~
    Join Date: Mar 2010
    Old 07-29-2018 , 11:59   Re: [TF2] Thermal Thruster Crash Fix
    Reply With Quote #2

    Quote:
    Originally Posted by Silvers View Post
    Uploading .SMX isn't allowed unless it doesn't compile on the forum. You need to provide the source.
    Its in the post??
    __________________
    Mitchell is offline
    Benoist3012
    Veteran Member
    Join Date: Mar 2014
    Location: CWave::ForceFinish()
    Old 07-29-2018 , 12:08   Re: [TF2] Thermal Thruster Crash Fix
    Reply With Quote #3

    Quote:
    Originally Posted by Silvers View Post
    Uploading .SMX isn't allowed unless it doesn't compile on the forum.
    Yeah and I say in my post this requires as external dependencies dhooks.

    Quote:
    Originally Posted by Silvers View Post
    You need to provide the source.
    I think you overlooked the github link.
    __________________
    Benoist3012 is offline
    Ragenewb
    Member
    Join Date: May 2017
    Location: Crashing Hale
    Old 07-29-2018 , 12:38   Re: [TF2] Thermal Thruster Crash Fix
    Reply With Quote #4

    Wonderful. Thanks for the fix!
    __________________
    Over-engineering is underrated.
    Ragenewb is offline
    JugadorXEI
    AlliedModders Donor
    Join Date: Jul 2017
    Location: Spain
    Old 07-29-2018 , 18:30   Re: [TF2] Thermal Thruster Crash Fix
    Reply With Quote #5

    Really nice work, Ben!
    __________________
    My github - Support me!
    Discord: JugadorXEI#8724 - Steam
    JugadorXEI is offline
    dedimark
    Senior Member
    Join Date: Jul 2015
    Location: London
    Old 08-01-2018 , 13:32   Re: [TF2] Thermal Thruster Crash Fix
    Reply With Quote #6

    Hi,

    https://crash.limetech.org/gjqwhygqbtxw

    still crashing with https://github.com/50DKP/TF2x10/blob...domizer_x10.sp
    (server with bots)

    Last edited by dedimark; 08-01-2018 at 13:45.
    dedimark is offline
    Benoist3012
    Veteran Member
    Join Date: Mar 2014
    Location: CWave::ForceFinish()
    Old 08-01-2018 , 15:00   Re: [TF2] Thermal Thruster Crash Fix
    Reply With Quote #7

    Quote:
    Originally Posted by dedimark View Post
    Yeah I got reports that this crash also seems to happen with other sort of weapons, like "The Bread Bite" for heavy. I'll try to get build with a more general fix than just a test case for thermal thruster.
    __________________
    Benoist3012 is offline
    dedimark
    Senior Member
    Join Date: Jul 2015
    Location: London
    Old 08-01-2018 , 17:10   Re: [TF2] Thermal Thruster Crash Fix
    Reply With Quote #8

    Quote:
    Originally Posted by Benoist3012 View Post
    Yeah I got reports that this crash also seems to happen with other sort of weapons, like "The Bread Bite" for heavy. I'll try to get build with a more general fix than just a test case for thermal thruster.
    Thank you.
    dedimark is offline
    Benoist3012
    Veteran Member
    Join Date: Mar 2014
    Location: CWave::ForceFinish()
    Old 08-01-2018 , 17:23   Re: [TF2] Thermal Thruster Crash Fix
    Reply With Quote #9

    Update
    - Alright so this new version just block the function from executing and returns 0. Much easier fix

    Edit: For those thinking this is a "lazy" fix, I've tried something deeper https://github.com/Benoist3012/JetPa...fix.sp#L51#L73
    But the total sequencse on the VM model are always equal to 2 or 3 and the request sequence to play always above these two numbers so we end up with this deeper fix to always return 0 anyways which does no affect the server. VM animations are client controlled anyways.
    __________________

    Last edited by Benoist3012; 08-01-2018 at 17:33.
    Benoist3012 is offline
    epicwindow
    Member
    Join Date: Jan 2018
    Old 08-03-2018 , 17:15   Re: [TF2] Thermal Thruster Crash Fix
    Reply With Quote #10

    wow thanks a lot man,so does it works on bread bite now as well?
    __________________
    My FF2 server @Hong Kong
    TL;DR my server aims for quality then quantity
    https://steamcommunity.com/groups/windowff2serlel

    Last edited by epicwindow; 08-03-2018 at 17:22.
    epicwindow is offline
    Reply


    Thread Tools
    Display Modes

    Posting Rules
    You may not post new threads
    You may not post replies
    You may not post attachments
    You may not edit your posts

    BB code is On
    Smilies are On
    [IMG] code is On
    HTML code is Off

    Forum Jump


    All times are GMT -4. The time now is 18:59.


    Powered by vBulletin®
    Copyright ©2000 - 2019, vBulletin Solutions, Inc.
    Theme made by Freecode