Jump to content


Strange Bugs


  • You cannot reply to this topic
4 replies to this topic

#1 Nils Pipenbrinck

    Senior Member

  • Members
  • PipPipPipPip
  • 597 posts

Posted 23 September 2007 - 07:38 PM

Something strange happened last friday:

I was refactoring a piece of code that initializes some hardware device. While reading the code I've noticed that something wasn't quite correct. I was writing a wrong values into a register.

Nevertheless the code was working fine for several month now, so I just wrote a little wtf-comment and planed to investigate it later.

The next time run my program to test the refactoring the initialization failed. That has never ever happend before. The code was stable for month. I did a rollback to make sure I haven't done anything stupid in my changes, but the initialization still failed. Even old executables that have the code failed.

Fixing the bug was easy: I just wrote the correct value into the register and all was nice and dandy again.

That was a scary experience. 100% Twilight Zone. This bug was in there all the time, and it was near to impossible that the code ever worked but it never caused a problem - until the very moment when I saw it in the sourcecode.

I knew that others had such bugs before: Things that are simply wrong but work fine until you are aware of them. They even have a name: Schrödingbugs

http://en.wikipedia....g#Schroedinbugs


Has something like this happened to you?

Nils
My music: http://myspace.com/planetarchh <-- my music

My stuff: torus.untergrund.net <-- some diy electronic stuff and more.

#2 Dim_Yimma_H

    Member

  • Members
  • PipPip
  • 49 posts

Posted 23 September 2007 - 08:34 PM

Stuff like that is scary, horror. I haven't had bugs exactly like that, but used an SDK for Symbian OS applications where project files were sometimes randomly missed in the linking process, so updates could be silently incomplete. A complete rebuild fixed that.

For an IDE-related one...

Some weeks ago I was coding user interface menus, and the application code was getting really big, and suddenly VC++ 2005 caused me to question my sanity. Basically I had hidden and shown some member functions by clicking the "-" and "+" box in the code view, and when I started to edit one of the functions it hid automatically! I manually showed it again and it repeatedly hid itself after a quite random time lapse (sometimes when I just started editing a line, or before). :blink:

Also, sometimes the function heads transform into blank characters for a few seconds, and then restores back, like in the picture below.

Posted Image

Nils Pipenbrinck said:

Even old executables that have the code failed.
Had those executables been executed before?

#3 Nils Pipenbrinck

    Senior Member

  • Members
  • PipPipPipPip
  • 597 posts

Posted 23 September 2007 - 08:56 PM

Dim_Yimma_H said:

Also, sometimes the function heads transform into blank characters for a few seconds, and then restores back, like in the picture below.

Oh - I know this bug. It's an annoying one. Usually it dissapears the next time you undo something.

It does not happen if you use a non-unicode font for the source-view btw.

Dim_Yimma_H said:

Had those executables been executed before?

Yes - I've done benchmarks the day before, and I've executed the same binaries. What's even more strange is that I'm working on an embedded system, and there is no OS or harddisk that might store things. Each time I hit reset it will be initialized and fresh as it comes directly from the factory.

I fixed the bug friday night. Tomorrow my workmates and my customers will still have the old code, and they will execute it. If suddenly the code starts to fail like it did on my machine I will buy one of those "I want to belive" posters and hang it into my office.

Nils
My music: http://myspace.com/planetarchh <-- my music

My stuff: torus.untergrund.net <-- some diy electronic stuff and more.

#4 Dim_Yimma_H

    Member

  • Members
  • PipPip
  • 49 posts

Posted 23 September 2007 - 09:43 PM

:lol:
Let's hope it goes well. Though, just imagine the extreme happiness that could occur if you happened to find out what caused it after all.

Nils Pipenbrinck said:

Oh - I know this bug. It's an annoying one. Usually it dissapears the next time you undo something.

It does not happen if you use a non-unicode font for the source-view btw.
That's useful to know, thanks!

#5 anubis

    Senior Member

  • Members
  • PipPipPipPip
  • 2225 posts

Posted 26 September 2007 - 12:42 AM

In a university project I did we wrote an operating system for the A380 airbus according to an avionics standard. The special feature was that we based it on the Linux kernel and in that way made airplane applications runnable on standard pc equipment.

During that time we had one or two really strange freak events were the whole system would just crash. In the end all was linked to concurrency issues, that would produce a bug in a totally unlikely event. Still... seeing as it happened a few times, I can now see, why there are so many failsafe systems in airplanes :)
If Prolog is the answer, what is the question ?





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users