[FIXED] Crash in UOX::CBase_GetTag

Found a bug in UOX3? Or experienced a server crash? Perhaps you've noticed a broken feature? Post the details here!
Post Reply
User avatar
Xuri
Site Admin
Posts: 3704
Joined: Mon Jun 02, 2003 9:11 am
Location: Norway
Has thanked: 48 times
Been thanked: 8 times
Contact:

Crash in UOX::CBase_GetTag

Post by Xuri »

For some reason UOX3 kept crashing when I tried to do
var Item = CalcItemFromSer( iUsed.GetTag( "ser1"), iUsed.GetTag( "ser2"), iUsed.GetTag( "ser3"), iUsed.GetTag( "ser4"));

After I wiped the shared folder and tried again, it's no longer crashing. But I'm posting the debug info from MSVS 6 just in case it's something "fixable".

Code: Select all

std::basic_string<char,std::char_traits<char>,std::allocator<char> >::_Copy(unsigned int 0x00000006) line 536 + 15 bytes
std::basic_string<char,std::char_traits<char>,std::allocator<char> >::_Grow(unsigned int 0x00000006, unsigned char 0x01) line 568
std::basic_string<char,std::char_traits<char>,std::allocator<char> >::assign(const char * 0x037cf820, unsigned int 0x00000006) line 133 + 21 bytes
std::basic_string<char,std::char_traits<char>,std::allocator<char> >::assign(const char * 0x037cf820) line 138 + 32 bytes
std::basic_string<char,std::char_traits<char>,std::allocator<char> >::basic_string<char,std::char_traits<char>,std::allocator<char> >(const char * 0x037cf820, const std::allocator<char> & {...}) line 51 + 39 bytes
UOX::CBase_GetTag(JSContext * 0x00372898, JSObject * 0x037b35c8, unsigned int 0x00000001, long * 0x1bada084, long * 0x00033930) line 1903 + 43 bytes
JS32! 100221d6()
-= Ho Eyo He Hum =-
giwo
Developer
Posts: 1780
Joined: Fri Jun 18, 2004 4:17 pm
Location: California
Has thanked: 0
Been thanked: 0

Post by giwo »

I did find one oddity when looking at CBase_GetTag. Basically we are using JS_NewString (which uses currently allocated memory) rather than JS_NewStringCopyZ (which allocates new memory). Since we use JS_NewStringCopyZ everywhere else when passing a string to JS, I'm going to update the function to match.
Post Reply