Client version: latest
UOX version: latest released
Client type: 2d (and I believe 3d is affected as well):
Issue: Pentagram deeds crash uox3, console reports 0 errors, and just crashes.
[FIXED] Pentagram Deeds
- Xuri
- Site Admin
- Posts: 3704
- Joined: Mon Jun 02, 2003 9:11 am
- Location: Norway
- Has thanked: 48 times
- Been thanked: 8 times
- Contact:
The callstack from MSVC 6:
Note that the crash only happens if you're attempting to place the pentagram outside a house (at least, with me it only crashed then) - when attempting to place the pentagram inside a house (which should work), it gave me the message "You cannot build your house there!".
Code: Select all
UOX::CBaseObject::WorldNumber() line 1834 + 3 bytes
UOX::CreateHouseItems(UOX::CChar * 0x02848bb8, std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > {...}, UOX::CMultiObj * 0x00000000, unsigned short 0x0fea, short 0x08af, short 0x0480, char 0x00) line 94 + 8 bytes
UOX::BuildHouse(UOX::CSocket * 0x1883e958, unsigned char 0x12) line 288 + 64 bytes
UOX::BuildHouseTarget(UOX::CSocket * 0x1883e958) line 208 + 18 bytes
UOX::CPITargetCursor::Handle() line 1607 + 12 bytes
UOX::cNetworkStuff::GetMsg(unsigned long 0x00000000) line 561 + 17 bytes
UOX::cNetworkStuff::CheckMessage() line 442
UOX::cNetworkStuff::CheckMessages() line 1201
main(int 0x00000001, char * * 0x003d2508) line 2816
mainCRTStartup() line 338 + 17 bytes
KERNEL32! 7c816fd7()
-= Ho Eyo He Hum =-
-
giwo
- Developer
- Posts: 1780
- Joined: Fri Jun 18, 2004 4:17 pm
- Location: California
- Has thanked: 0
- Been thanked: 0
Funny when things work that way, isn't it.... 
As for the crash, it's obviously assuming the object is being placed in a multi and then doing a multi->WorldNumber() call, which would puke.
For not being able to place inside the house, either 1) the SPACEX and SPACEY for the pentagram is not 0, or 2) It is 0 and there's an error in our calculating the area (0*0=0 last I checked).
As for the crash, it's obviously assuming the object is being placed in a multi and then doing a multi->WorldNumber() call, which would puke.
For not being able to place inside the house, either 1) the SPACEX and SPACEY for the pentagram is not 0, or 2) It is 0 and there's an error in our calculating the area (0*0=0 last I checked).
-
Grimson
- Developer
- Posts: 802
- Joined: Sat Jun 04, 2005 1:52 am
- Location: Germany
- Has thanked: 0
- Been thanked: 0
I guess that's more related to the fact that we don't allow a multi inside a multi, and as the pentagram is handled like a multi in BuildHouse() it fails.giwo wrote:For not being able to place inside the house, either 1) the SPACEX and SPACEY for the pentagram is not 0, or 2) It is 0 and there's an error in our calculating the area (0*0=0 last I checked).
-
giwo
- Developer
- Posts: 1780
- Joined: Fri Jun 18, 2004 4:17 pm
- Location: California
- Has thanked: 0
- Been thanked: 0
I've found, and believe I've fixed the problem, however I'm at work and thus without a compiler at the moment.
If you want to test out the fix for yourself, do this:
On Line 80 of house.cpp change this:
To this:
on line 287, change this:
to this:
Compile and try to place a pentagram outside a house, it should work now.
If you want to test out the fix for yourself, do this:
On Line 80 of house.cpp change this:
Code: Select all
void CreateHouseItems( CChar *mChar, STRINGLIST houseItems, CMultiObj *house, UI16 houseID, SI16 x, SI16 y, SI08 z )
Code: Select all
void CreateHouseItems( CChar *mChar, STRINGLIST houseItems, CItem *house, UI16 houseID, SI16 x, SI16 y, SI08 z )
Code: Select all
if( !houseItems.empty() )
CreateHouseItems( mChar, houseItems, house, houseID, x, y, z );
Code: Select all
if( !houseItems.empty() )
{
if( !ValidateObject( fakeHouse ) )
fakeHouse = house;
CreateHouseItems( mChar, houseItems, fakeHouse, houseID, x, y, z );
}