nike4613 / BeatSaber-IPA-Reloaded

A Unity mod injector built for Beat Saber.
https://nike4613.github.io/BeatSaber-IPA-Reloaded/
Other
180 stars 28 forks source link

Exception initializing logging when using --verbose #10

Closed Hyphen-ated closed 5 years ago

Hyphen-ated commented 5 years ago

When I run bsipa 3.12.14 in a fresh install of beat saber, and then run beat saber with the --verbose parameter, this stacktrace is generated every time I launch the game:

System.ComponentModel.Win32Exception (0x80004005): The parameter is incorrect.

  at IPA.Logging.WinConsole.InitializeOutStream () [0x00061] in <42e6b957870f49a
8b15c6a9cec75005b>:0
  at IPA.Logging.WinConsole.InitializeStreams () [0x00000] in <42e6b957870f49a8b
15c6a9cec75005b>:0
  at IPA.Logging.WinConsole.Initialize (System.Boolean alwaysCreateNewConsole) [
0x00023] in <42e6b957870f49a8b15c6a9cec75005b>:0
  at IPA.Injector.Injector.Main (System.String[] args) [0x00011] in <442e552a97d
843ada80a94daad31e07b>:0

When I then put dlls in plugins/, they don't get loaded. The game itself still runs properly, just without mods.

When I stop using --verbose, everything works as expected and mods get loaded.

If I then turn --verbose back on, the exception returns and the game is just a black screen. verbose is nice for mod development so I would like to be able to use it

--verbose worked fine for me back on beatsaber 0.12.2 (before bsipa had forked ipa?)

(windows 8.1, steam)

nike4613 commented 5 years ago

Oooh, this is a new one. I think I know whats causing it, but could you reproduce the error with --debug in the launch arguments just to confirm?

Hyphen-ated commented 5 years ago
System.ComponentModel.Win32Exception (0x80004005): The parameter is incorrect.

  at IPA.Logging.WinConsole.InitializeOutStream () [0x0006d] in C:\IPA.Loader\Lo
gging\ConsoleWindow.cs:66
  at IPA.Logging.WinConsole.InitializeStreams () [0x00000] in C:\IPA.Loader\Logg
ing\ConsoleWindow.cs:42
  at IPA.Logging.WinConsole.Initialize (System.Boolean alwaysCreateNewConsole) [
0x00023] in C:\IPA.Loader\Logging\ConsoleWindow.cs:35
  at IPA.Injector.Injector.Main (System.String[] args) [0x00011] in <442e552a97d
843ada80a94daad31e07b>:0
nike4613 commented 5 years ago

Yeah, that was exactly what I thought it was...

Basically, one of the more recent BSIPA updates made the console accept VT-100 escape sequences, by calling SetConsoleMode with the correct flag. Trouble is, that flag was introduced in Windows 10 1603 or something close to that. There should be a fix on AppVeyor. Let me know if you have any issues with it.

For the record, you should really consider updating to Windows 10. I personally really don't want to fight backwards compatibility, and IMO there are a lot of things about Win10 that are really nice. I can send you an install image if you want, for (probably) just about any version.

Hyphen-ated commented 5 years ago

That fix works, thank you!

I am not interested in installing windows 10 at this time.