Author Topic: Gah! Stupid Bugs!  (Read 2147 times)

0 Members and 1 Guest are viewing this topic.

Offline Goober5000

  • HLP Loremaster
  • Moderator
  • 214
    • Goober5000 Productions
I nailed that send-message bug that's been around for a while.  (It was driving me nuts.)  The problem wasn't in the messaging code at all, it was in the nameplate code... specifically, the mission parse routine that set it up.  Bobboau accidentally reset all the wingmen personas to -1, and so the routine couldn't find any valid ships.

General service announcement: To all programmers, please double-check your code.  This is the fourth bug I've fixed recently that was due to careless programming (the two beam bugs and the giant thruster glows were the other three).  For programmer sanity and to avoid wasted time, please make sure your code is bug-free before you commit it.

 

Offline RandomTiger

  • Senior Member
  • 211
The best way to identify bugs is get more than one person to look. Thats what the tester list is there for.

 
except for one thing: don't put any bugs in. goober as a point, if the programmers commit code without testng it very, very well, the SCP will go an awfulllot slower. i know this form experience, i program in QBASIC, and i don't write my code very, clear, so i eventually end up spending my time tracking bugs instead of making a program.

:nervous: ok i'm a newbie, i'll just shut up now:nervous:

*runs*
just another newbie without any modding, FREDding or real programming experience

you haven't learned masochism until you've tried to read a Microsoft help file.  -- Goober5000
I've got 2 drug-addict syblings and one alcoholic whore. And I'm a ****ing sociopath --an0n
You cannot defeat Windows through strength alone. Only patience, a lot of good luck, and a sledgehammer will do the job. --StratComm

 

Offline vyper

  • 210
  • The Sexy Scotsman
Quote
Originally posted by kasperl
except for one thing: don't put any bugs in. goober as a point, if the programmers commit code without testng it very, very well, the SCP will go an awfulllot slower. i know this form experience, i program in QBASIC, and i don't write my code very, clear, so i eventually end up spending my time tracking bugs instead of making a program.

:nervous: ok i'm a newbie, i'll just shut up now:nervous:

*runs*


Indeed, if tracing problems in the scp is like tracing recursive functions then I pity Goober.
"But you live, you learn.  Unless you die.  Then you're ****ed." - aldo14

 

Offline Goober5000

  • HLP Loremaster
  • Moderator
  • 214
    • Goober5000 Productions
Tracing isn't that bad - it's a pain, but it's not that bad.  But tracing doesn't always work.  I was bulldozing through the messaging code looking for that bug, and it wasn't there at all.  If I hadn't had my hunch about the persona index, I don't know how long it would have taken me to find it.

And the tester index wouldn't have helped with that - everyone knows all about the bug, but unless you're a programmer, you wouldn't be able to do anything about it.  Testers are good for finding bugs, but they usually can't do much with bugs that are already found.

I'm a little ticked off because the bug was so obvious to pick out once I pinpointed the location.  Not to pick on Bobboau, but if he had read over his nameplate parsing code once before submitting it, he would have seen that he needed to put objp->nameplate = -1, instead of objp->persona_index = -1.  Personas have nothing to do with nameplates.
« Last Edit: January 14, 2003, 08:09:26 am by 561 »

 

Offline Bobboau

  • Just a MODern kinda guy
    Just MODerately cool
    And MODest too
  • 213
the time around wich that got commited there were a lot of problems and that was the time around were we were haveing the rollback problem, I probly did some othe code had to start over backed up restarted ... gave up forgot about it... sorry
Bobboau, bringing you products that work... in theory
learn to use PCS
creator of the ProXimus Procedural Texture and Effect Generator
My latest build of PCS2, get it while it's hot!
PCS 2.0.3


DEUTERONOMY 22:11
Thou shalt not wear a garment of diverse sorts, [as] of woollen and linen together

 

Offline Goober5000

  • HLP Loremaster
  • Moderator
  • 214
    • Goober5000 Productions
That's okay.  This'll just serve as a heads-up to everyone submitting code, so the same thing (hopefully) won't happen again. :)

 

Offline RandomTiger

  • Senior Member
  • 211
My point is testers can be used to check programmers code before its even committed to the rest of the code. People should test more. New code can sometimes have different effects on different machines.

Stopping bugs before they happen is the best way but it would be nice to have a net for the ones that get through.

  
well.. most of the time, when developping a program (even the simplest one), his spent finding and fixing bugs.. The test phase is as important as the design one. And it's usually a good idea let other people than the programers do the tests... (you know... we can grow pretty self-confident... "yes yes. My program works. It's you who isn't able to use it.")
----------------------------------------------
GTD Swiss Pride - Orion Class
Swiss 1st Fleet, Sector 32 - Ore Belt - Sol
----------------------------------------------
"I'm an engineer!"

Eve: Since Beta Phase 2
Civilizazion Fan: Seems like forever...
SimCity Fan: SC 2000 is still the best
TT Fan: Since 1995
Switzerland: Since 1291