darknight1050 / config-utils

GNU General Public License v3.0
4 stars 5 forks source link

Failure to initialize config with Vector3 #7

Closed FrozenAlex closed 11 months ago

FrozenAlex commented 2 years ago

So I had an issue where the lib just would not initialize the Vector3 value. Link to the code https://github.com/FrozenAlex/Nya-quest/blob/42869cbabd7a9a4a6f59bc15f14306fc700c2122/include/NyaConfig.hpp#L37 Tombstone from one of the crashes with beatsaber 1.21.0 and config utils 0.7.2. Every other value seemed to work, except Vector3. And the mod worked after switching to individual XYZ floats

********** Crash dump: **********
#00 0x0000000000080c68 /apex/com.android.runtime/lib64/bionic/libc.so (prop_area::find_property(prop_bt*, char const*, unsigned int, char const*, unsigned int, bool)+36) (BuildId: a6e0ca3a9989715134d1d1e2126e0f7a)
#01 0x0000000000080fb8 /apex/com.android.runtime/lib64/bionic/libc.so (prop_info::prop_info(char const*, unsigned int, char const*, unsigned int)+80) (BuildId: a6e0ca3a9989715134d1d1e2126e0f7a)
#02 0x00000000000ead4c /data/data/com.beatgames.beatsaber/files/libNya.so (ConfigUtils::ConfigValue<UnityEngine::Vector3>::SaveValue()+848) (BuildId: def45ab9b4e3129b9f707d093872f682c4ea1661)
                                                                           rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >::ObjectEmpty() const
                                                                           /home/alex/foss/nya/extern/includes/beatsaber-hook/shared/config/../rapidjson/include/rapidjson/document.h:1184:32
                                                                           ConfigUtils::ConfigValue<UnityEngine::Vector3>::SaveValue()
                                                                           /home/alex/foss/nya/extern/includes/config-utils/shared/config-utils.hpp:246:1
#03 0x00000000000fbd08 /data/data/com.beatgames.beatsaber/files/libNya.so (ConfigUtils::ConfigValue<UnityEngine::Vector3>::Init(Configuration*)+448) (BuildId: def45ab9b4e3129b9f707d093872f682c4ea1661)
                                                                           ConfigUtils::ConfigValue<UnityEngine::Vector3>::SetValue(UnityEngine::Vector3, bool)
                                                                           /home/alex/foss/nya/extern/includes/config-utils/shared/config-utils.hpp:88:21
                                                                           ConfigUtils::ConfigValue<UnityEngine::Vector3>::Init(Configuration*)
                                                                           /home/alex/foss/nya/extern/includes/config-utils/shared/config-utils.hpp:73:21
#04 0x00000000000f9e08 /data/data/com.beatgames.beatsaber/files/libNya.so (NyaConfig_t::Init(ModInfo)+364) (BuildId: def45ab9b4e3129b9f707d093872f682c4ea1661)
                                                                           NyaConfig_t::Init(ModInfo)
                                                                           /home/alex/foss/nya/include/NyaConfig.hpp:20:1
#05 0x00000000000f92dc /data/data/com.beatgames.beatsaber/files/libNya.so (load+104) (BuildId: def45ab9b4e3129b9f707d093872f682c4ea1661)
                                                                           load
                                                                           /home/alex/foss/nya/src/main.cpp:176:20
#06 0x0000000000061250 /data/app/com.beatgames.beatsaber-7N5TXT_35mXTTjUSSv2b3Q==/lib/arm64/libmodloader.so (Modloader::load_mods()+420) (BuildId: 7d0d4abcf1f053cc9f72b25a9da4352eeaad119e)
#07 0x00000000005de29c /data/app/com.beatgames.beatsaber-7N5TXT_35mXTTjUSSv2b3Q==/lib/arm64/libunity.so (BuildId: 7f44ab8514291a0995548f41d0f2ac45c93a157d)
#08 0x00000000006471d0 /data/app/com.beatgames.beatsaber-7N5TXT_35mXTTjUSSv2b3Q==/lib/arm64/libunity.so (BuildId: 7f44ab8514291a0995548f41d0f2ac45c93a157d)
#09 0x0000000000647c8c /data/app/com.beatgames.beatsaber-7N5TXT_35mXTTjUSSv2b3Q==/lib/arm64/libunity.so (BuildId: 7f44ab8514291a0995548f41d0f2ac45c93a157d)
#10 0x000000000065bc24 /data/app/com.beatgames.beatsaber-7N5TXT_35mXTTjUSSv2b3Q==/lib/arm64/libunity.so (BuildId: 7f44ab8514291a0995548f41d0f2ac45c93a157d)
#11 0x000000000000bc3c /data/app/com.beatgames.beatsaber-7N5TXT_35mXTTjUSSv2b3Q==/oat/arm64/base.odex
Crash dump is completed
FrozenAlex commented 11 months ago

Works on the latest version, so closing the issue