-
Bug
-
Resolution: Invalid
-
None
-
1.8.1.2
-
None
When the directory resource_packs/vanilla is empty or manifest.json doesn't exist the server crashes when starting up. This is what prints out:
NO LOG FILE! - setting up server logging... NO LOG FILE! - [2019-01-22 19:36:49 INFO] Starting Server NO LOG FILE! - [2019-01-22 19:36:49 INFO] Version 1.8.1.2 [2019-01-22 19:36:49 INFO] Level Name: Bedrock level [2019-01-22 19:36:49 INFO] Game mode: 0 Survival [2019-01-22 19:36:49 INFO] Difficulty: 1 EASY <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>id</key> <string>0</string> <key>delay</key> <integer>0</integer> <key>status</key> <integer>0</integer> </dict> </plist> Violación de segmento (`core' generado)
This can happen when you copy bedrock_server and libCrypto.so into another directory and start it. It will create the skeleton files and directories but it won't generate anything under vanilla directory.
It seems to be crashing in the function ResourcePack::getManifest because it's trying to dereference a null pointer. Here's the backtrace:
Reading symbols from ./bedrock_server...(no debugging symbols found)...done. (gdb) r Starting program: /var/miguel/test/bedrock_server [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1". NO LOG FILE! - setting up server logging... NO LOG FILE! - [2019-01-22 19:24:19 INFO] Starting Server NO LOG FILE! - [2019-01-22 19:24:19 INFO] Version 1.8.1.2 [2019-01-22 19:24:19 INFO] Level Name: Bedrock level [New Thread 0x7ffff11d7700 (LWP 9111)] [New Thread 0x7ffff09d6700 (LWP 9112)] [New Thread 0x7fffebfff700 (LWP 9113)] [2019-01-22 19:24:19 INFO] Game mode: 0 Survival [2019-01-22 19:24:19 INFO] Difficulty: 1 EASY Thread 1 "bedrock_server" received signal SIGSEGV, Segmentation fault. 0x000055555707ead0 in ResourcePack::getManifest() const () (gdb) backtrace #0 0x000055555707ead0 in ResourcePack::getManifest() const () #1 0x0000555556dca799 in DedicatedServer::run() () #2 0x0000555556dc9cd5 in DedicatedServer::start() () #3 0x0000555557fe04b0 in main () (gdb) disassemble Dump of assembler code for function _ZNK12ResourcePack11getManifestEv: 0x000055555707eac0 <+0>: push rbp 0x000055555707eac1 <+1>: mov rbp,rsp 0x000055555707eac4 <+4>: sub rsp,0x10 0x000055555707eac8 <+8>: mov QWORD PTR [rbp-0x8],rdi 0x000055555707eacc <+12>: mov rdi,QWORD PTR [rbp-0x8] => 0x000055555707ead0 <+16>: mov rdi,QWORD PTR [rdi+0x8] 0x000055555707ead4 <+20>: call 0x55555701a800 <_ZN4Pack11getManifestEv> 0x000055555707ead9 <+25>: add rsp,0x10 0x000055555707eadd <+29>: pop rbp 0x000055555707eade <+30>: ret End of assembler dump. (gdb) x/xw $rdi+0x8 0x8: Cannot access memory at address 0x8 (gdb) x/xw $rdi 0x0: Cannot access memory at address 0x0 (gdb)