PixelGuys / Cubyz

Voxel sandbox game with a large render distance, procedurally generated content and some cool graphical effects.
GNU General Public License v3.0
447 stars 56 forks source link

Joining 127.0.0.1 while no server is running crashes the game #686

Open ITR13 opened 2 months ago

ITR13 commented 2 months ago

Stacktrace:

[info]: Blue noise took 52 ms to load
[info]: Framebuffer: 1280, 720
[info]: [censored]
[info]: User #00ffffITR joined using version Cubyz ╬▒ 0.12.0.
thread 15296 panic: attempt to use null value
D:\source\Cubyz\src\network.zig:682:111: 0xca6909 in receive (Cubyzig.exe.obj)
       const path = std.fmt.allocPrint(main.stackAllocator.allocator, "saves/{s}/assets/", .{main.server.world.?.name}) catch unreachable;
                                                                                                              ^
D:\source\Cubyz\src\network.zig:1732:14: 0xf87d60 in collectPackets (Cubyzig.exe.obj)
     try prot(self, data);
             ^
D:\source\Cubyz\src\network.zig:1781:27: 0xf88941 in flawedReceive (Cubyzig.exe.obj)
   try self.collectPackets();
                          ^
D:\source\Cubyz\src\network.zig:1741:21: 0xf3b5b2 in receive (Cubyzig.exe.obj)
  self.flawedReceive(data) catch |err| {
                    ^
D:\source\Cubyz\src\network.zig:561:18: 0xed66be in onReceive (Cubyzig.exe.obj)
     conn.receive(data);
                 ^
D:\source\Cubyz\src\network.zig:592:19: 0xe620c5 in run (Cubyzig.exe.obj)
    self.onReceive(data, source);
                  ^
D:\source\Cubyz\compiler\zig\lib\std\Thread.zig:408:13: 0xdd780c in callFn__anon_56139 (Cubyzig.exe.obj)
            @call(.auto, f, args);
            ^
D:\source\Cubyz\compiler\zig\lib\std\Thread.zig:518:30: 0xd4323f in entryFn (Cubyzig.exe.obj)
                return callFn(f, self.fn_args);
                             ^
???:?:?: 0x7ffe4a697373 in ??? (KERNEL32.DLL)
???:?:?: 0x7ffe4b05cc90 in ??? (ntdll.dll)

[censored] was my public IP, the one shown above the 127.0.0.1 box.

IntegratedQuantum commented 2 months ago

related: #264