|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Development::Bug Reports Post detailed bug reports and what you would like to see next in the emu here. |
10-22-2008, 09:23 AM
|
Discordant
|
|
Join Date: Jan 2005
Posts: 320
|
|
Rev 127 Zone crash after looting an item
Just upped to Rev 127. It compiled fine and runs stable for me. I killed a mob to check out the new link when looting items. As soon as you loot you get the link and zone.exe crashes. Nothing shows up in logs about the crash.
|
10-22-2008, 12:08 PM
|
Developer
|
|
Join Date: Mar 2007
Location: Ohio
Posts: 648
|
|
Is anyone else having this problem? Before I committed the change, I compiled and tested on myself and it worked fine, but I didn't have a chance to test in a group.
|
10-22-2008, 12:11 PM
|
|
The PEQ Dude
|
|
Join Date: Apr 2003
Location: -
Posts: 1,988
|
|
I tried reproducing a crash using both clients in a group and was unable to.
|
10-22-2008, 12:24 PM
|
Developer
|
|
Join Date: Mar 2007
Location: Ohio
Posts: 648
|
|
Quote:
Originally Posted by cavedude
I tried reproducing a crash using both clients in a group and was unable to.
|
Same. I grouped 2 characters in Kael, killed a Giant w/ random loot, looted it, and it showed correctly on both characters (including clicking on the links).
The only thing that initially caused an issue was when I tried to initialize the string (which is actually char now) using NULL, which did cause the zone to crash, but not using a value to initialize it just generates a warning during compile.
Do you have any logs of the crash or any other information to help reproduce it?
Last edited by AndMetal; 10-22-2008 at 08:27 PM..
|
10-22-2008, 12:44 PM
|
Dragon
|
|
Join Date: May 2006
Location: Cincinnati, OH
Posts: 689
|
|
Is this on the Titanium client?
|
10-22-2008, 12:49 PM
|
Discordant
|
|
Join Date: Jan 2005
Posts: 320
|
|
Bleh, I dunno why it crashes for me, I recompiled 2 times to make sure using VS 2005 Express. Same results both times, using titanium :(
|
10-22-2008, 12:51 PM
|
Discordant
|
|
Join Date: Jan 2005
Posts: 320
|
|
is compiling with Vs 2005 not supported? I get a ton of warnings, although it compiles succesfully. I was using 2008 and getting much less warnings, until my trial ran out and I switched to 2005 :(
|
10-22-2008, 12:56 PM
|
Developer
|
|
Join Date: Feb 2004
Location: UK
Posts: 1,540
|
|
Code:
char *link;
sprintf(link, "%c%06X%s%s%c", ...
You are declaring link as a pointer to an array of characters, but not initialising it to a valid value, so it will point to a random position in memory.
You should declare it like char link[100]; (replacing 100 with whatever the maximum size of a link is).
|
10-22-2008, 01:05 PM
|
Discordant
|
|
Join Date: Jan 2005
Posts: 320
|
|
I'm no coding genius, so this may not be helpful at all. But it appears to be the part that Derision just mentioned. This is what pops up while zone is compiling and it gets to that part.
1>c:\eq\eqemuserver\zone\playercorpse.cpp(1005) : warning C4700: uninitialized local variable 'link' used
|
10-22-2008, 01:53 PM
|
Developer
|
|
Join Date: Mar 2007
Location: Ohio
Posts: 648
|
|
Quote:
Originally Posted by Derision
You should declare it like char link[100]; (replacing 100 with whatever the maximum size of a link is).
|
My concern is that the link's length depends on the name of the item, since it is appended on the end, just before the terminating character 0x12. However, an item name should be a max of 64, so we could just set the length to 1+6+39+64+1 = 111.
I'll go ahead and compile the changes & see what happens.
Edit: we could use a string, like was done before, but it would be so much more of a pita to get it back to a predictable char.
Last edited by AndMetal; 10-22-2008 at 09:58 PM..
|
10-22-2008, 01:56 PM
|
Developer
|
|
Join Date: Feb 2004
Location: UK
Posts: 1,540
|
|
I'm not sure if your calculation include the `\0` terminator that sprintf will automatically put at the end of the string. If not, you should add 1 byte for that.
|
|
|
|
10-22-2008, 05:13 PM
|
Developer
|
|
Join Date: Mar 2007
Location: Ohio
Posts: 648
|
|
I started with 111 (didn't realize the last byte added by sprintf at the time) and it works fine, primarily because the longest item name in the DB is 50 characters long:
Code:
mysql> SELECT id, Name, CHAR_LENGTH(Name) as Name_length FROM items ORDER BY Name_length DESC, id ASC LIMIT 5;
+-------+----------------------------------------------------+-------------+
| id | Name | Name_length |
+-------+----------------------------------------------------+-------------+
| 18557 | Prophecy of Vah: A History of the Vah Shir Vol.III | 50 |
| 20429 | Banner Material Kit: Focus of Benefit Conservation | 50 |
| 18556 | Prophecy of Vah: A History of the Vah Shir Vol.II | 49 |
| 46814 | Gnomework Model XVII's Experimental Plate Backing | 49 |
| 57937 | First Sisters of the Blackfeather Harpies Vol. II | 49 |
+-------+----------------------------------------------------+-------------+
5 rows in set (0.98 sec)
I'll get this updated into SVN once I have a chance to finish some other stuff (unless someone wants to take care of it first).
|
|
|
|
10-23-2008, 12:32 AM
|
Discordant
|
|
Join Date: Jan 2005
Posts: 320
|
|
Thanks for the fix Andmetal, took care of the problem I was having. I can now loot with Rev 129
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -4. The time now is 02:42 AM.
|
|
|
|
|
|
|
|
|
|
|
|
|