Erase before Paste

Has something gone haywire? Let us know about it!
Post Reply
User avatar
PkmnQ
Posts: 1018
Joined: September 24th, 2018, 6:35 am
Location: Server antipode

Erase before Paste

Post by PkmnQ » December 13th, 2018, 12:56 am

This has happened sometimes accidentally.
First try to paste an item.
Second, make it get erased by the Maximum Hash Memory.
Third, press paste.

On iOS, this just makes the iPad go "what"
And closes the app.

The easiest way to replicate this:
1. Make a random soup at size 2^4:1.
2. Wait 5 seconds before cancelling.
3. Press the paste button twice as fast as possible.
4. Wait for the pattern to get erased.
How to XSS:

Code: Select all

Function(‘a’+’lert(1)’)()

User avatar
PkmnQ
Posts: 1018
Joined: September 24th, 2018, 6:35 am
Location: Server antipode

Re: Erase before Paste

Post by PkmnQ » January 8th, 2019, 10:01 am

[edits in the original post don't make notifications]
How to XSS:

Code: Select all

Function(‘a’+’lert(1)’)()

User avatar
Andrew
Moderator
Posts: 775
Joined: June 2nd, 2009, 2:08 am
Location: Melbourne, Australia
Contact:

Re: Erase before Paste

Post by Andrew » January 12th, 2019, 11:23 pm

Sorry, but I can't reproduce the above problem. Are you using the latest version (1.2) for iPad? If so please provide more detailed steps (specify which algorithm, rule, what is in the clipboard when you paste, etc).

User avatar
PkmnQ
Posts: 1018
Joined: September 24th, 2018, 6:35 am
Location: Server antipode

Re: Erase before Paste

Post by PkmnQ » January 14th, 2019, 7:17 am

How to better your chances of reproducing:
Instead of 2^4:1 and waiting 5 seconds, use 2^5:1 and wait 20 seconds.
Bring down your maximum hash memory down to 10 MB.
For the pasted object, use a random 1:1 view size soup.

Updated steps:
Copy a 1:1 view size soup.
Increase the view size to 2^5:1.
Create a soup with the view size at 2^5:1.
Cancel 20 seconds in.
Press paste twice.
Wait until everything gets erased.
Press any button apart from "Abort".
The app crashes, but not permanently.
How to XSS:

Code: Select all

Function(‘a’+’lert(1)’)()

User avatar
Andrew
Moderator
Posts: 775
Joined: June 2nd, 2009, 2:08 am
Location: Melbourne, Australia
Contact:

Re: Erase before Paste

Post by Andrew » January 14th, 2019, 7:57 pm

PkmnQ wrote:The app crashes, but not permanently.
Not sure what you mean by this. There are situations where iOS will silently abort an app if tries to allocate memory and there isn't enough free RAM available (eg. due to other apps using lots of memory). Nothing I can do about that. If you plan to use Golly to edit/view large patterns then it's best to quit other apps.

Another case where it might appear that Golly has crashed is if a particular task takes a long time to complete. I don't always show a progress dialog in those situations (eg. a lengthy undo/redo).

Post Reply