Worst bugs you had

Discussion about everything. New games, 3d math, development tips...
Post Reply
REDDemon
Developer
Posts: 1044
Joined: Tue Aug 31, 2010 8:06 pm
Location: Genova (Italy)

Worst bugs you had

Post by REDDemon »

Things that went wrong because of stupid errors that compiler was not able to warn about. Or just very strange bugs. Put them here if you had one.

I recently had one.

Code: Select all

 
A = stack*C*(78*+3*D);
 
that should be

Code: Select all

 
A = stack*C*(78+3*D);
 
the compiler didn't warned about " *+ " (wich can be correct or not from sintax point of view, but I don't think is a very often used combination of characters.)

Does Visual studio throws warnings or it silently compile like gcc?
Junior Irrlicht Developer.
Real value in social networks is not about "increasing" number of followers, but about getting in touch with Amazing people.
- by Me
mongoose7
Posts: 1227
Joined: Wed Apr 06, 2011 12:13 pm

Re: Worst bugs you had

Post by mongoose7 »

Looks like A = stack*C*(78*(+3)*D);

which is correct code. No compiler would generate an error. I guess, knowing GCC (not very well :P), that it could suggest that the construction may not be what you intended, but it is difficult to warn about correct code, particularly if the expression already has brackets.
kazymjir
Posts: 727
Joined: Sat Feb 20, 2010 4:05 pm
Location: Munich, Bayern

Re: Worst bugs you had

Post by kazymjir »

Hundreds pointers related problems.

I had many problems like yours REDDemon, it's damn hard to find and debug such things. It's like asking yourself all the time "WTF" and having no idea what is going on :)
stefbuet
Competition winner
Posts: 495
Joined: Sun Dec 09, 2007 4:13 pm
Location: france

Re: Worst bugs you had

Post by stefbuet »

GLSL :
clamp(x,0.00000001, 0.9999999) did not work (no effect).
But no shader compilation fail.
clamp(x,0.0001, 0.9999) did work.
I had this problem for 6 months :D
CuteAlien wrote:coders are well-known creatures of the night
Mel
Competition winner
Posts: 2292
Joined: Wed May 07, 2008 11:40 am
Location: Granada, Spain

Re: Worst bugs you had

Post by Mel »

shaders use very limited precision, anything beyond 5 decimals will give trouble for sure.
"There is nothing truly useless, it always serves as a bad example". Arthur A. Schmitt
CuteAlien
Admin
Posts: 9651
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: Worst bugs you had

Post by CuteAlien »

One of the hardest to find bugs which I've seen several times already is someone (could really be anyone ... like me for example) using references to elements in dynamic arrays (vectors). And then adding some element to the array and forgetting that there are references used. What makes this bug so evil is that it will work up to the moment the array is resized - which might not even happen in simple tests.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Cube_
Posts: 1010
Joined: Mon Oct 24, 2011 10:03 pm
Location: 0x45 61 72 74 68 2c 20 69 6e 20 74 68 65 20 73 6f 6c 20 73 79 73 74 65 6d

Re: Worst bugs you had

Post by Cube_ »

the worst one I had was when (For a lovely little test program I made) I tried making a anti-cheat and anti-piracy system... somehow it didn't really work... and I can't quite describe what happened either (Complicated, ridicioulosly glitchy things happened, then it kind of exploded and CTD'd)
"this is not the bottleneck you are looking for"
Post Reply