Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are
spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the
password reset link.
Due to spam on this forum, all posts now need moderator approval.
Entire forum
➜ SMAUG
➜ SMAUG coding
➜ Once again, another access violation
|
Once again, another access violation
|
It is now over 60 days since the last post. This thread is closed.
Refresh page
| Posted by
| Zeno
USA (2,871 posts) Bio
|
| Date
| Mon 24 May 2004 07:05 PM (UTC) |
| Message
|
#0 0x080c22fa in violence_update () at fight.c:373
373 ch->desc->character->desc = ch->desc;
(gdb) bt
#0 0x080c22fa in violence_update () at fight.c:373
#1 0x0812c468 in update_handler () at update.c:2023
#2 0x080a9cba in game_loop () at comm.c:690
#3 0x080a95b1 in main (argc=2, argv=0xbffff5d0) at comm.c:304
#4 0x42015967 in __libc_start_main () from /lib/i686/libc.so.6
(gdb) print ch
$1 = (struct char_data *) 0x8349ef0
(gdb) print ch->name
$2 = 0x834fb20 "Arion"
(gdb) print ch->desc
$3 = (struct descriptor_data *) 0x836a390
(gdb) print ch->desc->port
$4 = 4839
(gdb) ch->desc->character->desc
Undefined command: "ch-". Try "help".
(gdb) print ch->desc->character->desc
Cannot access memory at address 0x4c
(gdb)
I don't get that at all. How can the char->desc be null but not ch->desc?
I had a post about something like this here:
http://www.gammon.com.au/forum/bbshowpost.php?bbsubject_id=4134
Is this related to that? |
Zeno McDohl,
Owner of Bleached InuYasha Galaxy
http://www.biyg.org | | Top |
|
| Posted by
| David Haley
USA (3,881 posts) Bio
|
| Date
| Reply #1 on Mon 24 May 2004 07:17 PM (UTC) |
| Message
| You left one out :) What's at ch->desc->character?
My bet is that ch->desc->character doesn't actually point back to ch, and either the memory got corrupted (very evil) or somewhere the pointers didn't get set correctly (only slightly less evil). |
David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone
http://david.the-haleys.org | | Top |
|
| Posted by
| Zeno
USA (2,871 posts) Bio
|
| Date
| Reply #2 on Mon 24 May 2004 07:21 PM (UTC) |
| Message
|
(gdb) print ch->desc->character
$1 = (struct char_data *) 0x0
Yeah, null. (I think, heh)
Should I add an ifcheck for null, or... is this just a common problem? |
Zeno McDohl,
Owner of Bleached InuYasha Galaxy
http://www.biyg.org | | Top |
|
| Posted by
| Greven
Canada (835 posts) Bio
|
| Date
| Reply #3 on Mon 24 May 2004 10:30 PM (UTC) |
| Message
| | You can add the check for null here to correct this issue, but it leaves a larger one of where ch->desc->character is not being set. Is this perhaps while switched, possessed, something like that? |
Nobody ever expects the spanish inquisition!
darkwarriors.net:4848
http://darkwarriors.net | | Top |
|
| Posted by
| David Haley
USA (3,881 posts) Bio
|
| Date
| Reply #4 on Tue 25 May 2004 12:27 AM (UTC) |
| Message
| | Yes, like he said, you could fix it here but it'd be worth your time to figure out where it got broken in the first place. Did you change anything that would affect this kind of stuff? Switch, possess, snoop, anything? |
David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone
http://david.the-haleys.org | | Top |
|
| Posted by
| Zeno
USA (2,871 posts) Bio
|
| Date
| Reply #5 on Tue 25 May 2004 01:21 AM (UTC) |
| Message
| | Switch is disabled. Possess isn't in. Snoop is stock code. *shrug* I'll add an ifcheck for now, and look around it. |
Zeno McDohl,
Owner of Bleached InuYasha Galaxy
http://www.biyg.org | | Top |
|
The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).
To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.
17,813 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top