Git Product home page Git Product logo

realmtech's People

Contributors

antoniofo avatar fabienchatton avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

Forkers

antoniofo

realmtech's Issues

crash quand on charge une table de craft

Après avoir posser une table de craft à mon point de spawn. J'explore en peut et quand je revient vers le point de spawn, le jeu crash

19:42:08.830 [Tick Thread] ERROR ch.realmtech.server.tick.TickThread -- This uuid has already ben registered: InventoryComponent id: 47894, uuid: 6aaf7f23-2a4c-4e80-add6-c1c1d64ac626
java.lang.IllegalStateException: This uuid has already ben registered: InventoryComponent id: 47894, uuid: 6aaf7f23-2a4c-4e80-add6-c1c1d64ac626
	at ch.realmtech.server.ecs.system.UuidEntityManager.registerEntityIdWithUuid(UuidEntityManager.java:109)
	at ch.realmtech.server.ecs.system.InventoryManager.createCraftingTable(InventoryManager.java:471)
	at ch.realmtech.server.level.cell.CraftingTableEditEntity.lambda$createEntity$0(CraftingTableEditEntity.java:39)
	at ch.realmtech.server.ecs.plugin.server.ExecuteOnContextServer.onCommun(ExecuteOnContextServer.java:29)
	at ch.realmtech.server.level.cell.CraftingTableEditEntity.createEntity(CraftingTableEditEntity.java:39)
	at ch.realmtech.server.serialize.cell.CellSerializerV4.lambda$fromBytes$0(CellSerializerV4.java:74)
	at ch.realmtech.server.ecs.system.MapManager.lambda$newCell$2(MapManager.java:255)
	at java.base/java.util.Optional.ifPresent(Optional.java:178)
	at ch.realmtech.server.ecs.system.MapManager.newCell(MapManager.java:255)
	at ch.realmtech.server.serialize.chunk.ChunkSerializerV9.fromBytes(ChunkSerializerV9.java:49)
	at ch.realmtech.server.serialize.chunk.ChunkSerializerV9.fromBytes(ChunkSerializerV9.java:16)
	at ch.realmtech.server.serialize.AbstractSerializerController.decodeVersionAndBytes(AbstractSerializerController.java:59)
	at ch.realmtech.server.serialize.AbstractSerializerController.decodeApplicationBytes(AbstractSerializerController.java:68)
	at ch.realmtech.server.serialize.AbstractSerializerController.decode(AbstractSerializerController.java:36)
	at ch.realmtech.server.ecs.system.SaveInfManager.readSavedInfChunk(SaveInfManager.java:153)
	at ch.realmtech.server.ecs.system.MapSystemServer.getCacheOrGenerateChunk(MapSystemServer.java:230)
	at ch.realmtech.server.ecs.system.MapSystemServer.end(MapSystemServer.java:124)
	at com.artemis.BaseSystem.process(BaseSystem.java:47)
	at com.artemis.InvocationStrategy.process(InvocationStrategy.java:25)
	at com.artemis.World.process(World.java:385)
	at ch.realmtech.server.ecs.EcsEngineServer.process(EcsEngineServer.java:99)
	at ch.realmtech.server.tick.TickThread.run(TickThread.java:28)

Server spits error when http request went to it

I started a server on port 25565 and i accidently made an http request to it and my console blew me with tons of errors.
this is one of them:
11:39:24.809 [nioEventLoopGroup-3-1] WARN io.netty.channel.DefaultChannelPipeline -- An exceptionCaught() event was fired, and it reached at the tail of the pipeline. It usually means the last handler in the pipeline did not handle the exception. io.netty.handler.codec.DecoderException: java.lang.IndexOutOfBoundsException: readerIndex(68) + length(4) exceeds writerIndex(71): PooledSlicedByteBuf(ridx: 68, widx: 71, cap: 71/71, unwrapped: PooledUnsafeDirectByteBuf(ridx: 72, widx: 674, cap: 2048)) at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:499) at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:290) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:444) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420) at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412) at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:346) at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:333) at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:454) at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:290) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:444) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420) at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412) at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1410) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:440) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420) at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:919) at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:166) at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:788) at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:724) at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:650) at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:562) at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:997) at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) at java.base/java.lang.Thread.run(Thread.java:833) Caused by: java.lang.IndexOutOfBoundsException: readerIndex(68) + length(4) exceeds writerIndex(71): PooledSlicedByteBuf(ridx: 68, widx: 71, cap: 71/71, unwrapped: PooledUnsafeDirectByteBuf(ridx: 72, widx: 674, cap: 2048)) at io.netty.buffer.AbstractByteBuf.checkReadableBytes0(AbstractByteBuf.java:1442) at io.netty.buffer.AbstractByteBuf.readInt(AbstractByteBuf.java:809) at ch.realmtech.server.netty.PacketDecoder.decode(PacketDecoder.java:18) at io.netty.handler.codec.ByteToMessageDecoder.decodeRemovalReentryProtection(ByteToMessageDecoder.java:529) at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:468) ... 24 common frames omitted 11:39:24.811 [nioEventLoopGroup-3-1] ERROR ch.realmtech.server.netty.ServerHandler -- Une erreur est survenue java.lang.IndexOutOfBoundsException: readerIndex(68) + length(4) exceeds writerIndex(71): PooledSlicedByteBuf(ridx: 68, widx: 71, cap: 71/71, unwrapped: PooledUnsafeDirectByteBuf(ridx: 72, widx: 674, cap: 2048)) 11:39:24.814 [nioEventLoopGroup-3-1] ERROR ch.realmtech.server.netty.PacketDecoder -- Une erreur est survenue java.lang.IndexOutOfBoundsException: readerIndex(68) + length(4) exceeds writerIndex(71): PooledSlicedByteBuf(ridx: 68, widx: 71, cap: 71/71, unwrapped: PooledUnsafeDirectByteBuf(ridx: 72, widx: 674, cap: 2048))

i don't think it should throw that many error.

if really needed i added the complete stacktrace
complete_stacktrace.txt

Need a graceful shutdown

When a player is connected to the server. The commande close do not graceful shutdown the server.
exemple

stop
14:40:39.906 [Command Server Cli Thread] INFO ch.realmtech.server.ServerContext -- Saving map...
14:40:39.992 [Command Server Cli Thread] INFO ch.realmtech.server.ecs.EcsEngineServer -- Map saved
14:40:39.992 [Command Server Cli Thread] INFO ch.realmtech.server.ServerContext -- Closing server...
14:40:39.997 [main] INFO ch.realmtech.server.ServerContext -- Saving map...
14:40:39.997 [main] ERROR ch.realmtech.core.game.ecs.ECSEngine -- Cannot invoke "ch.realmtech.server.ecs.system.MapManager.getInfMap()" because the return value of "ch.realmtech.server.ecs.plugin.server.SystemsAdminServer.getMapManager()" is null
java.lang.NullPointerException: Cannot invoke "ch.realmtech.server.ecs.system.MapManager.getInfMap()" because the return value of "ch.realmtech.server.ecs.plugin.server.SystemsAdminServer.getMapManager()" is null
	at ch.realmtech.server.ecs.EcsEngineServer.saveMap(EcsEngineServer.java:113)
	at ch.realmtech.server.ServerContext.save(ServerContext.java:177)
	at ch.realmtech.server.ServerContext.saveAndClose(ServerContext.java:142)
	at ch.realmtech.core.game.netty.ClientConnexionIntern.close(ClientConnexionIntern.java:38)
	at ch.realmtech.core.game.ecs.ECSEngine.dispose(ECSEngine.java:156)
	at ch.realmtech.core.RealmTech.lambda$closeEcs$2(RealmTech.java:347)
	at com.badlogic.gdx.backends.lwjgl3.Lwjgl3Application.loop(Lwjgl3Application.java:209)
	at com.badlogic.gdx.backends.lwjgl3.Lwjgl3Application.<init>(Lwjgl3Application.java:167)
	at ch.realmtech.core.DesktopLauncher.main(DesktopLauncher.java:16)

Server is not standalone

When i built the server with
./gradlew server:dist
and launches it with
java -jar server-1.0.jar
It automatically crashes because it needs the client to create the RealmTechData folder for saving the world
here is the stacktrace i got

16:37:02.108 [main] ERROR ch.realmtech.server.ServerContext -- RealmTechData/properties/optionsServer.cfg (No such file or directory) java.io.FileNotFoundException: RealmTechData/properties/optionsServer.cfg (No such file or directory) at java.base/java.io.FileInputStream.open0(Native Method) at java.base/java.io.FileInputStream.open(FileInputStream.java:216) at java.base/java.io.FileInputStream.<init>(FileInputStream.java:157) at ch.realmtech.server.datactrl.OptionServer.getOptionFileAndLoadOrCreate(OptionServer.java:27) at ch.realmtech.server.ServerContext.reloadOption(ServerContext.java:169) at ch.realmtech.server.ServerContext.<init>(ServerContext.java:76) at ch.realmtech.server.ServerContext.main(ServerContext.java:111) 16:37:02.112 [main] INFO ch.realmtech.server.ServerContext -- Fermeture du serveur... 16:37:02.113 [main] ERROR ch.realmtech.server.ServerContext -- Option file can not be saved. Cannot invoke "ch.realmtech.server.datactrl.OptionServer.save()" because "this.optionServer" is null Exception in thread "main" java.io.FileNotFoundException: RealmTechData/properties/optionsServer.cfg (No such file or directory) at java.base/java.io.FileInputStream.open0(Native Method) at java.base/java.io.FileInputStream.open(FileInputStream.java:216) at java.base/java.io.FileInputStream.<init>(FileInputStream.java:157) at ch.realmtech.server.datactrl.OptionServer.getOptionFileAndLoadOrCreate(OptionServer.java:27) at ch.realmtech.server.ServerContext.reloadOption(ServerContext.java:169) at ch.realmtech.server.ServerContext.<init>(ServerContext.java:76) at ch.realmtech.server.ServerContext.main(ServerContext.java:111)

Crash

je me baladait et j'ai softcrash
image
06:59:02.714 [Tick Thread] ERROR ch.realmtech.server.tick.TickThread -- This uuid has already ben registered: InventoryComponent id: 53686, uuid: 022fcb23-d455-440d-964f-9b321e11ddcc
java.lang.IllegalStateException: This uuid has already ben registered: InventoryComponent id: 53686, uuid: 022fcb23-d455-440d-964f-9b321e11ddcc
at ch.realmtech.server.ecs.system.UuidEntityManager.registerEntityIdWithUuid(UuidEntityManager.java:106)
at ch.realmtech.server.ecs.system.InventoryManager.createInventoryUi(InventoryManager.java:480)
at ch.realmtech.server.ecs.system.InventoryManager.createFurnace(InventoryManager.java:463)
at ch.realmtech.server.level.cell.FurnaceEditEntity.lambda$createEntity$0(FurnaceEditEntity.java:40)
at ch.realmtech.server.ecs.plugin.server.ExecuteOnContextServer.onCommun(ExecuteOnContextServer.java:38)
at ch.realmtech.server.level.cell.FurnaceEditEntity.createEntity(FurnaceEditEntity.java:40)
at ch.realmtech.server.serialize.cell.CellSerializerV4.lambda$fromBytes$0(CellSerializerV4.java:78)
at ch.realmtech.server.ecs.system.MapManager.lambda$newCell$2(MapManager.java:255)
at java.base/java.util.Optional.ifPresent(Optional.java:178)
at ch.realmtech.server.ecs.system.MapManager.newCell(MapManager.java:255)
at ch.realmtech.server.serialize.chunk.ChunkSerializerV9.fromBytes(ChunkSerializerV9.java:50)
at ch.realmtech.server.serialize.chunk.ChunkSerializerV9.fromBytes(ChunkSerializerV9.java:16)
at ch.realmtech.server.serialize.AbstractSerializerController.decodeVersionAndBytes(AbstractSerializerController.java:59)
at ch.realmtech.server.serialize.AbstractSerializerController.decodeApplicationBytes(AbstractSerializerController.java:68)
at ch.realmtech.server.serialize.AbstractSerializerController.decode(AbstractSerializerController.java:36)
at ch.realmtech.server.ecs.system.SaveInfManager.readSavedInfChunk(SaveInfManager.java:150)
at ch.realmtech.server.ecs.system.MapSystemServer.getCacheOrGenerateChunk(MapSystemServer.java:230)
at ch.realmtech.server.ecs.system.MapSystemServer.end(MapSystemServer.java:127)
at com.artemis.BaseSystem.process(BaseSystem.java:47)
at com.artemis.InvocationStrategy.process(InvocationStrategy.java:25)
at com.artemis.World.process(World.java:385)
at ch.realmtech.server.ecs.EcsEngineServer.process(EcsEngineServer.java:95)
at ch.realmtech.server.tick.TickThread.run(TickThread.java:28)
06:59:02.718 [Tick Thread] INFO ch.realmtech.server.ServerContext -- Saving map...
06:59:02.767 [Tick Thread] INFO ch.realmtech.server.ecs.EcsEngineServer -- Map saved
06:59:02.768 [Tick Thread] INFO ch.realmtech.server.ServerContext -- Closing server...
06:59:02.782 [main] INFO ch.realmtech.server.ServerContext -- Saving map...
06:59:02.783 [main] ERROR ch.realmtech.core.game.ecs.ECSEngine -- Cannot invoke "ch.realmtech.server.ecs.system.MapManager.getInfMap()" because the return value of "ch.realmtech.server.ecs.plugin.server.SystemsAdminServer.getMapManager()" is null
java.lang.NullPointerException: Cannot invoke "ch.realmtech.server.ecs.system.MapManager.getInfMap()" because the return value of "ch.realmtech.server.ecs.plugin.server.SystemsAdminServer.getMapManager()" is null
at ch.realmtech.server.ecs.EcsEngineServer.saveMap(EcsEngineServer.java:113)
at ch.realmtech.server.ServerContext.save(ServerContext.java:177)
at ch.realmtech.server.ServerContext.saveAndClose(ServerContext.java:142)
at ch.realmtech.core.game.netty.ClientConnexionIntern.close(ClientConnexionIntern.java:38)
at ch.realmtech.core.game.ecs.ECSEngine.dispose(ECSEngine.java:156)
at ch.realmtech.core.RealmTech.lambda$closeEcs$2(RealmTech.java:346)
at com.badlogic.gdx.backends.lwjgl3.Lwjgl3Application.loop(Lwjgl3Application.java:209)
at com.badlogic.gdx.backends.lwjgl3.Lwjgl3Application.(Lwjgl3Application.java:167)
at ch.realmtech.core.DesktopLauncher.main(DesktopLauncher.java:16)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.