Resolved!- Map using improper thread

Locked
ProsperCraft
Posts: 94
Joined: Sat Aug 03, 2013 5:22 pm
Contact:

Resolved!- Map using improper thread

Post by ProsperCraft » Sun Feb 25, 2018 8:51 pm

I saw this in console-

https://gist.github.com/ProsperCraft/d5 ... a8c1bb12eb

Asked the sponge devs about it and they said-

mcmonkey - Today at 11:01 AM
that looks like Millenaire is performing risky chunk access calls off the main thread, and Sponge is just reporting it as an error

liach - Today at 11:02 AM
@Goshen he accesses chunks from update thread but accidentally triggers loading from that thread
Last edited by ProsperCraft on Wed Feb 28, 2018 12:18 am, edited 1 time in total.

ProsperCraft
Posts: 94
Joined: Sat Aug 03, 2013 5:22 pm
Contact:

Re: Map using improper thread

Post by ProsperCraft » Sun Feb 25, 2018 9:06 pm

I suspect this may be related to our server crashes-
https://github.com/SpongePowered/Sponge ... ssues/2023

ProsperCraft
Posts: 94
Joined: Sat Aug 03, 2013 5:22 pm
Contact:

Re: Map using improper thread

Post by ProsperCraft » Mon Feb 26, 2018 11:47 pm

My console is just going absolutely nuts about the map updating several times a second off the main thread.

https://gist.github.com/ProsperCraft/5b ... 3370ed3a68

User avatar
Kinniken
Site Admin
Posts: 332
Joined: Thu Jul 21, 2011 4:51 pm

Re: Map using improper thread

Post by Kinniken » Tue Feb 27, 2018 8:35 am

It's not the map from a GUI perspective, it's the village's "knowledge" of the world around it. It's done in a thread to limit TPS impact.

Problems seem to occur when a chunk is not loaded. I'm trying a fix that stops that occurring by blocking access to unloaded chunks from within a thread, and also looking at why this code is running on unloaded chunks in the first place when normally villages are supposed to be either active with all chunks loaded or totally inactive if even one chunk isn't.

User avatar
Kinniken
Site Admin
Posts: 332
Joined: Thu Jul 21, 2011 4:51 pm

Re: Map using improper thread

Post by Kinniken » Tue Feb 27, 2018 10:29 pm

Should be fixed in beta 5. I'd love a confirmation.

ProsperCraft
Posts: 94
Joined: Sat Aug 03, 2013 5:22 pm
Contact:

Re: Map using improper thread

Post by ProsperCraft » Wed Feb 28, 2018 12:17 am

I am no longer having a problem with this, good work!

Locked