mojira.dev
MCPE-14026

Comparator based Analog Memory Circuits lose signal OnGameLoad

Memory cells made with comparators lose their signal state when you close and reopen a world. This is not obvious though, because they are drawn as if they retained their signal state up to any device which measures the signal state such as a repeater or a redstone lamp. The comparators and redstone which comprise the memory cell as well as all redstone leading away from the memory cell continue to appear as if the signal state is still as it was.

I tested the behavior on the Minecraft PC, which, in contrast, retains the signal state as expected.

Linked issues

Attachments

Comments 14

"Relates to" MCPE-13270. I've seen this several times but haven't reported because I couldn't find a reliable way to reproduce this. Upon reloading the world, activated comparators may either

  • Continue to emit power as expected, or

  • Become inactive for a very short time, probably even less than 1 redstone tick, and then activates again (MCPE-13270), or

  • Look visually activated but not actually emit power until they receive a block update.

As far as I know, the third case, reported by this issue, has the lowest probability to happen. I've not tested @unknown's memory cell but will do later.

Jason Welbourne

I was going to say that I have never seen the other two scenarios, but I have a world that may demonstrate all 3 in a way that makes it easier to figure out the circumstances and mechanics of each. Is it ok to post a world zip?

I tested the memory cell and found that the glitch occurs with probability 100%, and block update does not recover the memory cell from the glitched state. So there are actually 4 cases, not 3. And there is a difference between my 3 cases and Jason's cell case: in all of my 3 cases comparators are activated by measuring non-empty containers, and in Jason's case they are activated by powered opaque blocks or redstone dust. (Yes, exactly the same glitch occurs when you replace those opaque blocks with redstone dust.)

Is it ok to post a world zip?

That will surely help but if you can post a screenshot it will be easier to test.

Jason Welbourne

The screenshots are kind of random but I was trying to locate each area that was misbehaving at startup. In this case, the isnt critical. The device starts out in a bugged state, but once it is properly used the first time, everything corrects and stays that way until the game is reloaded again later. There are, however, some builds that I have had to backburner because this issue is keeping me from implementing persistant analog memory short of converting everything to binary for persistence and back into the analog circuit on world load.

A tour of the different issues:

1) At the large displays, on world load, they are always blank, no matter what their state was prior to closing the world.
2) A few seconds after the game is loaded, a pulse comes down the input line turning most of the display on, almost entirely at 15 signal strength, but occasionally i see lines that are 12-14 and there are often lines that are unpowered.
3) The display retains these junk values until the button is pressed to send them correct values.
4) The junk value pulse originates from the circuit behind the control panel with all the item frames and the button
5) Those memory cells reset high on world load vs resetting off on world load like the display. I think this is because of the comparator chain that adds the two item cell values. On world load, the final comparator in that group of 5 is supposed to be outputting (15-Side input). I think comparators dont parse their side for the first ticks after load, so it outputs 15 initially, which sets all of the memory cells to that value, because they can be increased without a reset but not decreased. So they get 15 for atleast 2 ticks and get stuck there. (If it was just 1 tick, they would oscillate in a mixed state) When the button is pressed, they all are forecfully reset before being used to send data, so the issue doesn't propagate beyond the interval between startup and first use.
6) Regardless of what they are set to, the pulse shouldnt be emitted because the whole memory system is gated with another comparator so that all the values can be emitted simultaneously. The side signal should be 15 at startup, and at all times after except for 1 tick some fixed number of ticks after the button is pressed.

So I see comparators in subtraction mode ignoring their side input for some window after startup. It could be because the signal has not been constructed yet, or because they arent yet listening.

Comparators in either mode also seem to lose some ticks at startup, which is sufficient to destabalize a memory cell.

Still affects 0.14.1.

4 more comments
Dr.Awesome4333

I have gotten a block of redstone behind a rcomparator and upon the world loading the comparator was no longer powered by the block of redstone. I jad to remove/place the block again for it to become powered again.

Dr.Awesome4333

Oh and it was 0.15.90.2

Jason Welbourne

Some tentative testing on 0.15.90 build 1 seems to have this issue fully resolved. I was also unable to recreate the issue David mendenhall described.

Dr.Awesome4333

I will just report my issue as a different ticket then if it is not already done so as my bug seams ro be with chunk borders.

SuperGeniusZeb

Appears to be fixed in 0.15.10. (Tested in Windows 10.)

EDIT: I was wrong, it was not fixed in 0.15.10. I was not testing the bug properly. However, I performed a proper test and the bug IS fixed in 0.15.90.8.

Jason Welbourne

(Unassigned)

Confirmed

Phone - Android - LG Nexus 5

Android 6.0.1

redstone_comparator

0.14.0, 0.14.2, 0.14.3, 0.15.0, 0.15.4, 0.15.90.2, 0.15.10

0.15.90.8

Retrieved