Discuss Scratch

natalie
Scratch Team
100+ posts

Breaks when NOT in full screen

MotiB reported this bug – any ideas about what's going on?

MotiB wrote:
When run in the small pane, the random number generator isn't random anymore (!) and the computations of coordinates are occasionally wrong.

http://alpha.scratch.mit.edu/projects/10006177

It is the parity magic program from CS Unplugged. It doesn't work (random, position computation) except on full screen. This is the only one of my 1.4 projects that seems to have serious bugs in 2.0.

Last edited by natalie (Nov. 13, 2012 21:05:48)

mrsteve
Scratcher
100+ posts

Breaks when NOT in full screen

It's not random. I modified the project to put each random number into a list (see here)

I generated a set of random 1's and 2's yet all the stamps were 2's see below:


Some values were 1, yet all the boxes are black (costume 2). So possibly a race condition, not sure don't know the code
mrsteve
Scratcher
100+ posts

Breaks when NOT in full screen

Also if you make a clone of the box instead of stamp you also get odd behavior.
mrsteve
Scratcher
100+ posts

Breaks when NOT in full screen

Well I recreated the same logic by hand (ie: no import and no remix) and it seems may be something happened on the import. I hand checked the code and removed the broadcast (and all the other sprites) from the original and still saw the problem. Also remix's I did experienced the same problem.

Yet when I recreated here the problem does not manifest itself.

So I suspect import caused some issue.

Last edited by mrsteve (Nov. 15, 2012 00:19:06)

natalie
Scratch Team
100+ posts

Breaks when NOT in full screen

Thanks for investigating this, Mr Steve!

Oh, I see what you mean– very strange.

Last edited by natalie (Nov. 15, 2012 18:36:48)

natalie
Scratch Team
100+ posts

Breaks when NOT in full screen

Oh, I think I see – it's a costume rendering problem with that white bitmapped box! If you change the white square to a different image it works. Try it and see! I'll report that bug. Thanks, Mr Steve for recreating it and MotiB for reporting it!
natalie
Scratch Team
100+ posts

Breaks when NOT in full screen

Even if you just add a mark on the white bitmap then it works.
MotiB
Scratcher
3 posts

Breaks when NOT in full screen

natalie
Oh, I think I see – it's a costume rendering problem with that white bitmapped box! If you change the white square to a different image it works. Try it and see! I'll report that bug. Thanks, Mr Steve for recreating it and MotiB for reporting it!

Nice to hear that I didn't make it up .

I also reported that the movement of the wizards was no longer correct. Is that part of the same bug??

Moti
mrsteve
Scratcher
100+ posts

Breaks when NOT in full screen

Motib
I also reported that the movement of the wizards was no longer correct. Is that part of the same bug??

I don't think its the same bug. Can you provide a little more information. How exactly are the wizards supposed to move and what is wrong with the way they do move?

natalie
Scratch Team
100+ posts

Breaks when NOT in full screen

Note: If you show the sprite when stamping then the bug goes away.

The bug is being investigated but in the meantime, you can see here how adding show at the beginning (and then hide at the end) works:
http://alpha.scratch.mit.edu/projects/10006544/#editor
giantredwood
Scratcher
67 posts

Breaks when NOT in full screen

bump

Powered by DjangoBB