-
-
Notifications
You must be signed in to change notification settings - Fork 77
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MP Fail to Work #43
Comments
these are mainly issues if you compile in debug and run the game without a debugger attached to the hl2.exe if you could provide a crash dump or the location of the crash like in which file the assert happened i can check it out |
From tier1\utlbuffer.cpp //-----------------------------------------------------------------------------
// Reads a null-terminated string
//-----------------------------------------------------------------------------
void CUtlBuffer::GetStringInternal( char *pString, size_t maxLenInChars )
{
if ( !IsValid() )
{
*pString = 0;
return;
}
Assert( maxLenInChars != 0 ); //This is where the client crashes
if ( maxLenInChars == 0 )
{
return;
}
// Remember, this *includes* the null character
// It will be 0, however, if the buffer is empty.
int nLen = PeekStringLength();
if ( IsText() )
{
EatWhiteSpace();
}
if ( nLen <= 0 )
{
*pString = 0;
m_Error |= GET_OVERFLOW;
return;
}
const size_t nCharsToRead = min( (size_t)nLen, maxLenInChars ) - 1;
Get( pString, nCharsToRead );
pString[nCharsToRead] = 0;
if ( (size_t)nLen > (nCharsToRead + 1) )
{
SeekGet( SEEK_CURRENT, nLen - (nCharsToRead + 1) );
}
// Read the terminating NULL in binary formats
if ( !IsText() )
{
VerifyEquals( GetChar(), 0 );
}
}
|
If you want I can include a screenshot of the crash in a debugger. |
<!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
.MsoChpDefault
{mso-style-type:export-only;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
{page:WordSection1;}
-->Ok. Did not expect a response after it being closed Sent from Mail for Windows From: GhostfreddySent: Sunday, 4 June 2023 2:50 PMTo: Nbc66/source-sdk-2013-ceCc: derric-young; AuthorSubject: Re: [Nbc66/source-sdk-2013-ce] MP Fail to Work (Issue #43) If you want I can include a screenshot of the debugger.—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: ***@***.***>
|
Removing the assert only seems to mess up the text on the title screen |
<!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
.MsoChpDefault
{mso-style-type:export-only;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
{page:WordSection1;}
-->weird Sent from Mail for Windows From: GhostfreddySent: Sunday, 4 June 2023 4:36 PMTo: Nbc66/source-sdk-2013-ceCc: derric-young; AuthorSubject: Re: [Nbc66/source-sdk-2013-ce] MP Fail to Work (Issue #43) Removing the assert only seems to mess up the text on the title screen—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: ***@***.***>
|
Why does this function do a not null check? This assert is unnecessary the function already checks if the string is invalid or has a char count of 0. Removing the assert shouldn't break anything |
CUtlBuffer::GetStringInternal is only in the mp source |
Expected Behavior
Work like How Singleplayer Builds. why does MP not?
Steps to Reproduce
After Building on any Ordernary Setup. set it up in a source mod and there. error
Detailed Description
assert error line 618.
Operating System
Windows
The text was updated successfully, but these errors were encountered: