Open drzpk opened 4 years ago
Well, I have this same problem, but when I created respond I got was "You probably have mod, that changes chunk loading", that was true, so I give up, but today I checked it with only Stargate Network, malisiscore and OC, and it still happening.
@IlynPayne A tak w ogóle to fajny twój program wybierający.
In your configuration files, under "options:", what do you have I:chunkLoadingRange= set to?
Please try this: http://solder.almuramc.com/downloads/SGCraft-2.0.4-beta-3.jar
It's set to 1, I've never modified it. But you assumed otherwise, hence the beta-3 artifact. Well, I tested it anyway and - surprise, surprise - it didn't work. dialing still gets interrupted.
Please take a look at this issue, especially the code snippets. Mine, called from the Lua shell, doesn't work, while @dallenwilson's does.
I'm making some assumptions as I have no way to test this exactly with your environment. I have not been able to replicate this in my environment but I am not using CC. Looking at how the chunk ticket is created is "SHOULD" keep the gate active.
I need you to give me a thread dump at line 578 of SGCraft.java.
I could create a debug build specifically for you. Talking with another developer we're curious if you're hitting the max chunk ticket threshold. That would cause this issue as well.
Pull down this commit: https://github.com/AlmuraDev/SGCraft/commit/b1937ccf7394b2923dfe47daee6e3ad6995ac828 and compile. Tell me if you're seeing that debug line during dialing.
Actually no, that can't be the issue either because you specifically stated using the DHD works fine.... WTH...
No, this message you've just added didn't show up.
I uploaded the thread dump you asked for (with breakpoint at SGCraft:579, b1937ccf). I also managed to reproduce this error using the world save uploaded below (SGCraft started from Intellij and dependency mods only, no other mods were used). There's an OC setup somewhere around X=33, Y=72, Z=309, just repeat the last command.
Curious. Zidane was thinking the mod to blame would be in the trace, yet SF is in the trace....
If I load this saved world, can you tell me how to tell the computer to dial out?
The Lua shell currently is running in the dialing computer and the last command I entered was sg.dial
, so just like in a "real" shell, pressing arrow up and then enter will execute it.
testing now....
OK, issue confirmed.... working through this.
Please try this: http://solder.almuramc.com/downloads/SGCraft-2.0.4-beta-5.jar
Now gates are working fine, no interruptions whatsoever, thank you.
Thanks goes to you for creating a way for me to perfectly test this. I had researched this previously but could never reproduce it. You're the reason this is fixed for everyone else.
This issue is not fixed with 2.0.4.....
For the record, creating a Forge chunk loader ticker doesn't load the chunks immediately. As such, in your forceChunkRangeOnTicket method, you might want to do a World:getBlockState() in each chunks to force the loading so the rest of mod doesn't have to deal with that mess. Also, it appears the ticket is released and recreated when the gate state is changing. When releasing a ticket, forge may unload the chunks immediately under certain conditions & configurations, causing a whole of issues (memory leak, lag spike and state desynchronization). I suggest to keep existing ticket with its chunks instead of releasing and creating a new ticket.
I think Zidane added an appropriate fix for this. I am including in the 2.0.5 build to be released tonight, give that a try please.
When I'm trying to dial a distant Stargate (on unloaded chunk) using OpenComputers interface, the dialing sequence gets interrupted before a wormhole is established. However, dialing exactly the same address via a DHD ends successfully.
I did some debugging (using the most recent version built from sources) and it turns out that chunk unload event is fired on the chunk I'm dialing to and that interrupts the dialing sequence. I compared code of dialing from DHD and computer interface and there is indeed a difference, I don't know the internals of this mod to pursue this further, though.