lifeviewer bug

Has something gone haywire? Let us know about it!
User avatar
PHPBB12345
Posts: 1122
Joined: August 5th, 2015, 11:55 pm
Contact:

Re: lifeviewer bug

Post by PHPBB12345 » June 2nd, 2024, 2:29 am

rowett wrote:
June 2nd, 2024, 1:20 am
PHPBB12345 wrote:
June 1st, 2024, 12:45 pm
Console error:

Code: Select all

Uncaught TypeError: Failed to construct 'ClipboardItem': Failed to convert value to 'Blob'
Please let me know which browser you are using on which device (including version numbers).
Chrome 94

User avatar
rowett
Moderator
Posts: 3893
Joined: January 31st, 2013, 2:34 am
Location: UK
Contact:

Re: lifeviewer bug

Post by rowett » June 2nd, 2024, 3:45 am

PHPBB12345 wrote:
June 2nd, 2024, 2:29 am
rowett wrote:
June 2nd, 2024, 1:20 am
Please let me know which browser you are using on which device (including version numbers).
Chrome 94
Thanks

Device? (e.g. PC running Windows 11 or iPhone 11)

User avatar
PHPBB12345
Posts: 1122
Joined: August 5th, 2015, 11:55 pm
Contact:

Re: lifeviewer bug

Post by PHPBB12345 » June 2nd, 2024, 3:49 am

rowett wrote:
June 2nd, 2024, 3:45 am
PHPBB12345 wrote:
June 2nd, 2024, 2:29 am
rowett wrote:
June 2nd, 2024, 1:20 am
Please let me know which browser you are using on which device (including version numbers).
Chrome 94
Thanks

Device? (e.g. PC running Windows 11 or iPhone 11)
Windows 7

User avatar
squareroot12621
Posts: 668
Joined: March 23rd, 2022, 4:53 pm

Re: lifeviewer bug

Post by squareroot12621 » June 3rd, 2024, 10:49 am

How to get the "Could not decode system clipboard" bug:
  1. Make sure that the rule you're using is a) not defined on LifeWiki, and b) is defined as a ruletable/ruletree in your pattern.
  2. Copy the pattern. The clipboard does copy the pattern, but not the ruletable/ruletree. This means that when you...
  3. paste the pattern, LifeViewer can't figure out what the rule is supposed to be, so it errors out.
Test it here:

Code: Select all

x = 3, y = 3, rule = ExampleTable
2o$b2o$bo!
@RULE ExampleTable
@TABLE
n_states:2
neighborhood:Moore
symmetries:permute
0, 1,1,1,0,0,0,0,0, 1
1, 0,0,0,0,0,0,0,0, 0
1, 1,0,0,0,0,0,0,0, 0
1, 1,1,1,1,0,0,0,0, 0
1, 1,1,1,1,1,0,0,0, 0
1, 1,1,1,1,1,1,0,0, 0
1, 1,1,1,1,1,1,1,0, 0
1, 1,1,1,1,1,1,1,1, 0

Code: Select all

x = 3, y = 3, rule = ExampleTree
2o$b2o$bo!
@RULE ExampleTree
@TREE
num_states=2
num_neighbors=8
num_nodes=32
1 0 0
2 0 0
1 0 1
2 0 2
3 1 3
1 1 1
2 2 5
3 3 6
4 4 7
2 5 0
3 6 9
4 7 10
5 8 11
3 9 1
4 10 13
5 11 14
6 12 15
3 1 1
4 13 17
5 14 18
6 15 19
7 16 20
4 17 17
5 18 22
6 19 23
7 20 24
8 21 25
5 22 22
6 23 27
7 24 28
8 25 29
9 26 30

Code: Select all

4b8o$4b8o$4b8o$4b8o$4o8b4o$4o8b4o$4o8b4o$4o8b4o$4o8b4o$4o8b4o$4o8b4o$4o8b4o$4b8o$4b8o$4b8o$4b8o![[ THEME 0 AUTOSTART GPS 8 Z 16 T 1 T 1 Z 19.027 T 2 T 2 Z 22.627 T 3 T 3 Z 26.909 T 4 T 4 Z 32 T 5 T 5 Z 38.055 T 6 T 6 Z 45.255 T 7 T 7 Z 53.817 LOOP 8 ]]

User avatar
rowett
Moderator
Posts: 3893
Joined: January 31st, 2013, 2:34 am
Location: UK
Contact:

Re: lifeviewer bug

Post by rowett » June 5th, 2024, 1:01 pm

squareroot12621 wrote:
June 3rd, 2024, 10:49 am
How to get the "Could not decode system clipboard" bug
Fixed, thanks!

User avatar
PHPBB12345
Posts: 1122
Joined: August 5th, 2015, 11:55 pm
Contact:

Re: lifeviewer bug

Post by PHPBB12345 » June 5th, 2024, 7:38 pm

bug found in Script constructor
test case:

Code: Select all

#C [[ "&<>&amp;&lt;&gt;&amp;lt;&amp;gt;" ]]
x=0,y=0,rule=B3/S23
o!
Last edited by PHPBB12345 on June 17th, 2024, 8:43 am, edited 2 times in total.

User avatar
wirehead
Posts: 269
Joined: June 18th, 2022, 2:37 pm
Location: /dev/full
Contact:

Re: lifeviewer bug

Post by wirehead » June 5th, 2024, 9:42 pm

Just a question for Chris Rowett, why does the Lifeviewer sources still use the old prototype definitions for classes -- e.g.

Code: Select all

function Foo() { ... }
Foo.prototype.bar = function() { ... };
versus the new ES6 class syntax:

Code: Select all

class Foo {
  constructor() { ... }
  bar() { ... }
}
As far as I know, there are automated tools that can back-port the new syntax to the old (maybe it's even built-in to google closure compiler, I haven't read the documentation too thoroughly).
Langton's ant: Can't play the drums, can be taught.

User avatar
rowett
Moderator
Posts: 3893
Joined: January 31st, 2013, 2:34 am
Location: UK
Contact:

Re: lifeviewer bug

Post by rowett » June 6th, 2024, 4:57 am

wirehead wrote:
June 5th, 2024, 9:42 pm
Just a question for Chris Rowett, why does the Lifeviewer sources still use the old prototype definitions for classes
Because when I started the project ES6 wasn’t ratified. Since then I haven’t seen the value in changing.

User avatar
PHPBB12345
Posts: 1122
Joined: August 5th, 2015, 11:55 pm
Contact:

Re: lifeviewer bug

Post by PHPBB12345 » June 6th, 2024, 8:29 pm

Define two functions:

Code: Select all

/** @returns {string} */
function encodeHTML(/** @type {string} */ text) {
	return text.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;");
}
/** @returns {string} */
function decodeHTML(/** @type {string} */ text) {
	return text.replace(/<br *\/?>/gi,"\n").replace(/<.*?>/g,"").replace(/&lt;/gi,"<").replace(/&gt;/gi,">").replace(/&nbsp;/gi," ").replace(/&amp;/gi,"&");
}
Example of using encodeHTML:

Code: Select all

textItem.innerHTML = encodeHTML(textItem.value);
Example of using decodeHTML:

Code: Select all

function cleanPattern(element) {
	var	/** @type {string} */ result = decodeHTML(element.innerHTML);

	// remove space or tab at the beginning of lines
	result = result.replace(/\n[ \t]+/g, "\n").trim();

	// if the result is empty make it a valid pattern
	if (result === "") {
		result = "!";
	}

	// return cleaned string
	return result;
}

iddi01
Posts: 187
Joined: January 24th, 2024, 5:14 am
Location: B3-n/S1e2-a3-e4e

Re: Lifeviewer bugs

Post by iddi01 » June 19th, 2024, 11:17 am

Found a bug: The rulestring StickyX cause the "show in viewer" to disappear from patterns:

Code: Select all

x = 103, y = 97, rule = StickyX
$.A12.A6.A6.A10.A2.3A12.A4.3A18.3A7.A4.A$28.A2.A2.A9.2A11.2A$12.2A18.
A5.2A4.3A8.A3.A.2A19.A8.A$.A8.A.2A11.A9.A3.A5.A13.A11.A26.A$.2A10.A8.
A.2A6.A13.A5.A3.A14.2A6.A5.A$6.A17.2A25.3A6.A2.A10.A4.3A3.A$6.A3.A4.
2A3.A4.2A7.A6.A9.2A22.A$4.A8.A.2A14.A4.A5.A9.2A34.2A.A$2.A11.A5.A10.
2A20.2A5.A.2A10.A10.2A12.A$14.2A13.A12.A17.A2.2A9.A11.A$15.2A7.A11.A
3.A4.2A.2A10.A4.A2.2A2.4A17.A$5.A11.A.A24.A4.A4.A8.A21.A4.A2.A2.A$17.
A2.A2.A6.2A6.A4.A10.A23.2A.A8.2A$17.A5.A5.A2.A10.2A7.A8.A.A24.A$.A3.A
12.A4.2A18.3A12.A6.A4.A17.A5.A$16.A.A6.A2.A12.A2.A3.A.A14.A4.A11.A$4.
A11.2A15.2A9.2A3.3A12.A10.A6.A$5.A3.A3.A10.A6.A12.2A3.4A.A4.A22.A3.A
13.A$9.3A34.A35.2A13.A$4.A2.3A11.2A5.A25.A12.A19.A$15.A.2A4.A19.A.A5.
A10.2A3.A6.A11.3A9.A$15.A10.2A5.3A13.A21.A3.A7.A9.A$26.A6.A42.A4.A.2A
7.2A$21.A.2A2.A5.A4.A11.A4.A.A9.2A4.A15.A4.A$2.A3.A.A18.3A20.A3.2A8.A
8.2A19.A$5.A15.A8.2A15.A26.A16.A.A$8.A10.A8.A.A6.2A9.A13.A16.2A$12.A
15.3A17.A9.A4.A3.A3.2A8.A$3.2A2.A4.2A3.A11.A3.A11.A22.A2.A5.A$5.A4.A
25.A.A6.A13.A8.A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$4.A7.A15.A8.A.A.A8.A20.2A.A4.A11.
A2.A2.2A$4.A8.A8.A6.A29.A6.A9.A17.A4.A$5.A7.2A3.2A3.A3.A6.A12.A31.A
15.A$9.2A19.A3.3A8.A6.A17.A2.3A20.A$5.A.A23.A.4A15.2A12.2A3.A2.4A3.A$
8.A10.A12.2A16.A.A8.A9.2A!
It's not due to a problem with the ruletable or something, it's likely a conflict with the x = n, y = n in the RLE.

If this happens with any rulestring with "x" in them, that would be a kinda serious issue.
Wiki: User:iddi01

I'm making a poll. please contribute.

First gun i constructed:

Code: Select all

x = 69, y = 69, rule = B3-n/S1e2-a3-e4e
2$32b3o$32bobo$32bobo$32b3o27$63b4o$b4o58bo2bo$bo2bo23bo4b2o28b4o$b4o
21bobo$28bo21$35bo$34b3o6$33b3o$33bobo$33bobo$33b3o!

User avatar
rowett
Moderator
Posts: 3893
Joined: January 31st, 2013, 2:34 am
Location: UK
Contact:

Re: Lifeviewer bugs

Post by rowett » June 19th, 2024, 11:58 am

iddi01 wrote:
June 19th, 2024, 11:17 am
Found a bug: The rulestring StickyX cause the "show in viewer" to disappear from patterns:
I can see "Show in Viewer" in your example.

User avatar
b-engine
Posts: 1901
Joined: October 26th, 2023, 4:11 am
Location: Somewhere on earth

Re: LifeViewer bug on mobile devices

Post by b-engine » July 2nd, 2024, 8:21 am

b-engine wrote:
April 4th, 2024, 2:19 am
There's a good chance that you can't use the pan function on mobile (maybe also happens in other touchscreen devices). When you tap somewhere in the viewer window, it seems to be like holding the "cursor".
Screenshot_2024-04-04-14-16-06-42_40deb401b9ffe8e1df2f1cc5ba480b12.jpg
This had frustrated me for a long time, while the bug seems to haven't been noticed by someone else yet.
rowett wrote:
April 9th, 2024, 10:20 am
...
I can't reproduce this.
This also happens on other Android devices, as I confirmed. I don't like it but it's still staying.
If you want to trigger the bug, please use a touchscreen device.
b-rules100th post: 18 November 2023 1000th post: 8 March 2024 10000th post:

User avatar
b-engine
Posts: 1901
Joined: October 26th, 2023, 4:11 am
Location: Somewhere on earth

Re: LifeViewer bug on mobile devices

Post by b-engine » July 5th, 2024, 6:16 am

b-engine wrote:
July 2nd, 2024, 8:21 am
This also happens on other Android devices, as I confirmed. I don't like it but it's still staying.
If you want to trigger the bug, please use a touchscreen device.
Browse the forums for a while and randomly open viewers, until you see at least one not working. If a viewer doesn't work, then all won't work.
b-rules100th post: 18 November 2023 1000th post: 8 March 2024 10000th post:

User avatar
tommyaweosme
Posts: 1096
Joined: January 15th, 2024, 9:37 am
Location: platformer mode
Contact:

Re: lifeviewer bug

Post by tommyaweosme » July 6th, 2024, 3:34 pm

fun fact: lifeviewer does not support 2e or 2i in von neumann. all von neumann rules in lifeviewer have to be totalistic
i can solve a rubix cube in 3 minutes or less with my new speedcube

User avatar
confocaloid
Posts: 3524
Joined: February 8th, 2022, 3:15 pm

Re: lifeviewer bug

Post by confocaloid » July 6th, 2024, 5:39 pm

tommyaweosme wrote:
July 6th, 2024, 3:34 pm
fun fact: lifeviewer does not support 2e or 2i in von neumann. all von neumann rules in lifeviewer have to be totalistic
I think it's not really a bug, but instead a consequence of lack of *any* single commonly agreed notation for non-totalistic isotropic two-state range-1 von Neumann CA. (Perhaps, combined with lack of an obvious reason for implementing any such notation; you only enlarge the rulespace by a factor of 4 by allowing non-totalistic CA while keeping the same neighbourhood.)

Some relevant discussion:
confocaloid wrote:
December 6th, 2023, 6:08 am
Are you looking for a mapping like this (from range-1 von Neumann conditions to sets of Hensel conditions), or the question is about something else?
Edit: added third column for the case with two coexisting universes rotated 45 degrees, where only diagonal neighbours are considered.

Code: Select all

R1 von Neumann condition          Hensel conditions   Rotated (corners only)
----------------------------------------------------------------------------
0 alive neighbours                01c2cn3c4c          01e2ei3e4e
1 alive neighbour                 1e2ka3inyq4ny5e     1c2ka3kajr4jr5c
2 opposite alive neighbours       2i3r4itz5r6i        2n3q4qwz5q6n
2 non-opposite alive neighbours   2e3kaj4kaqw5kaj6e   2c3iny4kait5iny6c
3 alive neighbours                3e4jr5inyq6ka7e     3c4ny5kajr6ka7c
4 alive neighbours                4e5c6cn7c8          4c5e6ei7e8
confocaloid wrote:
December 7th, 2023, 3:45 am
get_Snacked wrote:
December 6th, 2023, 6:35 pm
I'm just looking for whatever letters are used for conditions in R1 VN rulestrings, analogously to R1 Moore.
For 2-state isotropic CA using the range-1 von Neumann neighbourhood, the configuration needs to be specified only when there are two alive neighbours (either two opposite neighbours, or not). I don't remember any established notation to distinguish between these two that would be analogous to Hensel notation.

(There were discussions/proposals for range-2 von Neumann neighbourhood:)
AforAmpere wrote:
February 23rd, 2019, 7:54 pm
We just had a conversation on Discord that might make this a lot easier to use. [...]
bubblegum wrote:
August 26th, 2020, 2:57 am
[...]Alright this thing is complicated.
127:1 B3/S234c User:Confocal/R (isotropic CA, incomplete)
Unlikely events happen.
My silence does not imply agreement, nor indifference. If I disagreed with something in the past, then please do not construe my silence as something that could change that.

User avatar
Banananananan
Posts: 93
Joined: May 5th, 2024, 8:52 pm

Re: lifeviewer bug

Post by Banananananan » July 6th, 2024, 6:22 pm

For some reason sometimes lifeviewer makes the sim stop by increments of 3. When I start, it pauses at 3 ticks. When I start again, it pauses at 6 ticks, and so on.

Code: Select all

x = 42, y = 9, rule = B2-c/S
o15bo$o15bo2$31bo$30bob2obo$29bobo$28bo$28bo$29bobobobobobobo!

User avatar
rowett
Moderator
Posts: 3893
Joined: January 31st, 2013, 2:34 am
Location: UK
Contact:

Re: LifeViewer bug on mobile devices

Post by rowett » July 7th, 2024, 4:27 pm

b-engine wrote:
July 2nd, 2024, 8:21 am
b-engine wrote:
April 4th, 2024, 2:19 am
There's a good chance that you can't use the pan function on mobile (maybe also happens in other touchscreen devices). When you tap somewhere in the viewer window, it seems to be like holding the "cursor".
Screenshot_2024-04-04-14-16-06-42_40deb401b9ffe8e1df2f1cc5ba480b12.jpg
This had frustrated me for a long time, while the bug seems to haven't been noticed by someone else yet.
rowett wrote:
April 9th, 2024, 10:20 am
...
I can't reproduce this.
This also happens on other Android devices, as I confirmed. I don't like it but it's still staying.
If you want to trigger the bug, please use a touchscreen device.
I tried it on an Android device and can't reproduce what you're seeing. Can anyone else reproduce the issue?

User avatar
b-engine
Posts: 1901
Joined: October 26th, 2023, 4:11 am
Location: Somewhere on earth

Re: LifeViewer bug on mobile devices

Post by b-engine » July 7th, 2024, 7:56 pm

rowett wrote:
July 7th, 2024, 4:27 pm
I tried it on an Android device and can't reproduce what you're seeing. Can anyone else reproduce the issue?
Try a few more times, it doesn't occur in every attempt.
b-rules100th post: 18 November 2023 1000th post: 8 March 2024 10000th post:

User avatar
b-engine
Posts: 1901
Joined: October 26th, 2023, 4:11 am
Location: Somewhere on earth

Re: lifeviewer bug

Post by b-engine » Today, 6:27 pm

Why viewer/LV tag makes embedded LifeViewer like this?
Screenshot_20240713_062503_com.android.chrome.jpg
Screenshot_20240713_062503_com.android.chrome.jpg (136.32 KiB) Viewed 11 times
Only works on narrow screen device.
b-rules100th post: 18 November 2023 1000th post: 8 March 2024 10000th post:

Post Reply