Go Back   EQEmulator Home > EQEmulator Forums > Development > Development::Bug Reports

Development::Bug Reports Post detailed bug reports and what you would like to see next in the emu here.

Reply
 
Thread Tools Display Modes
  #1  
Old 10-22-2008, 09:23 AM
paaco
Discordant
 
Join Date: Jan 2005
Posts: 320
Default 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.
Reply With Quote
  #2  
Old 10-22-2008, 12:08 PM
AndMetal
Developer
 
Join Date: Mar 2007
Location: Ohio
Posts: 648
Default

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.
__________________
GM-Impossible of 'A work in progress'
A non-legit PEQ DB server
How to create your own non-legit server

My Contributions to the Wiki
Reply With Quote
  #3  
Old 10-22-2008, 12:11 PM
cavedude's Avatar
cavedude
The PEQ Dude
 
Join Date: Apr 2003
Location: -
Posts: 1,988
Default

I tried reproducing a crash using both clients in a group and was unable to.
Reply With Quote
  #4  
Old 10-22-2008, 12:24 PM
AndMetal
Developer
 
Join Date: Mar 2007
Location: Ohio
Posts: 648
Default

Quote:
Originally Posted by cavedude View Post
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?
__________________
GM-Impossible of 'A work in progress'
A non-legit PEQ DB server
How to create your own non-legit server

My Contributions to the Wiki

Last edited by AndMetal; 10-22-2008 at 08:27 PM..
Reply With Quote
  #5  
Old 10-22-2008, 12:44 PM
So_1337
Dragon
 
Join Date: May 2006
Location: Cincinnati, OH
Posts: 689
Default

Is this on the Titanium client?
Reply With Quote
  #6  
Old 10-22-2008, 12:49 PM
paaco
Discordant
 
Join Date: Jan 2005
Posts: 320
Default

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 :(
Reply With Quote
  #7  
Old 10-22-2008, 12:51 PM
paaco
Discordant
 
Join Date: Jan 2005
Posts: 320
Default

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 :(
Reply With Quote
  #8  
Old 10-22-2008, 12:56 PM
Derision
Developer
 
Join Date: Feb 2004
Location: UK
Posts: 1,540
Default

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).
Reply With Quote
  #9  
Old 10-22-2008, 01:05 PM
paaco
Discordant
 
Join Date: Jan 2005
Posts: 320
Default

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
Reply With Quote
  #10  
Old 10-22-2008, 01:53 PM
AndMetal
Developer
 
Join Date: Mar 2007
Location: Ohio
Posts: 648
Default

Quote:
Originally Posted by Derision View Post
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.
__________________
GM-Impossible of 'A work in progress'
A non-legit PEQ DB server
How to create your own non-legit server

My Contributions to the Wiki

Last edited by AndMetal; 10-22-2008 at 09:58 PM..
Reply With Quote
  #11  
Old 10-22-2008, 01:56 PM
Derision
Developer
 
Join Date: Feb 2004
Location: UK
Posts: 1,540
Default

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.
Reply With Quote
  #12  
Old 10-22-2008, 05:13 PM
AndMetal
Developer
 
Join Date: Mar 2007
Location: Ohio
Posts: 648
Default

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).
__________________
GM-Impossible of 'A work in progress'
A non-legit PEQ DB server
How to create your own non-legit server

My Contributions to the Wiki
Reply With Quote
  #13  
Old 10-23-2008, 12:32 AM
paaco
Discordant
 
Join Date: Jan 2005
Posts: 320
Default

Thanks for the fix Andmetal, took care of the problem I was having. I can now loot with Rev 129
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 02:42 AM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3