A Very Aggressive Hopscotch Code Bug

hopscotchbug

#1

This topic concerns the most unusual, aggressive and reproducible bug that I have so far discovered using Hopscotch. I want to describe it and to invite others to share whether they've encountered the same thing.

It does things like this:

to the Hopscotch editor. No, I did not Photoshop this. In fact, this is an image taken with a computer webcam, because, most of the time, this bug disables the camera on my iPad, making it almost impossible to ever get a screen shot.

It gets worse. After running the code I wrote that causes the melt-down, the iPad display is often scrambled. Let me show you. These are the icons on my iPad home screen, after running my code:

And it gets even worse. Even after I turn off the iPad, the effect persists sometimes - however, thankfully, not always. This is my password screen after running the offending Hopscotch code:

I have been trying to exterminate this bug for the last couple of days, without luck. Normally, the fix is to just reset the iPad. There's a bit more I could share, and I may publish the offending code and ask for your help to reproduce/verify/understand what is going on. I have hesitated to do so, because I don't want to upset the curious and unwary.

More on this later...

At this point, I just want to ask: Have you ever seen this effect on your iPad from running Hopscotch?

Thanks, guys...


#2

WOAH>>>WAT?
what??


#3

I have never seen that but it seems really bad...
Does it only occur after Hopscotch?


#4

Yes. And only when I run a specific piece of code that I've created in it.


#5

What I find strangest is your background/wallpaper doesn't seem warped at all...


#6

Yeah, and even stranger, certain parts of the display aren't affected AT ALL. That is, some parts of the image look perfectly fine, right next to the garbled ones. Images, text, there's no apparent rule to govern it.


#7

And it disables the camera...?

Weird. Instead of publishing, maybe type out the code on the forum to see if it is the code itself.


#8

That's a really good idea! You could build it from the ground up. Yeah. That way, I don't risk accidentally causing a Greek tragedy at home for some nice kid who innocently clicks on my project and turns his display to mush. It'll take some work, but I guess it's worth it...

Another workaround is that I could add some up-front explanation and a delay until someone confirms by tapping a button that they actually want to run the section of the code that causes all of the trouble, risking the need for a hard reset or whatever. That might be even more elegant. Let me have a look...


#9

First, though, let me kind of describe what the code does. The idea was to make a grid of clone dots whose size (or transparency or whatever) is made to vary with the distance from some favored point. So, like, you could touch the screen in a spot and the size of the dots near to the point where you touch would be larger, and those further away would get smaller with the square of the distance.

So, start with a grid, like this:

made out of clones.

Originally, I made it so that the screen location of interest followed "last touch x" and "last touch y". Later, I decided to let a blue ball bounce around the screen to cause the dynamics with the dots. So, using the latter scheme, you might end up with something like this:

and this:

as the ball moves.

And, for a while, it works just fine. The more clone dots, of course, the more laggy. But, no matter how many points you choose to have on the screen (it's easy to change and auto-scaling and auto-spacing), eventually, the points start to distort and to develop lines through them. I couldn't get a screen shot of that. By that time, my camera gets disabled.

So, is this even remotely interesting to anyone to try to diagnose?


#10

1) Your comment before that made me think of a small child crying as if they dropped their ice cream. Thanks for that.

2) That makes zero sense why that would do that. The lines and distortion is weird, but the disabling of the camera is weirder. Does it lag at all, or any other things? Edit: reread, so it does lag with more dots..hm..


#11

Another good question.

The speed of execution is all over the map. That's one of the indicators we have that something is up with a piece of Hopsctoch code. Especially on my doggone iPad2. I really have to work hard to optimize for speed (to the extent that it can even be done). So, I am sensitive to changes in speed. I can tell that Hopscotch is getting ready to fly into a conniption fit, when stuff starts getting laggy. And yes, it does sometimes get really laggy. The blue ball slows down. Other times, it's quite fast.

The complicating factor, I have to admit, is that I can't be sure that all of this isn't caused by the activity function of Hopscotch, since I had another do-nothing artsy widget recently put on "trending" or "featured", and I started getting a lot of those green dots on the lightning bolt. Right? So, when "activity" updates on Hopscotch, sometimes my codes also start acting-out. I can't be sure that isn't a factor here.

But, yeah! Isn't it so STRANGE that this can disable my camera? And even hose my login screen? Not cool! Ok... so maybe a little cool. I kinda like mysteries.


#12

Interesting.

Officially deemed Google useless. Apparently apps distorting the screen is unusual compared to clumsy people damaging their device.

Yeah, with the new people Featured and Trending can cause the Activity to bug out...a lot. Another reason why publishing may be beneficial, but it's up to you.

I'll look more into it.


#13
  1. that project is soooo cool!
  2. how can activity mess up hopscotch... COMPLETELY?
  3. do you have to restart the ipad COMPLETELY?
  4. It makes no sense! why would it mush up EVERYTHING? i mean... if it was just on hopscotch it would make more sense, but it spreads to EVERYTHING, and some things just don't get disorded
  5. does it happen with a lot of projects, and not just this one?

#14

Thanks for your interest, here.

1. Well, the project would be cool, if I could just finish it without all this monkey business. :monkey_face:
2. We discovered, a while back, that the "activity" thingy does sort of distract the hopscotch app. After all, our "programs" aren't really programs in the full sense. They are just us asking the app to do things in a certain way and order. Our *code" has to compete with everything else that the app has going on.
3. Sometimes, yes, I do have to completely restart. That's a hard re-boot. Other times, it just clears-up, if I shut-down Hopscotch or (get this!) open the iPad :camera: app. Erm.. yeah.
4. Agreed. I would not have expected this to be able to reach its tentacles out into my icons and login screen. But it does. So, that's why I am calling it "aggressive."
5. No, this is the only project I have that can cause such widespread mayhem. There are other anomalous things that happen, now and then. And people have been reporting them. But this...? This takes the cake.


#15

have you emailed the hopscotch tea? :tea:


#16

I wonder if it'd vary for different devices. Most likely, but I'm not sure...


#17

No. I haven't. Should I?

I feel like they get hounded so much with every little blister, splinter and toothache on the forum. I don't want to add to that, unless doing so will be helpful. I've talked with them about other things through email and even over the phone, and they're so kind! But I can tell, based on the interval between my notes sent to them and the replies I've seen, that they have a lot on their plates. I was hoping that we could actually help them out by getting our heads around this, seeing how widespread, how much of an issue it really is and, possibly, helping to improve the app. Wouldn't that be great?

Maybe I should tag someone. But whom? Liza told me she's not deeply into the tech side of things. And she's getting pinged by kids on here, every single day. I haven't seen much of Ian or Alish lately on the forum. I'm sure they've got stuff in the works. And Rodrigo? Maybe he's our man for this. I don't know. First of all, it makes sense and feels right for me to find out whether it's really much of an issue, or if it's just a problem suffered by people like me with iPads manufactured during the middle Pleistocene era.


#18

Rodrigo's more of a designer, so I doubt it.
I don't know. Most of our tech-y members of the Hopscotch Team (such as awesomeonion, thomas, and others I am forgetting) are nearly never on.


#19

wut the... i have never seen this this is weird


#20

I can imagine if you published this extra glitcy project that someone would make 100's of remixes to deliberately wreck ppls ipads when they play.
I think tou should email the Hopscotch team with pics of your code so they can make sure no one else can do this deliberately in future.