Ven0maus / SOD.Common

A common library for shadows of doubt modding.
MIT License
4 stars 4 forks source link

[BUG] SODStockMarket does not work on existing save on v37.08 #29

Closed joveice closed 7 months ago

joveice commented 7 months ago

Describe the bug Opening Stockmarket on a cruncher just shows a empty page with "Closed", cannot be exited out of.

image

Reproduction scenario

  1. Load existing save
  2. Open cruncher

Expected behavior StockMarket site shows up

Additional context

[Message: Preloader] BepInEx 6.0.0-be.667 - Shadows of Doubt
[Message: Preloader] Built from commit 6b500b35727716f8ba182dedae304a628dbbb608
[Info   :   BepInEx] System platform: Windows 10 64-bit
[Info   :   BepInEx] Process bitness: 64-bit (x64)
[Info   :   BepInEx] Running under Unity 2021.3.35f1
[Info   :   BepInEx] Runtime version: 6.0.7
[Info   :   BepInEx] Runtime information: .NET 6.0.7
[Info   : Preloader] 0 patcher plugins loaded
[Info   : Preloader] 0 assemblies discovered
[Message:AssemblyPatcher] Executing 0 patch(es)
[Message:   BepInEx] Chainloader initialized
[Warning:Il2CppInterop] Class::Init signatures have been exhausted, using a substitute!
[Info   :Il2CppInterop] Registered mono type Il2CppInterop.Runtime.DelegateSupport+Il2CppToMonoDelegateReference in il2cpp domain
[Info   :   BepInEx] 10 plugins to load
[Info   :   BepInEx] Loading [AssetBundleLoader 1.0.2]
[Info   :AssetBundleLoader] AssetBundleLoader: Loading bundle 0c0533342366f0d0a47dd50d15e9ee76.bundle with file CAB-37b77ade5e80bd224f8f5edcabd11692
[Info   :Il2CppInterop] Registered mono type UniverseLib.UniversalBehaviour in il2cpp domain
[Info   :Il2CppInterop] Registered mono type UniverseLib.Runtime.Il2Cpp.Il2CppManagedEnumerator in il2cpp domain
[Info   :AssetBundleLoader] Plugin AssetBundleLoader is loaded!
[Info   :   BepInEx] Loading [DDSLoader 1.0.2]
[Info   : DDSLoader] Plugin DDSLoader is loaded!
[Info   : DDSLoader] Plugin DDSLoader is patched!
[Info   :   BepInEx] Loading [SOD.Common 1.1.8]
[Info   :SOD.Common] Setting up configuration bindings.
[Info   :SOD.Common] Plugin is patched.
[Info   :   BepInEx] Loading [HoursOfOperation 0.1.0-BE667]
[Info   :HoursOfOperation] Setting up configuration bindings.
[Info   :HoursOfOperation] Plugin HoursOfOperation is loaded!
[Info   :HoursOfOperation] Plugin HoursOfOperation is patched!
[Info   :   BepInEx] Loading [PrintBugfix 0.1.1-BE667]
[Info   :PrintBugfix] Plugin PrintBugfix is patched!
[Info   :   BepInEx] Loading [RealEstateListingCruncherApp 1.0.5]
[Info   :RealEstateListingCruncherApp] Plugin RealEstateListingCruncherApp is loaded!
[Info   :RealEstateListingCruncherApp] Plugin RealEstateListingCruncherApp is patched!
[Info   :Il2CppInterop] Registered mono type RealEstateListingCruncherApp.RealEstateCruncherAppContent in il2cpp domain
[Info   :Il2CppInterop] Registered mono type RealEstateListingCruncherApp.RealEstateCruncherAppContent+CruncherForSaleContent in il2cpp domain
[Info   :RealEstateListingCruncherApp] Plugin RealEstateListingCruncherApp has added custom types!
[Info   :   BepInEx] Loading [CruncherCorrection 1.0.1]
[Info   :CruncherCorrection] sod.sspj.crunchercorrection v1.0.1: Successfully Loaded
[Info   :   BepInEx] Loading [NoNoticeNonsense 0.1.5]
[Info   :    NoNoNo] sod.sspj.nonoticenonsense v0.1.5: Successfully Loaded
[Info   :   BepInEx] Loading [QoL 1.1.4]
[Info   :       QoL] Setting up configuration bindings.
[Info   :       QoL] Plugin is patched.
[Info   :   BepInEx] Loading [StockMarket 2.0.3]
[Info   :StockMarket] Setting up configuration bindings.
[Warning:Il2CppInterop] Method SOD.StockMarket.Implementation.Cruncher.Content.AppMenu get_AppMenu() on type SOD.StockMarket.Implementation.Cruncher.StockMarketAppContent has unsupported return type SOD.StockMarket.Implementation.Cruncher.Content.AppMenu
[Warning:Il2CppInterop] Method Void set_AppMenu(SOD.StockMarket.Implementation.Cruncher.Content.AppMenu) on type SOD.StockMarket.Implementation.Cruncher.StockMarketAppContent has unsupported parameter SOD.StockMarket.Implementation.Cruncher.Content.AppMenu value of type SOD.StockMarket.Implementation.Cruncher.Content.AppMenu
[Warning:Il2CppInterop] Method SOD.StockMarket.Implementation.Cruncher.Content.AppStocks get_AppStocks() on type SOD.StockMarket.Implementation.Cruncher.StockMarketAppContent has unsupported return type SOD.StockMarket.Implementation.Cruncher.Content.AppStocks
[Warning:Il2CppInterop] Method Void set_AppStocks(SOD.StockMarket.Implementation.Cruncher.Content.AppStocks) on type SOD.StockMarket.Implementation.Cruncher.StockMarketAppContent has unsupported parameter SOD.StockMarket.Implementation.Cruncher.Content.AppStocks value of type SOD.StockMarket.Implementation.Cruncher.Content.AppStocks
[Warning:Il2CppInterop] Method SOD.StockMarket.Implementation.Cruncher.Content.AppPortfolio get_AppPortfolio() on type SOD.StockMarket.Implementation.Cruncher.StockMarketAppContent has unsupported return type SOD.StockMarket.Implementation.Cruncher.Content.AppPortfolio
[Warning:Il2CppInterop] Method Void set_AppPortfolio(SOD.StockMarket.Implementation.Cruncher.Content.AppPortfolio) on type SOD.StockMarket.Implementation.Cruncher.StockMarketAppContent has unsupported parameter SOD.StockMarket.Implementation.Cruncher.Content.AppPortfolio value of type SOD.StockMarket.Implementation.Cruncher.Content.AppPortfolio
[Warning:Il2CppInterop] Method SOD.StockMarket.Implementation.Cruncher.Content.AppStock get_AppStock() on type SOD.StockMarket.Implementation.Cruncher.StockMarketAppContent has unsupported return type SOD.StockMarket.Implementation.Cruncher.Content.AppStock
[Warning:Il2CppInterop] Method Void set_AppStock(SOD.StockMarket.Implementation.Cruncher.Content.AppStock) on type SOD.StockMarket.Implementation.Cruncher.StockMarketAppContent has unsupported parameter SOD.StockMarket.Implementation.Cruncher.Content.AppStock value of type SOD.StockMarket.Implementation.Cruncher.Content.AppStock
[Warning:Il2CppInterop] Method SOD.StockMarket.Implementation.Cruncher.Content.AppFundsInterface get_AppFundsInterface() on type SOD.StockMarket.Implementation.Cruncher.StockMarketAppContent has unsupported return type SOD.StockMarket.Implementation.Cruncher.Content.AppFundsInterface
[Warning:Il2CppInterop] Method Void set_AppFundsInterface(SOD.StockMarket.Implementation.Cruncher.Content.AppFundsInterface) on type SOD.StockMarket.Implementation.Cruncher.StockMarketAppContent has unsupported parameter SOD.StockMarket.Implementation.Cruncher.Content.AppFundsInterface value of type SOD.StockMarket.Implementation.Cruncher.Content.AppFundsInterface
[Warning:Il2CppInterop] Method SOD.StockMarket.Implementation.Cruncher.Content.AppInstantBuyInterface get_AppInstantBuyInterface() on type SOD.StockMarket.Implementation.Cruncher.StockMarketAppContent has unsupported return type SOD.StockMarket.Implementation.Cruncher.Content.AppInstantBuyInterface
[Warning:Il2CppInterop] Method Void set_AppInstantBuyInterface(SOD.StockMarket.Implementation.Cruncher.Content.AppInstantBuyInterface) on type SOD.StockMarket.Implementation.Cruncher.StockMarketAppContent has unsupported parameter SOD.StockMarket.Implementation.Cruncher.Content.AppInstantBuyInterface value of type SOD.StockMarket.Implementation.Cruncher.Content.AppInstantBuyInterface
[Warning:Il2CppInterop] Method SOD.StockMarket.Implementation.Cruncher.Content.AppInstantSellInterface get_AppInstantSellInterface() on type SOD.StockMarket.Implementation.Cruncher.StockMarketAppContent has unsupported return type SOD.StockMarket.Implementation.Cruncher.Content.AppInstantSellInterface
[Warning:Il2CppInterop] Method Void set_AppInstantSellInterface(SOD.StockMarket.Implementation.Cruncher.Content.AppInstantSellInterface) on type SOD.StockMarket.Implementation.Cruncher.StockMarketAppContent has unsupported parameter SOD.StockMarket.Implementation.Cruncher.Content.AppInstantSellInterface value of type SOD.StockMarket.Implementation.Cruncher.Content.AppInstantSellInterface
[Warning:Il2CppInterop] Method SOD.StockMarket.Implementation.Cruncher.Content.AppNews get_AppNews() on type SOD.StockMarket.Implementation.Cruncher.StockMarketAppContent has unsupported return type SOD.StockMarket.Implementation.Cruncher.Content.AppNews
[Warning:Il2CppInterop] Method Void set_AppNews(SOD.StockMarket.Implementation.Cruncher.Content.AppNews) on type SOD.StockMarket.Implementation.Cruncher.StockMarketAppContent has unsupported parameter SOD.StockMarket.Implementation.Cruncher.Content.AppNews value of type SOD.StockMarket.Implementation.Cruncher.Content.AppNews
[Warning:Il2CppInterop] Method SOD.StockMarket.Implementation.Cruncher.Content.AppTradeHistory get_AppTradeHistory() on type SOD.StockMarket.Implementation.Cruncher.StockMarketAppContent has unsupported return type SOD.StockMarket.Implementation.Cruncher.Content.AppTradeHistory
[Warning:Il2CppInterop] Method Void set_AppTradeHistory(SOD.StockMarket.Implementation.Cruncher.Content.AppTradeHistory) on type SOD.StockMarket.Implementation.Cruncher.StockMarketAppContent has unsupported parameter SOD.StockMarket.Implementation.Cruncher.Content.AppTradeHistory value of type SOD.StockMarket.Implementation.Cruncher.Content.AppTradeHistory
[Warning:Il2CppInterop] Method SOD.StockMarket.Implementation.Cruncher.Content.AppIntroduction get_AppIntroduction() on type SOD.StockMarket.Implementation.Cruncher.StockMarketAppContent has unsupported return type SOD.StockMarket.Implementation.Cruncher.Content.AppIntroduction
[Warning:Il2CppInterop] Method Void set_AppIntroduction(SOD.StockMarket.Implementation.Cruncher.Content.AppIntroduction) on type SOD.StockMarket.Implementation.Cruncher.StockMarketAppContent has unsupported parameter SOD.StockMarket.Implementation.Cruncher.Content.AppIntroduction value of type SOD.StockMarket.Implementation.Cruncher.Content.AppIntroduction
[Warning:Il2CppInterop] Method SOD.StockMarket.Implementation.Cruncher.Content.AppBuyLimitInterface get_AppBuyLimitInterface() on type SOD.StockMarket.Implementation.Cruncher.StockMarketAppContent has unsupported return type SOD.StockMarket.Implementation.Cruncher.Content.AppBuyLimitInterface
[Warning:Il2CppInterop] Method Void set_AppBuyLimitInterface(SOD.StockMarket.Implementation.Cruncher.Content.AppBuyLimitInterface) on type SOD.StockMarket.Implementation.Cruncher.StockMarketAppContent has unsupported parameter SOD.StockMarket.Implementation.Cruncher.Content.AppBuyLimitInterface value of type SOD.StockMarket.Implementation.Cruncher.Content.AppBuyLimitInterface
[Warning:Il2CppInterop] Method SOD.StockMarket.Implementation.Cruncher.Content.AppSellLimitInterface get_AppSellLimitInterface() on type SOD.StockMarket.Implementation.Cruncher.StockMarketAppContent has unsupported return type SOD.StockMarket.Implementation.Cruncher.Content.AppSellLimitInterface
[Warning:Il2CppInterop] Method Void set_AppSellLimitInterface(SOD.StockMarket.Implementation.Cruncher.Content.AppSellLimitInterface) on type SOD.StockMarket.Implementation.Cruncher.StockMarketAppContent has unsupported parameter SOD.StockMarket.Implementation.Cruncher.Content.AppSellLimitInterface value of type SOD.StockMarket.Implementation.Cruncher.Content.AppSellLimitInterface
[Warning:Il2CppInterop] Method SOD.StockMarket.Implementation.Cruncher.Content.AppLimitOrdersOverview get_AppLimitOrdersOverview() on type SOD.StockMarket.Implementation.Cruncher.StockMarketAppContent has unsupported return type SOD.StockMarket.Implementation.Cruncher.Content.AppLimitOrdersOverview
[Warning:Il2CppInterop] Method Void set_AppLimitOrdersOverview(SOD.StockMarket.Implementation.Cruncher.Content.AppLimitOrdersOverview) on type SOD.StockMarket.Implementation.Cruncher.StockMarketAppContent has unsupported parameter SOD.StockMarket.Implementation.Cruncher.Content.AppLimitOrdersOverview value of type SOD.StockMarket.Implementation.Cruncher.Content.AppLimitOrdersOverview
[Warning:Il2CppInterop] Method SOD.StockMarket.Implementation.Cruncher.IAppContent get_CurrentContent() on type SOD.StockMarket.Implementation.Cruncher.StockMarketAppContent has unsupported return type SOD.StockMarket.Implementation.Cruncher.IAppContent
[Warning:Il2CppInterop] Method Void set_CurrentContent(SOD.StockMarket.Implementation.Cruncher.IAppContent) on type SOD.StockMarket.Implementation.Cruncher.StockMarketAppContent has unsupported parameter SOD.StockMarket.Implementation.Cruncher.IAppContent value of type SOD.StockMarket.Implementation.Cruncher.IAppContent
[Warning:Il2CppInterop] Method System.Collections.Generic.IReadOnlyList`1[SOD.StockMarket.Implementation.Cruncher.IAppContent] get_PreviousContents() on type SOD.StockMarket.Implementation.Cruncher.StockMarketAppContent has unsupported return type System.Collections.Generic.IReadOnlyList`1[SOD.StockMarket.Implementation.Cruncher.IAppContent]
[Warning:Il2CppInterop] Method Void SetTitleDateHeader(System.Object, SOD.Common.Helpers.TimeChangedArgs) on type SOD.StockMarket.Implementation.Cruncher.StockMarketAppContent has unsupported parameter System.Object sender of type System.Object
[Warning:Il2CppInterop] Method Void AddPreviousContent(SOD.StockMarket.Implementation.Cruncher.IAppContent) on type SOD.StockMarket.Implementation.Cruncher.StockMarketAppContent has unsupported parameter SOD.StockMarket.Implementation.Cruncher.IAppContent content of type SOD.StockMarket.Implementation.Cruncher.IAppContent
[Warning:Il2CppInterop] Method Void RemovePreviousContent(SOD.StockMarket.Implementation.Cruncher.IAppContent) on type SOD.StockMarket.Implementation.Cruncher.StockMarketAppContent has unsupported parameter SOD.StockMarket.Implementation.Cruncher.IAppContent content of type SOD.StockMarket.Implementation.Cruncher.IAppContent
[Warning:Il2CppInterop] Method Void SetCurrentContent(SOD.StockMarket.Implementation.Cruncher.IAppContent) on type SOD.StockMarket.Implementation.Cruncher.StockMarketAppContent has unsupported parameter SOD.StockMarket.Implementation.Cruncher.IAppContent content of type SOD.StockMarket.Implementation.Cruncher.IAppContent
[Info   :Il2CppInterop] Registered mono type SOD.StockMarket.Implementation.Cruncher.StockMarketAppContent in il2cpp domain
[Info   :StockMarket] Plugin registered custom types into IL2CPP domain.
[Info   :StockMarket] Plugin initialized stock market hooks.
[Info   :StockMarket] Plugin is patched.
[Message:   BepInEx] Chainloader startup complete
[Message:     Unity] Auto initialized
[Info   :Il2CppInterop] Registered mono type UniverseLib.AssetBundle in il2cpp domain
[Message:     Unity] Beginning load of group: data
[Message:     Unity] Finished load of group: data, took 13.88203 seconds
[Message:     Unity] Beginning load of group: floor_data
[Message:     Unity] Finished load of group: floor_data, took 0.05555439 seconds
[Warning:     Unity] DontDestroyOnLoad only works for root GameObjects or components on root GameObjects.
[Warning:     Unity] DontDestroyOnLoad only works for root GameObjects or components on root GameObjects.
[Warning:     Unity] DontDestroyOnLoad only works for root GameObjects or components on root GameObjects.
[Warning:     Unity] DontDestroyOnLoad only works for root GameObjects or components on root GameObjects.
[Info   :       QoL] Adjusted energy restore amount for "MugTea" to "0.07".
[Info   :       QoL] Adjusted energy restore amount for "MugCoffee" to "0.11".
[Info   :       QoL] Adjusted energy restore amount for "StarchKola" to "0.1".
[Info   :       QoL] Adjusted energy restore amount for "TakeawayCoffee" to "0.12".
[Warning:     Unity] DontDestroyOnLoad only works for root GameObjects or components on root GameObjects.
[Warning:     Unity] DontDestroyOnLoad only works for root GameObjects or components on root GameObjects.
[Info   :AssetBundleLoader] Using existing bundle: C:\Users\[user]\AppData\Roaming\Thunderstore Mod Manager\DataFolder\ShadowsofDoubt\profiles\Default\BepInEx\plugins\Piepieonline-RealEstateCruncherApp\realestatelistingcruncherappbundle_stable
[Info   :RealEstateListingCruncherApp] Loading custom asset bundle complete
[Info   :AssetBundleLoader] Using existing bundle: C:\Users\[user]\AppData\Roaming\Thunderstore Mod Manager\DataFolder\ShadowsofDoubt\profiles\Default\BepInEx\plugins\Venomaus-SODStockMarket\stockmarketbundle_stable
[Info   : DDSLoader] Loaded DDS Content and Patches For: Piepieonline-RealEstateCruncherApp
[Info   : DDSLoader] Loaded String Content For: Piepieonline-RealEstateCruncherApp
[Info   :StockMarket] Attempting to load a premod install savegame, a new market economy will be generated for this savegame.
[Info   :StockMarket] Stock market initialized.
[Error  :Il2CppInterop] Exception in IL2CPP-to-Managed trampoline, not passing it to il2cpp: System.Exception: Time is not initialized at this state of the game, check for the property "Lib.Time.IsInitialized".
   at SOD.Common.Helpers.Time.get_CurrentDateTime()
   at SOD.StockMarket.Implementation.Cruncher.StockMarketAppContent.GetCurrentDateTimeReadable()
   at SOD.StockMarket.Implementation.Cruncher.StockMarketAppContent.SetTitleDateHeader(Object sender, TimeChangedArgs e)
   at SOD.StockMarket.Implementation.Cruncher.StockMarketAppContent.OnSetup()
   at Trampoline_VoidThisSOD.StockMarket.Implementation.Cruncher.StockMarketAppContentOnSetup(IntPtr , Il2CppMethodInfo* )
Ven0maus commented 7 months ago

Can you provide a savegame where I can reproduce this, or atleast some reproduction steps from scratch because I cannot reproduce this scenario?

joveice commented 7 months ago

Sure! here is the savefile that I experienced it on (Notice the .txt at the end, sodb wasn't supported by github.)

All I did was install it, open the save and open the cruncher.

This is the full list of mods I have, I don't think there should be any of those that caused the conflict, but here it is:

Reuben Schulz Brisbane 2024-25-4-22-45-2216.sodb.txt

joveice commented 7 months ago

Likely gonna need the city as well I guess. Brisbane.2.3707.CityEditor.citb.txt Brisbane.2.3707.CityEditor.txt

Ven0maus commented 7 months ago

Thank you for the bug report, I fixed a really serious issue in Lib.Time helper of SOD.Common because of it. Bug is solved in v2.0.0 of SOD.Common release. Should be released sometime soon.