Set Text causes "Whomp"


#1

@Liza @Rodrigo @awesomeonion @t1_hopscotch

iOS version 3.17.0
Hopscotch Version 39, Player Version cb43565

Bug: Putting a Set Text block in a repeating loop (repeat forever or when 7=7) causes a "Whomp" in a consistent amount of time.

Suggested Prioritization: High
Rationale: Most games use a Set Text to display scores. Set Text is also used in this fashion to have visibility of values for troubleshooting. A significant number of users and projects will be affected.

This is a bug I reported during the last beta test period (http://forum.gethopscotch.com/t/new-hopscotch-beta-5-19-17/35261/99?u=thinbuffalo), but now I've looked more into it as it's really a hassle. I did a bunch of tests and found the following correlations. The amount of time to "Whomp" correlates to:

  • How often the Set Text block is executed
  • Whether the value is an integer or decimal
  • The number of objects concurrently running a Set Text loop (decimal values only, does not correlate to the number of objects if the values are integers)

Might there be a memory leak?

Example code to cause "Whomp" in about 60 seconds

To see if it was the Set Text or Set X, I also tried it this way which also causes "Whomp" in about 60 sec

Raw Test Data

This was the test data & configuration notes. Rather than trying to format all of this so it was easily understandable, I just summarized in the aforementioned correlations. The values are time until the "Whomp" occurred.

Rand X & x^2 (this means 2 objects. One setting X & the other setting X^2)
32
35
35
34


Rand X^2
36
35
37
36
37


Rand X (1st example)
59
62
63


Rand X & x^2
34
34
34
=====
New project
Rand X (1st example)
60
68
64


no chg x
(No womp)


X incr 1 (2nd example)
64
64
66


X incr 1
X mod 2 = 1 update
156
157
158


X incr 1
wait 0 update
154
161
162


X incr 1
Set 3 obj
64
64
68


X incr 1
Set x 3 obj
64
63
65


X incr 1
X, x*2, x/2
37
37
37


X,y,z incr 1
67
67
67


X,y,z incr 1
X, y*2, z/2
32
32
31


X,y,z incr 1
Sqrt X, y*2, z/2
20
23
23


X incr 1
sqrt x
33
33
32


White screen glitch
3D Car Simulator- Released (by JojoDude)
Blanking out screen bug
My Drafts aren't loading
#2

That seems like a horrible bug

Did it happen in any earlier versions of Hopscotch? Earlier than the previous version?


#3

No, it only happens in the most recent version (iOS version 3.17.0)


#4

Oh okay


#5

This is a clear bug. My iPad can't even load drafts in the latest HS version so. I can't try it out. I have to code the project with this editor (that I am more familiar with):


After I have done that, I need to go into my iPad that has the newest HS version and if I do that, it will load the draft from the "draft" section correctly.


#6

Bump.

@Liza @awesomeonion @Rodrigo

Over 6 months has passed. The only change is that the screen goes blank instead of displaying the whomp message.

With all due respect, I don’t understand how the addition of new features like the image drawing pad (with 3 pen widths & a limited color pallet?) gets prioritized over fixing bugs that significantly detract from the average user’s experience.

I understand the business case for continuous improvement & attracting new users/subscribers. But just about every single day I see Hops complaining about their projects going blank. I obviously have no idea what sort of retention ratios you’re getting from the subscribers for any given amount of time, but I have to imagine subscribers are highly unlikely to continue paying for an app that frustrates them with obvious bugs.

I only write this (intended as constructive) criticism as I want to see Hopscotch be successful. I do think the image drawing pad is a step in the right direction as the subscription, for the relatively high cost, needs to provide additional value (adding global and private cloud variables would be another nice touch). However, IMHO major bugs have to be addressed with the utmost expediency as they’re discovered to mitigate atrophy of the subscription user base. Fixing the “file size bug” was a big one. Thank you for that. Now that bugs that cause the screen to go blank and, occasionally, objects to be missing need to be addressed.


My Drafts aren't loading
#7

Hmmmm interesting. Let me try.


#8

The bug is non existent for me. I copied your code and the text kept updating. Maybe it is because of your version of your iPad.


#9

Thanks Thinbuffalo.

Hopscotch team,
This bug is approaching many of us and at any simple circumstances as such for an example being either an overload of Unicode text usage or as Thinbuffalo mentioned the crash with variables displayed in a repeat forever loop. I did send an email regarding this exact issue which is disabling the continuation of my project which has been worked on for now over a month.

For how I see this app, I am perfectly okay with the editor and current resources available for hopscotchers to use because coding is still possible, but what is disturbing is the bugs causing such issues.

@HopscotchRemixer unfortunately I am also experiencing the bug and I am using a modern iPad Air 2 kept in good nick.

Unfortunately the game I had in mind cannot be as good as I planned it. To my disadvantage shortcuts will be a necessity as well as harsh sacrifices destroying the mood and expression I tried incooperating to make it catchy for hopscotchers.


#10

Ok, I didn’t check it out for 60 seconds but I will do that


#11

Weird, I went back into my test project and then the womp error occurred, even when a I changed no code, and it worked before. I guess this is a problem. Especially since my next game includes money and the variable needs to be constantly updated.


#12

A big one. So I wonder if I edit the scoring system in my project, maybe this won’t happen?


#13

Weird, IDK, I am not that experienced what happens in the background of all this coding, but a I can imagine that when you keep updating a continuously updating variable it can’t keep track of both of them.


#14

A work around is to do something like this

This way, the Set Text is only executed when the value changes. The (self) Value can be what ever else you’re displaying with the text; money, HP, etc


How to code a score
#15

Hey ThinBuffalo,
It’s definitely a goal to reduce the number of whomps. This bug is hard to pin down because it only happens on the device, not my simulator or computer so it’s hard for me to see what is actually happening. We also have to prioritize the bugs that affect the largest number of users and cause the most harm. It seems like there are workarounds for this one.

Til the end of the year I am spending time looking into various player issues so if you have specific reproducible bugs or projects that have problems I will try to look into them.

And I am looking into this one again today, especially to see whether it might be part of a larger problem.


#16

awesomeonion, thank you for the response.

It seems like there are workarounds for this one.

Agreed, for Set Text causing the White Screen of Deāth - for those Hops that know about or can figure out the cause & workaround for themselves.

Just purely from speculation I had been wondering if this was related to a bigger picture problem, as you said, since there other causes of the WSD (formerly Whomp) and “missing objects” that don’t seem associated with Set Text. Set Text is just the only repeatable cause I’ve found.

I don’t personally find the issue to be a significant impediment, but I do see a significant number of related complaints.


#17

Can you link me to the related complaints on the forum?


#18

Yeah I did spend a good 2 months on this project… I just bumped one of my older topics.

I tried following Thinbuffalo’s theory on removing all the set texts inside a loop and there is no difference in performance or FPS but the white screen is popping up less, but still is popping up. He found a soloution to the set text but it’s a temporary fix and many hops who would have the same issue as me may not see this theory suggested by Thinbuffalo.

I need my project to be fixed. I sent an email 2 days ago…


#19

Ah, I see. So a lot of these are general performance/memory issues once a project gets really complicated, not necessarily the set text issue.

I’m sorry, I know this is really frustrating to you, it’s frustrating to me too! I periodically come back to these issues and see what can be done to make them better. It’s hard because there will always be some performance limitation just based on the device you are using. There’s a lot of room for us to improve on that, but it’s something programmers have to deal with no matter what the platform!

As for the workarounds for beginners vs advanced users, I think that a lot of this stuff beginners never encounter because their projects are not complex enough.

Once you are advanced enough you can start to think about what kind of code you can write that will make your games perform better. It’s actually the same problem I face writing the Hopscotch code–there are many ways I could write the same thing. I need to be cognizant of how many objects are in the screen, how many actions are happening in each frame, and how big of images I’m trying to upload. All of those things affect the performance of the hopscotch app and the performance of your games. But within your game you can also make changes that will make it perform better.

Hope that was clear, didn’t have time to write a shorter response :slight_smile:


#20

Thanks so much! I will go and access my code to simplify it and make it as short as possible, but to my disadvantage Unicode objects that are consisted within a set text cannot be simplified in any way so unfortunately I have to stick with those soloutions which cannot be changed and are to what I believe a massive problem to all of this.