MCMrARM / mcpelauncher-linux

Please note this is a legacy repository, please go to: https://github.com/minecraft-linux/mcpelauncher-manifest/wiki
GNU General Public License v3.0
312 stars 46 forks source link

[Server] Crash by signal 6(ResourcePack::getSubpackInfoStack()) #281

Closed codehz closed 6 years ago

codehz commented 6 years ago

Minecraft apk version: 1.2.8 x86 System version: i686/ubuntu from docker hub Command: ./server LOG

loading hybris libraries
oslib: libm.so.6: -611308768
loading MCPE
loaded MCPE (at 3619106816)
init symbols
init app platform vtable
AppPlatform size = 182
create app platform
init app platform
create device id: 
app platform initialized
load white-list and ops-list
create minecraft api class
create level settings
create file path manager
create minecraft eventing
init minecraft eventing
get system region: 0xdeadbeef
create resource pack manager
create pack manifest factory
create pack key provider
create pack source factory
create resource pack repository
internal storage path = /root/.local/share/mcpelauncher/
internal storage path = /root/.local/share/mcpelauncher/
internal storage path = /root/.local/share/mcpelauncher/
internal storage path = /root/.local/share/mcpelauncher/
internal storage path = /root/.local/share/mcpelauncher/
internal storage path = /root/.local/share/mcpelauncher/
internal storage path = /root/.local/share/mcpelauncher/
create network handler
[MTU] Max MTU Size 1492 bytes
create psuedo-app
create automation client
create server
Signal 11 received
Backtrace elements: 3
#0 ./server(_Z12handleSignaliPv+0x62) [0x80792d0]
#1 [0xdb8dec50]
#2 HYBRIS ResourcePack::getSubpackInfoStack() const+4 in libminecraftpe.so+0x1bc25d4 [0xd97355d4]
Dumping stack...
#17 HYBRIS ResourcePack::getSubpackInfoStack() const+4 in libminecraftpe.so+0x1bc25d4 [0xd97355d4]
#60 HYBRIS ResourcePack::getSubpackInfoStack() const+4 in libminecraftpe.so+0x1bc25d4 [0xd97355d4]
#72 HYBRIS (null)+12 in libminecraftpe.so+0x24c5acc [0xda038acc]
#108 HYBRIS Core::FileSystemImpl::FileSystemImpl(Core::FileAccessType, Core::FileStorageArea&)+185 in libminecraftpe.so+0x24ade79 [0xda020e79]
#112 HYBRIS Core::FileSystemImpl::~FileSystemImpl()+11 in libminecraftpe.so+0x24ade8b [0xda020e8b]
#120 HYBRIS operator delete(void*)+28 in libminecraftpe.so+0x2c7897c [0xda7eb97c]
#124 HYBRIS Core::FileSystemImpl::commit()+53 in libminecraftpe.so+0x24ae095 [0xda021095]
#126 HYBRIS operator delete(void*)+6 in libminecraftpe.so+0x2c78966 [0xda7eb966]
#128 HYBRIS Core::FileSystem_generic::~FileSystem_generic()+35 in libminecraftpe.so+0x24b9d13 [0xda02cd13]
#132 HYBRIS Core::FileSystem::isValidPath(Core::Path)+371 in libminecraftpe.so+0x24a77d3 [0xda01a7d3]
#140 HYBRIS (null)+12 in libminecraftpe.so+0x24c5acc [0xda038acc]
#152 HYBRIS Core::FileSystem::cleanPathSeparators_deprecated(Core::PathBuffer<Core::StackString<char, 1024u> >&, Core::Path)+273 in libminecraftpe.so+0x24a9841 [0xda01c841]
#168 HYBRIS Core::FileSystem::cleanPath_deprecated(Core::PathBuffer<Core::StackString<char, 1024u> >&, Core::Path)+268 in libminecraftpe.so+0x24a59fc [0xda0189fc]
#180 HYBRIS (null)+138 in libminecraftpe.so+0x2c5c56a [0xda7cf56a]
#228 HYBRIS (null)+138 in libminecraftpe.so+0x2c5c56a [0xda7cf56a]
#408 HYBRIS Core::FileStorageArea::_endTransaction(Core::FileSystemImpl*, bool)+1429 in libminecraftpe.so+0x24a2fc5 [0xda015fc5]
#492 HYBRIS operator new(unsigned int)+39 in libminecraftpe.so+0x2c7ac47 [0xda7edc47]
#497 HYBRIS operator new(unsigned int)+12 in libminecraftpe.so+0x2c7ac2c [0xda7edc2c]
#500 HYBRIS Core::File_c::_open(std::unique_ptr<Core::File_c, std::default_delete<Core::File_c> >&, Core::FileSystemImpl*, Core::Path, Core::FileOpenMode, Core::FileBufferingMode)+279 in libminecraftpe.so+0x24c7a27 [0xda03aa27]
#524 HYBRIS Core::Result::merge(Core::Result&&, Core::Result&&)+15 in libminecraftpe.so+0x24a07ef [0xda0137ef]
#532 HYBRIS Core::FileStorageArea::_endTransaction(Core::FileSystemImpl*, bool)+1429 in libminecraftpe.so+0x24a2fc5 [0xda015fc5]
#540 HYBRIS Core::FileSystemImpl::openFile(std::unique_ptr<Core::FileImpl, std::default_delete<Core::FileImpl> >&, Core::Path, Core::FileOpenMode, Core::FileBufferingMode)+401 in libminecraftpe.so+0x24ae241 [0xda021241]
#552 HYBRIS Core::FileSystemImpl::~FileSystemImpl()+11 in libminecraftpe.so+0x24ade8b [0xda020e8b]
#560 HYBRIS operator delete(void*)+28 in libminecraftpe.so+0x2c7897c [0xda7eb97c]
#564 HYBRIS Core::FileSystemImpl::commit()+53 in libminecraftpe.so+0x24ae095 [0xda021095]
#566 HYBRIS operator delete(void*)+6 in libminecraftpe.so+0x2c78966 [0xda7eb966]
#568 HYBRIS Core::FileSystem_generic::~FileSystem_generic()+35 in libminecraftpe.so+0x24b9d13 [0xda02cd13]
#572 HYBRIS Core::FileSystem::openFile(Core::Path, Core::File&, Core::FileOpenMode, Core::FileBufferingMode)+1204 in libminecraftpe.so+0x24a5844 [0xda018844]
#604 HYBRIS (null)+8 in libminecraftpe.so+0x2bade88 [0xda720e88]
#612 HYBRIS (null)+0 in libminecraftpe.so+0x37905a8 [0xdb3035a8]
#671 HYBRIS (null)+0 in libminecraftpe.so+0x37905a8 [0xdb3035a8]
#712 HYBRIS (null)+0 in libminecraftpe.so+0x37905fc [0xdb3035fc]
#716 HYBRIS operator new(unsigned int)+39 in libminecraftpe.so+0x2c7ac47 [0xda7edc47]
#720 HYBRIS (null)+53 in libminecraftpe.so+0x2b69925 [0xda6dc925]
#721 HYBRIS operator new(unsigned int)+12 in libminecraftpe.so+0x2c7ac2c [0xda7edc2c]
#731 HYBRIS (null)+9 in libminecraftpe.so+0x2bae279 [0xda721279]
#782 HYBRIS (null)+0 in libminecraftpe.so+0x3790248 [0xdb303248]
#800 HYBRIS operator new(unsigned int)+39 in libminecraftpe.so+0x2c7ac47 [0xda7edc47]
#805 HYBRIS operator new(unsigned int)+12 in libminecraftpe.so+0x2c7ac2c [0xda7edc2c]
#832 HYBRIS operator delete(void*)+28 in libminecraftpe.so+0x2c7897c [0xda7eb97c]
#848 HYBRIS SemVersion::_parseVersionToString()+801 in libminecraftpe.so+0x24bf6b1 [0xda0326b1]
#912 HYBRIS SemVersion::SemVersion()+73 in libminecraftpe.so+0x24bf389 [0xda032389]
#916 HYBRIS PackIdVersion::PackIdVersion()+57 in libminecraftpe.so+0x24bb389 [0xda02e389]
#920 HYBRIS PackReport::PackReport()+109 in libminecraftpe.so+0x1b9428d [0xd970728d]
#927 HYBRIS VTT for Core::InputFileStream+4 in libminecraftpe.so+0x3795134 [0xdb308134]
#936 HYBRIS PackInstance::PackInstance(ResourcePack*, int, bool)+65 in libminecraftpe.so+0x1bdbdc1 [0xd974edc1]
#943 HYBRIS vtable for Core::InputFileStream+32 in libminecraftpe.so+0x379510c [0xdb30810c]
#944 HYBRIS ServerInstance::ServerInstance(IMinecraftApp&, Whitelist const&, OpsList const&, FilePathManager*, std::chrono::duration<long long, std::ratio<1ll, 1ll> >, std::string, std::string, std::string, IContentKeyProvider const&, std::string, LevelSettings, minecraft::api::Api&, int, bool, int, int, int, bool, std::vector<std::string, std::allocator<std::string> > const&, std::string, mce::UUID const&, MinecraftEventing&, NetworkHandler&, ResourcePackRepository&, ContentTierManager const&, ResourcePackManager&, ResourcePackManager*, std::function<void (std::string const&)>)+3125 in libminecraftpe.so+0x1c2c015 [0xd979f015]
#968 HYBRIS vtable for Core::InputFileStream+12 in libminecraftpe.so+0x37950f8 [0xdb3080f8]
#969 HYBRIS vtable for Core::InputFileStream+52 in libminecraftpe.so+0x3795120 [0xdb308120]
Signal 6 received
MCMrARM commented 6 years ago

You need to extract the prepare a special working directory for the server to run it: extract the assets into a directory manually, extract lib/x86/libminecraftpe.so to libs/libminecraftpe.so into the directory with the assets and then run the server binary with that assets directory as the working dir.

codehz commented 6 years ago

@MCMrARM I am trying to follow those step before

root@e2a3ff1794ec:~/test# ls
AndroidManifest.xml  game.zip                  lib   resources.arsc
META-INF             games                     libs  server
assets               invalid_known_packs.json  org   valid_known_packs.json
classes.dex          keep.txt                  res
root@e2a3ff1794ec:~/test# ls libs
libminecraftpe.so

now(just copy the server and libs to assets)

root@e2a3ff1794ec:~/test/assets# ls
animation                 resource_packs
behavior_packs            server
def_action_test.json      shaders
definitions               skin_packs
fonts                     store
games                     structures
invalid_known_packs.json  texture_backwards_compatibility_mapping.json
libs                      uniforms.json
profanity_filter.wlist    valid_known_packs.json

And I got another crash

[MTU] Max MTU Size 1492 bytes
create psuedo-app
create automation client
create server
[IPv6] multicast listen on interface 0
sendto failed with code Cannot assign requested address (99) for char 0 and leng
th 4.
initialized lib
Signal 11 received
Segmentation fault

This problem seems to be related to networking.(And it is running inside a Docker container on Virtual Machine)

I will test it on a physical machine later(pure IPv4).


PS: I made some changes to make this project compile and run in a headless environment.

MCMrARM commented 6 years ago

Nevermind -- the crash is caused by me being silly and pushing a last-second change in the command handling code. I'll push a fix in a while.

codehz commented 6 years ago

@MCMrARM

[IPv6] multicast listen on interface 0
sendto failed with code Cannot assign requested address (99) for char 0 and leng

This problem is still there after 3 commit. And it is not possible to connect server via IPv6.

MCMrARM commented 6 years ago

Waiting for a test on a real machine :)

codehz commented 6 years ago

@MCMrARM It works! Sorry for not reply for such a long time.