Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GFX box + GFX line ops render nothing and occasionally result in error #104

Closed
PolakAllen opened this issue Jul 24, 2017 · 4 comments
Closed

Comments

@PolakAllen
Copy link

PolakAllen commented Jul 24, 2017

Running a simple setup should hopefully be able to reproduce.

In my setup below, repeat is set to 60 ticks, the sleep before rendering text is 20 ticks (which verifies that rendering does indeed occur). The box and line are never rendered. I wasn't able to determine how often that error occurs, but it's definitely not every cycle, and you should see at least one within a few minutes (playing around with it, it might only occur on Db display)

Occurs in FTB Beyond pack 1.10.2 server

  • rftoolsctrl-1.1x-1.6.8.jar
  • rftools-1.1x-6.01.jar
  • mcjtylib-1.1x-2.3.11.jar

2017-07-23_21 12 06
setup
box
line
processor

@PolakAllen
Copy link
Author

Further investigation about that internal error shows that it's somehow related to having a second processor.

I removed it at some point in my troubleshooting, and stop receiving error messages (not positive that I got 0, but the rate was significantly reduced)

Re-adding my second processor resulted in a burst of error messages on immediate placement, followed by errors at the rate that I had been observing

@PolakAllen
Copy link
Author

I think I found a caching issue that might be causing it:

    @Override
    public void gfxClear(IProgram program, @Nullable String id) {
        if (id == null || id.isEmpty()) {
            gfxOps.clear();
            orderedOps.clear();
        } else {
            gfxOps.remove(id);
            orderedOps = null;
        }
        markDirty();
    }

    public Map<String, GfxOp> getGfxOps() {
        return gfxOps;
    }

    public List<String> getOrderedOps() {
        if (orderedOps == null) {
            sortOps();
        }
        return orderedOps;
    }
    private void sortOps() {
        orderedOps = new ArrayList<>(gfxOps.keySet());
        orderedOps.sort(new Comparator<String>() {
            @Override
            public int compare(String s, String t1) {
                return s.compareTo(t1);
            }
        });
    }

willing to bet if you change gfxOps.clear() to gfxOps = null, the issue will go away

hopefully the issue will resolve itself when readRestorableFromNBT occurs (I'm not sure when that event is).

@McJty
Copy link
Collaborator

McJty commented Jul 24, 2017

Thanks for the investigation . I will check it out when I am back from vacation

@McJty
Copy link
Collaborator

McJty commented Sep 8, 2017

The problem was related but a bit different. I have fixed it for next release

@McJty McJty closed this as completed Sep 8, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants