Only colorful vertical lines




Only colorful vertical lines

Postby Mixony » 1. Apr 2017, 23:46

got to around 40 minutes in episoed 14 and when I run it I get blue screen drawn and then this
rLmvbor.png
rLmvbor.png (1.82 KiB) Viewed 777 times

Has anyone had this issue before and does anyone know how to solve this.
If code is needed just ask.
Mixony
 
Posts: 24
Joined: 12. Mar 2017, 08:18

by Advertising » 1. Apr 2017, 23:46

Advertising
 

Re: Can't draw the pointer

Postby algorithman » 12. Apr 2017, 13:49

If I remember correctly, you have told me on IRC that it was a problem with signed int <-vs-> unsigned int. Is that right?
User avatar
algorithman
Administrator
 
Posts: 49
Joined: 2. Mar 2017, 11:40

Re: Can't draw the pointer

Postby Mixony » 12. Apr 2017, 15:40

Posted this and it said wait for the moderator to allow or something like that and like hour after I found I put wrong type. uint8_t instead int8_t.
Thanks anyways. :D
Mixony
 
Posts: 24
Joined: 12. Mar 2017, 08:18

Re: Can't draw the pointer

Postby algorithman » 13. Apr 2017, 10:40

Okay, good :-)
so you used int8_t in a loop that looped while the number was smaller than some X (something between 128 and 255) and that is always true for signed int8_t
so the loop never terminated and the screen was never actually drawn (or only the first row or something), right?
User avatar
algorithman
Administrator
 
Posts: 49
Joined: 2. Mar 2017, 11:40

Re: Can't draw the pointer

Postby algorithman » 13. Apr 2017, 10:44

Maybe you had an integer overflow and (because of negative coordinates) have "drawn" outside the screen and corrupted some memory that belongs to the VGA adapter or so...
User avatar
algorithman
Administrator
 
Posts: 49
Joined: 2. Mar 2017, 11:40

Re: Only colorful vertical lines

Postby Mixony » 13. Apr 2017, 11:28

I did
for(uint8_t i=numChildren-1; i>=0;--i)
{

children[i] -> Draw(gc);

}

instead of
for(int8_t i=numChildren-1; i>=0;--i)
{

children[i] -> Draw(gc);

}

so it was always greater or equal to 0 and became infinite loop
Mixony
 
Posts: 24
Joined: 12. Mar 2017, 08:18

Re: Only colorful vertical lines

Postby algorithman » 13. Apr 2017, 12:56

I have made such mistakes also ;)
Thanks for sharing (might help someone else out :-) )
User avatar
algorithman
Administrator
 
Posts: 49
Joined: 2. Mar 2017, 11:40


Return to GUI Framework, Desktop, Windows

Who is online

No registered users

cron