1. Welcome to the Starbound support forums. Please check the support FAQs before posting: http://playstarbound.com/support

Bug/Issue Odd characters in .json files causing exceptions on warp.

Discussion in 'Starbound Support' started by brendan_orr, Nov 4, 2017.

  1. brendan_orr

    brendan_orr Void-Bound Voyager

    Hello all! I was experiencing this bug on my 100% vanilla run and my Frackin' Universe run as well and thought I would share my fix for the next version of Starbound.

    OS: Slackware64 14.2
    uname -a: Linux Water 4.4.14 #2 SMP Fri Jun 24 13:38:27 CDT 2016 x86_64 Intel(R) Core(TM) i7-7700 CPU @ 3.60GHz G
    enuineIntel GNU/Linux
    glibc: 2.23
    Starbound: 1.3.2

    Steps to reproduce:
    1. Go to planet
    2. Try to warp down
    3. If planet has one of the certain dungeons you end up back on your ship
    In the console this is produced (landing in a 'Aether Sea' planet in FU, but similar happens in vanilla):
    [Info] UniverseServer: Loading celestial world 763640820:911250234:49039736:9
    [Error] UniverseServer: Could not load celestial world 763640820:911250234:49039736:9, removing! Cause:
    (VersionedJsonException) VersionedJson identifier mismatch, expected 'WorldMetadata' but got ''
    [Info] UniverseServer: Creating celestial world 763640820:911250234:49039736:9
    [Info] Protected dungeonIds for world set to (65524)
    [Info] Placing dungeon hylotlcity
    [Error] UniverseServer: error during world create: (WorldServerException) Exception encountered initial
    izing world
    ./starbound(_ZN4Star13StarExceptionC2EPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x66) [0x
    aa85d6]
    ./starbound(_ZN4Star13StarExceptionC2EPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt9excep
    tion+0x72) [0xaa8ac2]
    ./starbound(_ZN4Star11WorldServer4initEb+0x1707) [0x11c6747]
    ./starbound(_ZN4Star11WorldServerC2ERKSt10shared_ptrINS_13WorldTemplateEES1_INS_8IODeviceEE+0x618) [0x1
    1d1f98]
    ./starbound(_ZNSt12__shared_ptrIN4Star11WorldServerELN9__gnu_cxx12_Lock_policyE2EEC2ISaIS1_EJRSt10share
    d_ptrINS0_13WorldTemplateEES7_INS0_4FileEEEEESt19_Sp_make_shared_tagRKT_DpOT0_+0x76) [0x10e4876]
    ./starbound() [0x10c020e]
    ./starbound() [0x10c091c]
    ./starbound(_ZNSt17_Function_handlerIFvvEZN4Star10WorkerPool11addProducerISt10shared_ptrINS1_17WorldSer
    verThreadEEEENS1_17WorkerPoolPromiseIT_EESt8functionIFS8_vEEEUlvE_E9_M_invokeERKSt9_Any_data+0x26) [0x1
    0dc426]
    ./starbound(_ZN4Star10WorkerPool12WorkerThread3runEv+0x5f) [0xaa577f]
    ./starbound(_ZN4Star10ThreadImpl9runThreadEPv+0x15) [0xab2365]
    /lib64/libpthread.so.0(+0x7684) [0x7fb1dd872684]
    /lib64/libc.so.6(clone+0x6d) [0x7fb1dce93efd]
    Caused by: (DungeonException) Error loading dungeon '/dungeons/hylotl/hylotlcity/hylotlcity.dungeon': (
    AssetException) Error loading asset /dungeons/hylotl/hylotlcity/hylotlcityhousesmall3.json
    ./starbound(_ZN4Star13StarExceptionC2EPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x66) [0x
    aa85d6]
    ./starbound(_ZN4Star16DungeonExceptionC1ENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x52) [0x
    c25912]
    ./starbound(_ZN4Star18DungeonDefinitions14readDefinitionERKNS_6StringE+0x1e8) [0xc1c9d8]
    ./starbound(_ZNK4Star18DungeonDefinitions3getERKNS_6StringE+0x371) [0xc23401]
    ./starbound(_ZN4Star16DungeonGeneratorC1ERKNS_6StringEmfNS_5MaybeItEE+0x7e) [0xc23a1e]
    ./starbound(_ZN4Star11WorldServer4initEb+0x1073) [0x11c60b3]
    ./starbound(_ZN4Star11WorldServerC2ERKSt10shared_ptrINS_13WorldTemplateEES1_INS_8IODeviceEE+0x618) [0x1
    1d1f98]
    ./starbound(_ZNSt12__shared_ptrIN4Star11WorldServerELN9__gnu_cxx12_Lock_policyE2EEC2ISaIS1_EJRSt10share
    d_ptrINS0_13WorldTemplateEES7_INS0_4FileEEEEESt19_Sp_make_shared_tagRKT_DpOT0_+0x76) [0x10e4876]
    ./starbound() [0x10c020e]
    ./starbound() [0x10c091c]
    ./starbound(_ZNSt17_Function_handlerIFvvEZN4Star10WorkerPool11addProducerISt10shared_ptrINS1_17WorldSer
    verThreadEEEENS1_17WorkerPoolPromiseIT_EESt8functionIFS8_vEEEUlvE_E9_M_invokeERKSt9_Any_data+0x26) [0x1
    0dc426]
    ./starbound(_ZN4Star10WorkerPool12WorkerThread3runEv+0x5f) [0xaa577f]
    ./starbound(_ZN4Star10ThreadImpl9runThreadEPv+0x15) [0xab2365]
    /lib64/libpthread.so.0(+0x7684) [0x7fb1dd872684]
    /lib64/libc.so.6(clone+0x6d) [0x7fb1dce93efd]
    [Info] UniverseServer: Arriving ship for player 1 at 763640820:911250234:49039736:9
    [Info] UniverseServer: Clearing broken world CelestialWorld:763640820:911250234:49039736:9

    I unpacked 'packed.pak' and edited ./dungeons/hylotl/hylotlcity/hylotlcityhousesmall3.json where there were 3 characters in the whitespace that shouldn't be there. Here's my diff is attached.
    After repacking the tree and backing up the original packed.pak I restarted the game and was able to go to the planet successfully with no odd output in the console.

    I grepped the tree for xE020 and found the following files affected:
    $ grep -obUaPr "\xe0\x20" *|grep json
    avian/avianairship/avianairshipclue2.json:82836:�
    avian/avianairship/avianairshipclue2.json:82892:�
    avian/avianairship/avianairshipclue2.json:82896:�
    hylotl/hylotlcity/hylotlcityhousesmall3.json:14562:�
    hylotl/hylotlcity/hylotlcityhousesmall3.json:14618:�
    hylotl/hylotlcity/hylotlcityhousesmall3.json:14622:�
    microdungeons/biomes/toxic/industrial2.json:8672:�
    microdungeons/biomes/toxic/industrial2.json:8728:�
    microdungeons/biomes/toxic/industrial2.json:8732:�
    other/ancientvault/fire/entrance_right3.json:8502:�
    other/ancientvault/fire/entrance_right3.json:8558:�
    other/ancientvault/fire/entrance_right3.json:8562:�

    Hope this helps people with a similar issue and gets fixed in 1.3!
     

    Attached Files:

    tsukini likes this.

Share This Page