Growlith1223 / ArsMagica2

Ars Magica 2 Bug Tracker
65 stars 31 forks source link

Celestial Prism - Crash on Break #381

Open scottosx opened 7 years ago

scottosx commented 7 years ago

Crash when breaking prism in either creative or survival. Maybe related to https://github.com/Growlith1223/ArsMagica2/issues/278

Also, I get extreme FPS drop when Celestial Prism is active.

crash-2017-08-12_18.08.42-client.txt

scottosx commented 7 years ago

I had this crash while breaking a spell export crystal as well. It may be Optifine as detailed in this issue: https://github.com/Growlith1223/ArsMagica2/issues/197

TheIcyOne commented 7 years ago

Could you try it without optifine? I haven't been able to reproduce it.

scottosx commented 7 years ago

I don't crash without Optifine. BTW, using OptiFine 1.10.2_HD_U_E3. The other issues I reference lead me to believe that older versions of OF have an issue too but I could try them. On your end did you try with Optifine?

Here is the problem: Without Optifine my framerate is terrible due to the chunk updating bug with the Lectern. With Optifine it is tolerable.

TheIcyOne commented 7 years ago

Just a hunch, but does this still occur without Packing Tape installed?

scottosx commented 7 years ago

I see why you might think that. What had happened is that I installed Packing Tape after crashing to try another method to move the Celestial Prism by packaging it. It didn't work.

Here is the previous crash log before Packing Tape:

crash-2017-08-12_18.03.23-client.txt

The facing of air seems suspicious.

scottosx commented 7 years ago

Here in the code it is getting EnumFacing from BlockEssenceGenerator? Does that seem right?

https://github.com/Growlith1223/ArsMagica2/blob/ca984ca90210141cca4c5dd6fd5ca05430fb6fec/src/main/java/am2/blocks/render/TileCelestialPrismRenderer.java#L56

TheIcyOne commented 7 years ago

Yeah, it's just using the Essence Generators' shared direction enum rather than having a custom one for the light and neutral generators.

From what I can tell from a proper look at the crash report, Optifine appears to be causing an extra TESR render call when a block is destroyed for some reason. When this render call happens, it checks the blockstate at the position of the now broken prism, which is now air, for a facing value. Since air doesn't have a facing value, a crash occurs. To fix this, it will be necessary to add sanity checks to quite a few renderers, which will have the added impact of reducing FPS somewhat for all users, and will almost certainly take a while to release anyway. In the meantime, you could try updating FoamFix to use a 1.10.2 version, which might make gameplay feasible without optifine.

scottosx commented 7 years ago

Makes sense. I wonder if the sanity check could/should be done on the Optifine side? We could take it up with them. I only fear that most larger mod packs and especially nice resource packs need Optifine.