Canvas Renderer

Canvas Renderer

202k Downloads

Dynocaps repeatable crash

biom4st3r opened this issue ยท 3 comments

commented

When trying to render a dynocap >= 10x10x10 will reliable "crash" with a exit code -1073741819 and unreliable will give a JVM crash with larger caps(50x50x50)
hs_err_pid15480.log.
To reproduce:

  1. Launch minecraft with canvas, dynocaps, and fapi
  2. give yourself a dynocap:basiccap
  3. crouch and right click to open the gui and make the size >=10x10x10
  4. find an area that will fully/mostly fill that cap and right click
  5. exit code.

normally it would then render a translucent preview of the cap's contents.
Feel free to @biom4st3r with any questions in the discords

I use a RenderContext to collect the vertex data from the all blocks captured by the Dynocap
com.biom4st3r.dynocaps.rendering.AgnosticRenderContext;
All block parsing that calls the RenderContext is in:
com.biom4st3r.dynocaps.rendering.DynocapRenderer;
https://gitlab.com/biom4st3r/dynocaps/-/tree/1.5.4-pre2/src/main/java/com/biom4st3r/dynocaps/rendering

commented

I've finally got around to looking at Dynocaps and have a couple observations:

  1. I see you started using the experimental FREX WorldEvent hook, which is cool, but then I removed it in favor of a separate library/Fabric PR and thus broke Dynocaps for any newer version of FREX that didn't have the old events. Sorry about that. My bad.

  2. I've put those events back! They are deprecated, but at least Dynocaps won't crash with FREX 4.2.181 or later. I'll leave them there until 1.17 or until I'm sure nobody else is using them. But I recommend you remove the dependency on FREX WorldEvent ASAP, because...

  3. Sadly, the WORLD_RENDER_FIRST event that is currently subscribed can never work for your purposes because it fires before the framebuffer is cleared. Anything it may be doing is obliterated. And Canvas doesn't use the vanilla vertex collectors (or at least doesn't any more) so if the thought was to pre-position your vertex data there that won't work.

  4. The event that does what you need would be WorldRenderEvents.AFTER_ENTITIES in the new frex-events library. However I am PRing an equivalent set of events into Fabric API so you may prefer to wait til then.

  5. I've made Dynocaps work with Canvas for now by adding a subscriber on your behalf that calls BoxRenderer.render() from WorldRenderEvents.AFTER_ENITIES via a lovely reflection hack. This means your box renderer gets called twice, and the first time it runs the output is lost to the void.

Regarding the original defect report, I'm unable to reproduce the problem. I'm able to capture and place areas up to 15x15x15. The areas render correctly when I view the preview by shift-right-clicking.

If there's supposed to be an in-world block preview I'm not seeing it, even when Canvas is not running. I only see the outline box.

Are you still observing the reported problem?

commented

I've switched my stuff over to the new fapi events(thanks for those). I also tested and I don't get the JVM crashes anymore, so this is resolved. Thanks for all your hard work!

commented

Thank you for the detailed report. Will try to make time for it this weekend.