When your OS goes crazy - Screenshots

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
User avatar
darkinsanity
Member
Member
Posts: 45
Joined: Wed Sep 17, 2008 3:59 am
Location: Germany

Re: When your OS goes crazy - Screenshots

Post by darkinsanity »

Finally, I also have something to show.
In the last 2 days, I finished paging in my kernel and tried to 1:1 map the first GB of RAM.
And this is how it looks like if your PMM gives away the video-memory:
Image
It was a FreeBASIC-specific rounding issue in my mark_used function, which lead to a wrong array index to my bitmap. Without that happening, finding that bug would have been really nasty ;)
User avatar
Jezze
Member
Member
Posts: 395
Joined: Thu Jul 26, 2007 1:53 am
Libera.chat IRC: jfu
Contact:

Re: When your OS goes crazy - Screenshots

Post by Jezze »

That looks very simular to jrepan's visual bug on page 5.
Fudge - Simplicity, clarity and speed.
http://github.com/Jezze/fudge/
User avatar
darkinsanity
Member
Member
Posts: 45
Joined: Wed Sep 17, 2008 3:59 am
Location: Germany

Re: When your OS goes crazy - Screenshots

Post by darkinsanity »

Yeah, it does. Maybe his paging code also had overwritten the video memory ;)
However, my problem was that I used "/" for a division. In FreeBASIC, this gives me a float, and when I put a float into an integer, FreeBASIC rounds the value. So I got 5.75 rounded up to 6, which resulted in wrong array access. Using "\" performs an integer division and the output is 5. I was very confused when I compared the behavior of FreeBASIC and C when using "/" at first ;)

death2all's screenshot also looks very similar, his code also put page tables in the video RAM ^^
CWood
Member
Member
Posts: 127
Joined: Sun Jun 20, 2010 1:21 pm

Re: When your OS goes crazy - Screenshots

Post by CWood »

haha common error on here, as it seems ;) perhaps a mention in the wiki:
DON'T PUT PAGE TABLES IN GMEM!!!!
One time, I even managed it in 1024*768*32 mode, back when I was in my old (borked up) kernel, but I lost the screeny :'( not to worry. I might break my kernel when i go to GMode just to see what happens :) (on a backup copy, ofc)
User avatar
GAT
Member
Member
Posts: 75
Joined: Wed Nov 30, 2011 9:51 pm
Contact:

Re: When your OS goes crazy - Screenshots

Post by GAT »

crash.GIF
crash.GIF (5.74 KiB) Viewed 7259 times
Also works as an error handler!
d3: virtualizing kernel in progress
https://github.com/WizardOfHaas/d3/
iON
Posts: 20
Joined: Fri Sep 09, 2011 4:09 pm

Re: When your OS goes crazy - Screenshots

Post by iON »

don't know why... I was just reminded of the thread by this c error!
i must need to switch modes somehow,but forgot to because i wrote text-bode bits instead!

:D :D

(i haven't been working on it for a while,actually. got back a day or 2 and now i'm doing relativly good.except this!)
lol,c-based kernel is feelin' happy about my code!
lol,c-based kernel is feelin' happy about my code!
Synon
Member
Member
Posts: 169
Joined: Sun Sep 06, 2009 3:54 am
Location: Brighton, United Kingdom

Re: When your OS goes crazy - Screenshots

Post by Synon »

darkinsanity wrote:However, my problem was that I used "/" for a division. In FreeBASIC, this gives me a float, and when I put a float into an integer, FreeBASIC rounds the value. So I got 5.75 rounded up to 6, which resulted in wrong array access. Using "\" performs an integer division and the output is 5. I was very confused when I compared the behavior of FreeBASIC and C when using "/" at first ;)
This reminded me of a European Space Agency rocket called the Ariane 5, which had some code to correct the rocket's angle of trajectory. 40 seconds into the flight that code decides to convert a 64-bit float into a 16-bit signed integer, which, as integers are wont to do when you try to put too much data in them, overflowed. The rocket decided it was facing the wrong direction, so it aimed itself at the ground. Thankfully it was unmanned, and they had had the forethought to put a self-destruct system onboard, so they just blew it up. But if that had actually reached the ground it could have been catastrophic -- I read somewhere that if a fully-fuelled Saturn V rocket had exploded it would have been like a small nuclear bomb. Obviously the Ariane 5 is not the same size as a Saturn V but it's still basically a big tube filled with explosive chemicals.
User avatar
turdus
Member
Member
Posts: 496
Joined: Tue Feb 08, 2011 1:58 pm

Re: When your OS goes crazy - Screenshots

Post by turdus »

Synon wrote:This reminded me of a European Space Agency rocket called the Ariane 5, which had some code to correct the rocket's angle of trajectory. 40 seconds into the flight that code decides to convert a 64-bit float into a 16-bit signed integer, which, as integers are wont to do when you try to put too much data in them, overflowed. The rocket decided it was facing the wrong direction, so it aimed itself at the ground. Thankfully it was unmanned, and they had had the forethought to put a self-destruct system onboard, so they just blew it up. But if that had actually reached the ground it could have been catastrophic -- I read somewhere that if a fully-fuelled Saturn V rocket had exploded it would have been like a small nuclear bomb. Obviously the Ariane 5 is not the same size as a Saturn V but it's still basically a big tube filled with explosive chemicals.
Not exactly, nobody wanted to blew the rocket up. What truly happened is this: after the overflow, on board system core dumped the memory and sent it back to the main control centre on the ground. The computer there examined the input and said, hey what's that? the confirmation code for self-destruct? fine...
User avatar
thepowersgang
Member
Member
Posts: 734
Joined: Tue Dec 25, 2007 6:03 am
Libera.chat IRC: thePowersGang
Location: Perth, Western Australia
Contact:

Re: When your OS goes crazy - Screenshots

Post by thepowersgang »

My OS has had "support" for swapping back to B8000 text mode when it kernel panics for a while... but I never really debugged it (no real need), so it causes some interesting effects when the OS crashes. However, this one really took the cake :)

It's from it crashing while running the GUI, blowing the GUI pixels up and treating them as characters it seems.
Attachments
20120115-AcessCrash-GUIv2.png
Kernel Development, It's the brain surgery of programming.
Acess2 OS (c) | Tifflin OS (rust) | mrustc - Rust compiler
Currently Working on: mrustc
jal
Member
Member
Posts: 1385
Joined: Wed Oct 31, 2007 9:09 am

Re: When your OS goes crazy - Screenshots

Post by jal »

turdus wrote:What truly happened is this
Not sure if you're trying to be funny. Read the full account here (pdf).


JAL
User avatar
Solar
Member
Member
Posts: 7615
Joined: Thu Nov 16, 2006 12:01 pm
Location: Germany
Contact:

Re: When your OS goes crazy - Screenshots

Post by Solar »

jal wrote:Read the full account here (pdf).
Really recommended reading. No-one really royally screwed up. In the end and at the core of it, the fault was re-using Ariane 4 parts without re-testing them to Ariane 5 specs. Plus a couple of bogus decisions on error handling.

Teaches you to think further than just fulfilling the contract. Oh, and document, document, document your assumptions.
Every good solution is obvious once you've found it.
User avatar
GAT
Member
Member
Posts: 75
Joined: Wed Nov 30, 2011 9:51 pm
Contact:

Re: When your OS goes crazy - Screenshots

Post by GAT »

Error occurred in GUI:
windErr.GIF
windErr.GIF (10.29 KiB) Viewed 6469 times
Shouldn't of swapped display pages...
d3: virtualizing kernel in progress
https://github.com/WizardOfHaas/d3/
jal
Member
Member
Posts: 1385
Joined: Wed Oct 31, 2007 9:09 am

Re: When your OS goes crazy - Screenshots

Post by jal »

GAT wrote:Error occurred in GUI:
Looks neat, do you have screenshots of the GUI in normal operation?


JAL
User avatar
GAT
Member
Member
Posts: 75
Joined: Wed Nov 30, 2011 9:51 pm
Contact:

Re: When your OS goes crazy - Screenshots

Post by GAT »

Yeah!
Here is what is should look like:
wind2.GIF
wind2.GIF (10.77 KiB) Viewed 7091 times
d3: virtualizing kernel in progress
https://github.com/WizardOfHaas/d3/
jal
Member
Member
Posts: 1385
Joined: Wed Oct 31, 2007 9:09 am

Re: When your OS goes crazy - Screenshots

Post by jal »

GAT wrote:Here is what is should look like
Deliciously old-skool!


JAL
Post Reply