Project Red - Expansion

Project Red - Expansion

31M Downloads

Game breaking bug - ICs get scrambled on game load (test case world for #1448 and #1245)

ccfb3ee765a58cae opened this issue ยท 4 comments

commented

See #1448 and #1245. ProjectRed has had this issue for a while, and 1b4e790 did not fix it.

My hypothesis is that some of the inputs get stuck in random states whenever chunks are loaded.

For the same initial configuration, it seems that it's almost always the same inputs that get screwed up. It seems the output always ends up being something that is possible for the IC to output, which is why I believe it's the inputs that are getting stuck.

In this test case, I have a 4 to 16 decoder that, most of the time, gets its white input turned on, causing the output to be incremented by 1. In rare cases, the right input (toggle output) gets turned off. In order to fix it, you have to invert whatever input is getting stuck, or you can break and replace the IC. But the problem always comes back when the chunks reload.

projectred-ic-scrambling-test-case.zip

Screenshot of test case world

Mod versions:

CodeChickenLib-1.12.2-3.2.2.353-universal.jar
ForgeMultipart-1.12.2-2.6.0.79-universal.jar
MrTJPCore-1.12.2-2.1.4.38-universal.jar
ProjectRed-1.12.2-4.9.2.110-Base.jar
ProjectRed-1.12.2-4.9.2.110-fabrication.jar
ProjectRed-1.12.2-4.9.2.110-integration.jar
ProjectRed-1.12.2-4.9.2.110-lighting.jar
ProjectRed-1.12.2-4.9.2.110-mechanical.jar

This is really frustrating because it makes nearly everything I had planned impossible or impractical.

commented

I did some testing related to this. It seems to be the case that if an IC loads and has a live (internal) wire going into an (internal) bundle cable, then it will scramble every wire that bundle is touching, including the original live wire.

The live wire can come from an internal not gate(pic 1-3), or from an active external signal via input port(pics 4-7), and it can be an otherwise unused wire(pic 3), all reliably cause scrambling.
A scrambled bundle does not affect independent wires(see pic 3).
A bundle touching only a single color wire doesn't appear to scramble(see last two pics).

Stable
1
Unstable
2
Unstable
2b
Stable
3
Unstable with incoming signal.
4
Stable
5
Unstable with incoming signals.
6

Using version cclib 3.2.2.353, forge multipart cbe 2.6.1.81, tjpcore 2.1.4.43, project red core/fab/illum/trans 4.9.3.116

commented

Thanks, that gives me a place to start looking.

commented

Thanks for pointing me in the right place, @kremlar. I've found the source of this bug. Working on a fix.

commented

I have a pull request for the fix but I need some testers to make sure nothing has regressed: #1505

If you need help building the source, I can provide assistance.