satisfactorymodding / SatisfactoryModManager

A mod manager for easy installation of mods and modloader for Satisfactory
GNU General Public License v3.0
324 stars 77 forks source link

SMM3: Application does not start (after reboot?) #189

Open eeeeb opened 4 months ago

eeeeb commented 4 months ago

Hey, I installed SMM3 (SatisfactoryModManager v3.0.0-beta.1) yesterday and everything was working. Today I tried to run it again and it will not load the main window. The .exe shows up in the task manager for a few seconds and then disappears again. I uninstalled and deleted the SatisfactoryModManager folders in AppData/Roaming and AppData/Local and then installed SMM3 again, but it is still not working.

I was not able to locate any logs. Where would I need to look for those?

There is always the possibility that either Malwarebytes or Windows Defender is blocking the file, but I did not get any notification from them.

mircearoata commented 4 months ago

SMM uses ficsit-cli for managing the mods, so it's likely one of its files is corrupted. For compatibility between the two, those files are stored in %appdata%\ficsit (2 json files).

For the logs missing, that's a different issue, because it was first trying to write the logs to the console, which doesn't exist for a GUI app, so it errored before attempting to write them to the file too.

To avoid this confusion over the app not launching when something errors very early in the initialization, such that the window can't even be displayed, I've added message boxes displaying those errors. Both this and the fix for logging are in the latest build you can get from Actions Artifacts.

Back to the main issue, though, you're the second person to run into this issue, but I'm not sure how those files can get corrupted: they are only open when initializing and when saving changes, and SMM should only save them when there actually are changes being made by you.

So, for now, all you can do is check the files in %appdata%\ficsit and delete the ones that are not json files. Deleting the installs one is safe, SMM will repopulate it with the auto-detected installs, and you can add back your remote servers if any. For the profiles one, however, there are no backups, so if that's the one that got corrupted, it's unfortunately just lost.

As for a fix to this issue, we were discussing a couple of days ago separating the profiles to multiple files (as SMM2 was, which ficsit-cli/SMM3 aren't doing simply because the code structure just made it very easy to store the entire profile management state as a single json), and atomic file writes, to make sure that the files are at least valid, if not latest.

However, for the previous person who had this issue, the file was full of NULLs, so I'm not sure whether that's the file getting corrupted while writing to it, or whether that's actually what the code was writing to the file. Now that logging will actually work in the next beta, I hope we can find out how the file actually gets corrupted.

eeeeb commented 4 months ago

Hey I appreciate your quick response.

I installed the latest version from the artifacts and removed the two json files. SMM3 now starts again.

I tried to install a lot of mods yesterday that were not compatible with the server (SML <3.7.0 and which did not have the server compatibility table on the website). When I tried to install those non compatible mods, I got the error message "... not available for LinuxServer", but then the mod was in the list of installed mods in SMM3. Afterwards it seemed with every additional mod that SMM3 was downloading (I queued a lot of mods to install), I got the same message again for a mod that previously failed to install because of the compatibility issue. Afterwards I checked the mods folder on the server, if the non compatible mods were installed, but they were not. Only after I removed the mod in SMM3 (little trash icon) then the error messages disappeared.

Could this perhaps have something to do with the corruption of the json file?

BTW this was my profiles.json

{
  "profiles": {
    "Default": {
      "mods": {
        "AB_FluidExtras": {
          "version": "\u003e=1.0.2",
          "enabled": true
        },
        "ArmorModules__Modpack_All": {
          "version": "\u003e=0.0.0",
          "enabled": true
        },
        "BigStorageTank": {
          "version": "\u003e=0.0.0",
          "enabled": true
        },
        "CounterLimiter": {
          "version": "\u003e=0.0.0",
          "enabled": true
        },
        "CrashSiteBeacons": {
          "version": "\u003e=0.0.0",
          "enabled": true
        },
        "DI_MoreGlassAndWalls": {
          "version": "\u003e=0.0.0",
          "enabled": true
        },
        "DaisyChainEverything": {
          "version": "\u003e=0.0.0",
          "enabled": true
        },
        "FasterManualCraftingRedux": {
          "version": "\u003e=0.0.0",
          "enabled": true
        },
        "FicsitFarming": {
          "version": "\u003e=0.0.0",
          "enabled": true
        },
        "FlexSplines": {
          "version": "\u003e=0.0.0",
          "enabled": true
        },
        "FloorHole": {
          "version": "\u003e=0.0.0",
          "enabled": true
        },
        "FluidSink": {
          "version": "\u003e=0.0.0",
          "enabled": true
        },
        "HyperBoosters": {
          "version": "\u003e=0.0.0",
          "enabled": true
        },
        "InfiniteZoop": {
          "version": "\u003e=0.0.0",
          "enabled": true
        },
        "KBlueprintDesignPlus": {
          "version": "\u003e=0.0.0",
          "enabled": true
        },
        "LoadBalancers": {
          "version": "\u003e=0.0.0",
          "enabled": true
        },
        "MAMTips": {
          "version": "\u003e=0.0.0",
          "enabled": true
        },
        "MultiSplitterAndMerger": {
          "version": "\u003e=0.0.0",
          "enabled": true
        },
        "MultidimensionalFactory": {
          "version": "\u003e=0.0.0",
          "enabled": true
        },
        "PowerSuit": {
          "version": "\u003e=0.0.0",
          "enabled": true
        },
        "RSS": {
          "version": "\u003e=0.0.0",
          "enabled": true
        },
        "RefinedPower": {
          "version": "\u003e=3.2.15",
          "enabled": true
        },
        "SatisfactoryPlus": {
          "version": "\u003e=0.10.6",
          "enabled": true
        },
        "Teleporter": {
          "version": "\u003e=0.0.0",
          "enabled": true
        },
        "WallHoleConveyor": {
          "version": "\u003e=0.0.0",
          "enabled": true
        }
      },
      "name": "Default",
      "required_targets": null
    },
    "Modded-Server": {
      "mods": {
        "AB_FluidExtras": {
          "version": "\u003e=1.0.2",
          "enabled": true
        },
        "ArmorModules__Modpack_All": {
          "version": "\u003e=0.0.0",
          "enabled": true
        },
        "BigStorageTank": {
          "version": "\u003e=0.0.0",
          "enabled": true
        },
        "CounterLimiter": {
          "version": "\u003e=0.0.0",
          "enabled": true
        },
        "CrashSiteBeacons": {
          "version": "\u003e=0.0.0",
          "enabled": true
        },
        "DI_MoreGlassAndWalls": {
          "version": "\u003e=0.0.0",
          "enabled": true
        },
        "DaisyChainEverything": {
          "version": "\u003e=0.0.0",
          "enabled": true
        },
        "FasterManualCraftingRedux": {
          "version": "\u003e=0.0.0",
          "enabled": true
        },
        "FicsitFarming": {
          "version": "\u003e=0.0.0",
          "enabled": true
        },
        "FlexSplines": {
          "version": "\u003e=0.0.0",
          "enabled": true
        },
        "FloorHole": {
          "version": "\u003e=0.0.0",
          "enabled": true
        },
        "FluidSink": {
          "version": "\u003e=0.0.0",
          "enabled": true
        },
        "HyperBoosters": {
          "version": "\u003e=0.0.0",
          "enabled": true
        },
        "InfiniteZoop": {
          "version": "\u003e=0.0.0",
          "enabled": true
        },
        "KBlueprintDesignPlus": {
          "version": "\u003e=0.0.0",
          "enabled": true
        },
        "LoadBalancers": {
          "version": "\u003e=0.0.0",
          "enabled": true
        },
        "MAMTips": {
          "version": "\u003e=0.0.0",
          "enabled": true
        },
        "MultiSplitterAndMerger": {
          "version": "\u003e=0.0.0",
          "enabled": true
        },
        "MultidimensionalFactory": {
          "version": "\u003e=0.0.0",
          "enabled": true
        },
        "PowerSuit": {
          "version": "\u003e=0.0.0",
          "enabled": true
        },
        "RSS": {
          "version": "\u003e=0.0.0",
          "enabled": true
        },
        "RefinedPower": {
          "version": "\u003e=3.2.15",
          "enabled": true
        },
        "SatisfactoryPlus": {
          "version": "\u003e=0.10.6",
          "enabled": true
        },
        "Teleporter": {
          "version": "\u003e=0.0.0",
          "enabled": true
        },
        "WallHoleConveyor": {
          "version": "\u003e=0.0.0",
          "enabled": true
        }
      },
      "name": "Modded-Server",
      "required_targets": null
    },
    "development": {
      "mods": {
        "SML": {
          "version": "\u003e=0.0.0",
          "enabled": true
        }
      },
      "name": "development",
      "required_targets": null
    },
    "modded": {
      "mods": {},
      "name": "modded",
      "required_targets": null
    },
    "vanilla": {
      "mods": {},
      "name": "vanilla",
      "required_targets": null
    }
  },
  "selected_profile": "Default",
  "version": 0
}
eeeeb commented 4 months ago

I tried to install a lot of mods yesterday that were not compatible with the server (SML <3.7.0 and which did not have the server compatibility table on the website). When I tried to install those non compatible mods, I got the error message "... not available for LinuxServer", but then the mod was in the list of installed mods in SMM3. Afterwards it seemed with every additional mod that SMM3 was downloading (I queued a lot of mods to install), I got the same message again for a mod that previously failed to install because of the compatibility issue. Afterwards I checked the mods folder on the server, if the non compatible mods were installed, but they were not. Only after I removed the mod in SMM3 (little trash icon) then the error messages disappeared.

Could this perhaps have something to do with the corruption of the json file?

Okay never mind, even with a fresh profiles.json when I try to add a mod to a newly created profile, the mod will get added with "\u003e=0.0.0" to the profiles.json.