/server <stop/restart> command#3219
Conversation
|
i have to say, that i am very unfamiliar with this part of the codebase.(anything with items) main.threadPool.clear(); // <-- this prevents
// leaked user, but should i really be doing this here?
main.items.clearRecipeCachedInventories(); // <-- this removed
// a memory Leak, but should i really be doing this here?if you got better idea, improvements, feel free to review & comment |
Wunka
left a comment
There was a problem hiding this comment.
Command code looks good. I don't know the rest of code so I cannot good review it.
But as restart doesn't work for me my requested change is to make it work
when i did request a review from you, restart wasn't there yet. It also isn't finished yet. main.threadPool.clear();
2.main.threadPool.clear(); does also clear the tasks from the client. Is that a problem? those questions are not only towards you, but also everyone else reviewing this PR |
Those questions can be answered but other people because I have no idea. I have never touched those parts of the codebase (yes I did something with recipes but not that part. It seems #1824 did that).And the pr that fixed the leaked player issue was this: #3019 |
|
I find both of these odd. These are a sign that the server is not cleaned up properly in deinit (see #2293), I'd suggest to address #2293 first, then you should be able to just do deinit here as normally.
This function looks completely broken, it frees entries with the wrong allocator, I'll investigate this, but I think we can just remove it entirely. |
|
ready for review now. |
Co-authored-by: IntegratedQuantum <IntegratedQuantum@users.noreply.github.com>
IntegratedQuantum
left a comment
There was a problem hiding this comment.
Actually it crashes sporadically when I do /server stop in headfull
thread 60237 panic: index out of bounds: index 0, len 0
/home/mint/Downloads/tillpp/src/blocks.zig:700:44: 0x16c7822 in fogDensity (main.zig)
return textureFogData.items[animationData[textureIndices[block.typ][0]].startFrame].fogDensity;
^
/home/mint/Downloads/tillpp/src/renderer.zig:462:32: 0x16c6d1e in render (main.zig)
extractImageDataAndDownsample(playerBlock, playerPos, viewMatrix);
^
/home/mint/Downloads/tillpp/src/renderer.zig:296:15: 0x16b61d3 in renderWorld (main.zig)
Bloom.render(lastWidth, lastHeight, playerBlock, playerPos, game.camera.viewMatrix);
^
/home/mint/Downloads/tillpp/src/renderer.zig:161:13: 0x16b40b6 in render (main.zig)
renderWorld(game.world.?, ambient, game.fog.skyColor, playerPosition);
^
/home/mint/Downloads/tillpp/src/main.zig:620:20: 0x1771b6c in clientMain (main.zig)
renderer.render(game.Player.getEyePosBlocking(), deltaTime);
^
/home/mint/Downloads/tillpp/src/main.zig:531:13: 0x15b11a6 in main (main.zig)
clientMain();
^
/home/mint/Cubyz/compiler/zig/lib/std/start.zig:699:88: 0x15b08ae in callMain (std.zig)
if (fn_info.params[0].type.? == std.process.Init.Minimal) return wrapMain(root.main(.{
^
../sysdeps/nptl/libc_start_call_main.h:58:16: 0x78df6fe29d8f in __libc_start_call_main (../sysdeps/x86/libc-start.c)
../csu/libc-start.c:392:3: 0x78df6fe29e3f in __libc_start_main_impl (../sysdeps/x86/libc-start.c)
???:?:?: 0x1e2c004 in ??? (???)
|
wait found a bug in headless, don't merge |
|
done and tested ! |
|
still crashes (43690 is How about only unloading the assets in headless mode, and giving that responsibility to the client in headfull? |
|
|
|
can you try again? It should work now
|
stops the server
restarts the server
TODO list:
btw. restart and reload are not the same. restart does kick all players except the host, reload doesn't kick any player