Insomniumm / bwsal

Automatically exported from code.google.com/p/bwsal
0 stars 0 forks source link

Couple consistent crashes #29

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Any more then 2 player map
2.
3.

What is the expected output? What do you see instead?
Scout to pick new target and move along, game crash

What version of the product are you using? On what operating system?
newest, windows xp pro, VS 2008

Please provide any additional information below.

when the scout finds an empty starting location, somewhere in the logic to 
update all the managers it needs for it the game can crash.

And it breaks here, which makes me think it might also be that one warning i'm 
getting about it mixing up libcmt when i compile it, which could be part of the 
issue.  but the only places my game crashes is this, the rare buildordermanager 
goofin up, and the recent expansion logic, which could all be tied together 
from either the infomanager, bordermanager, well quite a few places i guess.  
nobody posted about these crashes though so i[m confused.  Thanks

Unhandled exception at 0x1000cd56 in ProtossAILoader.exe: 0xC0000005: Access 
violation reading location 0x0938812a.

/***
*_init_pointers() - initialize global function pointers with OS encoded values
*
*Purpose:
*
*Entry:
*
*Exit:
*
*Exceptions:
*
*******************************************************************************/

extern void __cdecl _initp_eh_hooks(void*);
extern void __cdecl _initp_heap_handler(void*);
extern void __cdecl _initp_misc_initcrit(void*);
extern void __cdecl _initp_misc_invarg(void*);
extern void __cdecl _initp_misc_purevirt(void*);
extern void __cdecl _initp_misc_rand_s(void*);
extern void __cdecl _initp_misc_winsig(void*);
extern void __cdecl _initp_misc_winxfltr(void*);

void __cdecl _init_pointers() {
        void *enull = _encoded_null();

        _initp_heap_handler(enull);
        _initp_misc_initcrit(enull);
        _initp_misc_invarg(enull);
        _initp_misc_purevirt(enull);
        _initp_misc_rand_s(enull);
        _initp_misc_winsig(enull);
        _initp_misc_winxfltr(enull);
        _initp_eh_hooks(enull);

        /* startup\crt0dat.c */
         _aexit_rtn = (void(__cdecl*)(int)) _encode_pointer(_exit);
}

/***
* static void _initterm(_PVFV * pfbegin, _PVFV * pfend) - call entries in
*       function pointer table
*
*Purpose:
*       Walk a table of function pointers, calling each entry, as follows:
*
*           1. walk from beginning to end, pfunctbl is assumed to point
*              to the beginning of the table, which is currently a null entry,
*              as is the end entry.
*           2. skip NULL entries
*           3. stop walking when the end of the table is encountered
*
*Entry:
*       _PVFV *pfbegin  - pointer to the beginning of the table (first
*                         valid entry).
*       _PVFV *pfend    - pointer to the end of the table (after last
*                         valid entry).
*
*Exit:
*       No return value
*
*Notes:
*       This routine must be exported in the CRT DLL model so that the client
*       EXE and client DLL(s) can call it to initialize their C++ constructors.
*
*Exceptions:
*       If either pfbegin or pfend is NULL, or invalid, all bets are off!
*
*******************************************************************************/

#ifdef CRTDLL
void __cdecl _initterm (
#else  /* CRTDLL */
static void __cdecl _initterm (
#endif  /* CRTDLL */
        _PVFV * pfbegin,
        _PVFV * pfend
        )
{
        /*
         * walk the table of function pointers from the bottom up, until
         * the end is encountered.  Do not skip the first entry.  The initial
         * value of pfbegin points to the first valid entry.  Do not try to
         * execute what pfend points to.  Only entries before pfend are valid.
         */
        while ( pfbegin < pfend )
        {
            /*
             * if current table entry is non-NULL, call thru it.
             */
            if ( *pfbegin != NULL )
                (**pfbegin)();
            ++pfbegin;
        }
}

Also i get an new error on expand in the newest version sometimes.

Unhandled exception at 0x0040fa4b in ProtossAILoader.exe: 0xC0000005: Access 
violation reading location 0x00000000.

/***
* __set_flsgetvalue - crt wrapper for setting up FlsGetValue pointer in TLS
*
* Purpose:
*       This function helps msvcmXX.dll threadstart and threadstartex APIs
*       to set FlsGetValue pointer before calling __fls_getvalue.
*
*******************************************************************************/

_CRTIMP PFLS_GETVALUE_FUNCTION __cdecl __set_flsgetvalue()
{
#ifdef _M_IX86
    PFLS_GETVALUE_FUNCTION flsGetValue = FLS_GETVALUE;
    if (!flsGetValue)
    {
        flsGetValue = _decode_pointer(gpFlsGetValue);
        TlsSetValue(__getvalueindex, flsGetValue);
    }
    return flsGetValue;
#else  /* _M_IX86 */
    return NULL;
#endif  /* _M_IX86 */
}

Original issue reported on code.google.com by JoshHil...@gmail.com on 20 Sep 2010 at 6:00

GoogleCodeExporter commented 8 years ago
Fixed in revision 483.

Original comment by lowerlo...@gmail.com on 27 Jul 2011 at 2:35