homothetyhk / HollowKnight.ItemChanger

A Hollow Knight mod for editing and adding items
GNU Lesser General Public License v2.1
15 stars 12 forks source link

Game fails to load on linux #9

Closed pixeled4life closed 2 years ago

pixeled4life commented 2 years ago

The game will fail to load on linux with ItemcChanger enabled unless ItemChangerMod.GlobalSettings.json is created manually in the appropiate directory.

Running in the steam version on manjaro.

Shouldn't be a permissions issue since I'm running the game with the same user I was when creating the file.

Open to help testing if necessary

flibber-hk commented 2 years ago

If you try to load the game without the globalsettings file there, is there anything in the modlog.txt (located in the save files directory)?

pixeled4life commented 2 years ago

This is the content of ModLog.txt with only ItemChanger installed and no GlobalSettings file

[INFO]:[API] - Main menu loading
[INFO]:[API] - Starting mod loading
[INFO]:[API] - Loading Global Settings
[INFO]:[ItemChangerMod] - Initializing
[INFO]:[API] - Creating mod preloads
[INFO]:[API] - Preloaded reflection in 3011ms

After it reaches that point the game completely freezes

Sorry for pasting it, for some reason I can't upload the file

EDIT: Here's the content of ModLog.txt with the GlobalSettings file just in case, booted and closed the game fine

[INFO]:[API] - Main menu loading
[INFO]:[API] - Starting mod loading
[INFO]:[API] - Loading Global Settings
[INFO]:[ItemChangerMod] - Initializing
[INFO]:[ItemChangerMod] - Loading Global Settings
[INFO]:[API] - Creating mod preloads
[INFO]:[API] - Preloaded reflection in 2982ms
[INFO]:[API] - Main menu loading
[INFO]:[ItemChangerMod] - Saving Global Settings
[INFO]:[API] - Saving Global Settings
flibber-hk commented 2 years ago

Hmm, I'm not sure what the issue is.

Just to clarify, the global settings are where mods store persistent data across sessions - the globalsettings file I gave you basically told ItemChanger not to preload as much stuff (so instead of loading one of each different type of soul totem and geo rock, it'll only preload one rock and one totem; this won't affect you if you don't play with those pools randomized, but if you do then it'll mean that all rocks and totems look the same).

Apparently your game can't handle all of those objects and I'm not really sure why - but it seems to be fine for most people (including other linux users).

pixeled4life commented 2 years ago

Okay so I'm not really sure I know what I'm doing but I've messed around a bit. I'm assuming 0 means "preload everything" and 1 means "preload just 1".

It only happens when preloading both soul totems and geo rocks at the same time. Setting either one to 1 will boot just fine.

To be honest seeing this is mostly affecting just me I'd let this go, don't really want to be a nuisance.

EDIT: Alright that previous statement was false. When having more mods installed I do need to set them both to 1 so I'm guessing this is dependant on the system load.

liushengqi000 commented 2 years ago

me too Hollow Knight 1.5.78.11833 Modding API 1.5.78.11833.68

Player.log

================================================================= Got a SIGSEGV while executing native code. This usually indicates a fatal error in the mono runtime or one of the native libraries used by your application.

Caught fatal signal - signo:11 code:1 errno:0 addr:0x40 Obtained 16 stack frames.

0 0x007f7d4272f3c0 in funlockfile

1 0x007f7c695addbd in vk_icdNegotiateLoaderICDInterfaceVersion

2 0x007f7c69704254 in vk_icdNegotiateLoaderICDInterfaceVersion

3 0x007f7d433e8a85 in vk::AllocateImage(VkDevice_T, VkPhysicalDeviceMemoryProperties const&, vk::MemoryAllocator&, VkImage_T, unsigned int, unsigned long)

4 0x007f7d434233d6 in vk::ImageManager::PrepareNewImage(TextureDimension, int, VkExtent3D const&, VkFormat, int, unsigned int, VkSampleCountFlagBits, VkFormat, bool, vk::ImageMemory, bool, bool, unsigned int)

5 0x007f7d43423fa8 in vk::ImageManager::CreateImage(vk::CommandBuffer, vk::ScratchBuffer, TextureDimension, vk::ImageData const&, VkExtent3D const&, GraphicsFormat, int, unsigned int, VkSampleCountFlagBits, bool, TextureUploadFlags)

6 0x007f7d433d0d0c in vk::Texture::Create(vk::CommandBuffer, vk::ScratchBuffer, TextureID, TextureDimension, vk::ImageData const&, VkExtent3D const&, GraphicsFormat, int, VkSampleCountFlagBits, TextureUploadFlags, bool, bool)

7 0x007f7d433d0848 in GfxDeviceVK::AcquireTexture2DUploadMemory(TextureCreateData&, TextureUploadMemory*&)

8 0x007f7d435f39c6 in AsyncTextureProcessingCompleteCallback(GfxDevice&, AsyncUploadCallbackInfo const&)

9 0x007f7d435e3a5c in AsyncUploadManager::AsyncResourceUpload(GfxDevice&, int, AsyncUploadManagerSettings const&)

10 0x007f7d43ea6347 in GfxDeviceWorker::RunCommand(ThreadedStreamBuffer&)

11 0x007f7d43ea915f in GfxDeviceWorker::RunExt(ThreadedStreamBuffer&)

12 0x007f7d43ea0165 in GfxDeviceWorker::RunGfxDeviceWorker(void*)

13 0x007f7d43793b2a in Thread::RunThreadWrapper(void*)

14 0x007f7d42723609 in start_thread

ModLog.txt

[INFO]:[API] - Main menu loading [INFO]:[API] - Starting mod loading [INFO]:[API] - Loading Global Settings [INFO]:[ItemChangerMod] - Initializing [INFO]:[ItemChangerMod] - Loading Global Settings [INFO]:[API] - Creating mod preloads [INFO]:[API] - Preloaded reflection in 1842ms

Player.log ModLog.txt

liushengqi000 commented 2 years ago

"LoggingLevel": 0 ModLog.txt

ModLog.txt

liushengqi000 commented 2 years ago

while ItemChangerMod.GlobalSettings.json exist in ~/.config/unity3d/Team Cherry/Hollow Knight,mod menu doesn't display in options

flibber-hk commented 2 years ago

@liushengqi000

The advice I gave to @pixeled4life in the HK discord was to create ItemChangerMod.GlobalSettings.json in the saves directory with contents:

{
  "PreloadSettings": {
    "PreloadLevels": {
      "PreloadGeoRocks": 1,
      "PreloadSoulTotems": 1,
      "PreloadGrub": 0,
      "PreloadMimic": 0
    }
  },
  "ItemSettings": {
    "extraSheets": []
  },
  "LocationSettings": {
    "extraSheets": []
  }
}

This basically makes it so it preloads only one of each totem and geo rock (as discussed above). I'm not sure why having a blank global settings file would break the mod menu but that could be the issue (if not, it might be another mod)?

One alternative fix, that might be worth trying at least, would be to try this version of the Modding API: https://github.com/hk-modding/api/actions/runs/1868093759 (for any observers, you'll need a github account to download it). Some changes to how preloading was done were made in that version, so it's possible that things were fixed.

It seems from the error dump that the issue was a seg fault, which means it's probably not our problem, but not necessarily. Certainly it's weird that it's only affecting some linux users, because AFAIK it's fine for most.

liushengqi000 commented 2 years ago

thanks,i will try

liushengqi000 commented 2 years ago

ItemChangerMod.GlobalSettings.json works well. Modding API:https://github.com/hk-modding/api/actions/runs/1868093759 can't load ItemChanger and another mod at the same time.

/var/log/sys.log

Feb 21 19:36:46 localhost Hollow Knight.desktop[7616]: Uploaded AppInterfaceStats to Steam Feb 21 19:36:48 localhost Hollow Knight.desktop[7616]: No cached sticky mapping in ActivateActionSet. Feb 21 19:36:48 localhost Hollow Knight.desktop[23703]: (process:23703): GLib-GObject-CRITICAL **: g_object_unref: assertion `G_IS_OBJECT (object)' failed

showing an openCV window that isn't initialized with an image?

homothetyhk commented 2 years ago

Closed due to inactivity, and due to the issue seemingly lying with hardware and the Modding API.