Register forum user name Search FAQ

Gammon Forum

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 ➜ Crashing, and attempting to gdb core

Crashing, and attempting to gdb core

It is now over 60 days since the last post. This thread is closed.     Refresh page


Pages: 1  2 

Posted by David Haley   USA  (3,881 posts)  Bio
Date Reply #15 on Wed 01 Oct 2003 10:33 PM (UTC)
Message
Yes... having || instead of && could actually re-introduce the original bug and cause it to crash again. Samson's suggestion of only checking value1 is correct, since you only really care about value1 being 0 anyways.

Ah the joys of zero-division... :P Sometimes the most elusive of bugs can come from the most elementary (yet so hard to track down) bugs. You're fortunate that you have a builder who was alert enough to spot the cause of that; imagine if that had been somewhere else in the bowels of your code in a not-easily-traceable location. Now that would've been fun...

I don't know why the core file was being created even with a 0 file limit. That's really odd. Are you sure they were recent core files? Could you paste the text you get when you type ulimit -a ?

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 #16 on Wed 01 Oct 2003 11:20 PM (UTC)
Message
ulimit -a

core file size        (blocks, -c) 0
data seg size         (kbytes, -d) unlimited
file size             (blocks, -f) unlimited
max locked memory     (kbytes, -l) unlimited
max memory size       (kbytes, -m) unlimited
open files                    (-n) 1024
pipe size          (512 bytes, -p) 8
stack size            (kbytes, -s) 8192
cpu time             (seconds, -t) unlimited
max user processes            (-u) 7168
virtual memory        (kbytes, -v) unlimited


Changed the code to

                       if (obj->value[1] == 0 )
                         break;

I shoulda thought of that, but oh well.

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.


46,553 views.

This is page 2, subject is 2 pages long:  [Previous page]  1  2 

It is now over 60 days since the last post. This thread is closed.     Refresh page

Go to topic:           Search the forum


[Go to top] top

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.