[Bug 47053] New: Beat Saber 'BSIPA' injector (needed for all mods) breaks in Wine

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

[Bug 47053] New: Beat Saber 'BSIPA' injector (needed for all mods) breaks in Wine

Wine - Bugs mailing list
https://bugs.winehq.org/show_bug.cgi?id=47053

            Bug ID: 47053
           Summary: Beat Saber 'BSIPA' injector (needed for all mods)
                    breaks in Wine
           Product: Wine
           Version: 4.6
          Hardware: x86
                OS: Linux
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: -unknown
          Assignee: [hidden email]
          Reporter: [hidden email]
      Distribution: ---

Tool is a mod injector necessary to load any custom mods in Beat Saber. Uses
.net (I believe 4.6.2 based on the logs). If the tool is run in Windows and
then the resulting files are copied over to Linux, the game runs fine and loads
the .DLL based mods. If the tool is run through wine, it breaks and reverts
itself partially (safely, no crash). Game still runs but mods don't load
properly. The '--revert' option in the tool seems to function without issue,
it's only the initial mod install that fails.

Reproduction steps:
1. Download Beat Saber (Steam version tested)
2. Download BSIPA from https://beatmods.com/#/mods (tested w/ 3.12.12) and
unzip to the Beat Saber dir
3. Run 'IPA.exe' with no arguments from within the Beat Saber directory

--
Do not reply to this email, post in Bugzilla using the
above URL to reply.
You are receiving this mail because:
You are watching all bug changes.


Reply | Threaded
Open this post in threaded view
|

[Bug 47053] Beat Saber 'BSIPA' injector (needed for all mods) breaks in Wine

Wine - Bugs mailing list
https://bugs.winehq.org/show_bug.cgi?id=47053

--- Comment #1 from George Gibbs <[hidden email]> ---
Attachment of logs fails as it's 11M even when gzipped - uploaded it elsewhere
instead:

https://trekker.guru/bsipa.winedebug.gz

--
Do not reply to this email, post in Bugzilla using the
above URL to reply.
You are receiving this mail because:
You are watching all bug changes.


Reply | Threaded
Open this post in threaded view
|

[Bug 47053] Beat Saber 'BSIPA' injector (needed for all mods) breaks in Wine

Wine - Bugs mailing list
In reply to this post by Wine - Bugs mailing list
https://bugs.winehq.org/show_bug.cgi?id=47053

George Gibbs <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Hardware|x86                         |x86-64
                URL|                            |https://beatmods.com/#/mods
       Distribution|---                         |ArchLinux
                 CC|                            |[hidden email]

--
Do not reply to this email, post in Bugzilla using the
above URL to reply.
You are receiving this mail because:
You are watching all bug changes.


Reply | Threaded
Open this post in threaded view
|

[Bug 47053] Beat Saber 'BSIPA' injector (needed for all mods) breaks in Wine

Wine - Bugs mailing list
In reply to this post by Wine - Bugs mailing list
https://bugs.winehq.org/show_bug.cgi?id=47053

--- Comment #2 from George Gibbs <[hidden email]> ---
You can tell that this fails easily during the injection as the console output
shows: "Restoring old version..." and it does not continue with the injection.
It leaves the game in some semi-patched state where the files don't match
Steam's but it also isn't fully modded and doesn't properly run the mods
(available on the same beatmods website but not really necessary for
duplicating the error).

--
Do not reply to this email, post in Bugzilla using the
above URL to reply.
You are receiving this mail because:
You are watching all bug changes.


Reply | Threaded
Open this post in threaded view
|

[Bug 47053] Beat Saber 'BSIPA' injector (needed for all mods) breaks in Wine

Wine - Bugs mailing list
In reply to this post by Wine - Bugs mailing list
https://bugs.winehq.org/show_bug.cgi?id=47053

George Gibbs <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|---                         |INVALID

--- Comment #3 from George Gibbs <[hidden email]> ---
Worked with ZF in discord on this - looks like the new IPA loader is pulling in
winhttp and required a dll override for that.

--
Do not reply to this email, post in Bugzilla using the
above URL to reply.
You are receiving this mail because:
You are watching all bug changes.


Reply | Threaded
Open this post in threaded view
|

[Bug 47053] Beat Saber 'BSIPA' injector using Unity Doorstop proxy ( .NET 4.6) fails to hook 'winhttp.dll' (Wine's 'winhttp.dll' is preferred over native, causing failure to load app provided library with same name)

Wine - Bugs mailing list
In reply to this post by Wine - Bugs mailing list
https://bugs.winehq.org/show_bug.cgi?id=47053

Anastasius Focht <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                URL|https://beatmods.com/#/mods |https://web.archive.org/web
                   |                            |/20190421082838/https://bea
                   |                            |tmods.com/uploads/5cb3e338e
                   |                            |2265514cf9114d5/universal/B
                   |                            |SIPA-3.12.12.zip
         Resolution|INVALID                     |---
     Ever confirmed|0                           |1
             Status|RESOLVED                    |REOPENED
           Keywords|                            |download
            Summary|Beat Saber 'BSIPA' injector |Beat Saber 'BSIPA' injector
                   |(needed for all mods)       |using Unity Doorstop proxy
                   |breaks in Wine              |(.NET 4.6) fails to hook
                   |                            |'winhttp.dll' (Wine's
                   |                            |'winhttp.dll' is preferred
                   |                            |over native, causing
                   |                            |failure to load app
                   |                            |provided library with same
                   |                            |name)
                 CC|                            |[hidden email]

--- Comment #4 from Anastasius Focht <[hidden email]> ---
Hello George,

I guess you are talking about this Github project:

https://github.com/beat-saber-modding-group/BeatSaber-IPA-Reloaded

Specifically:

https://github.com/nike4613/UnityDoorstop-BSIPA/tree/0f76cf26a2f84c6cd82a1c7a1d773c10be6ba233

--- quote ---
Doorstop is a tool to execute managed assemblies inside Unity as early as
possible!
...
Custom proxy functions

Doorstop's proxy is flexible and allows to be load as different DLLs. You can
modify which functions you want to proxy by adding/removing function names in
Proxy/proxydefs.txt and running proxygen/proxy_gen.py ../Proxy/proxydefs.txt to
generate an appropriate proxy functions.

The current set up allows to use the proxy for the following DLLs:

    winhttp.dll (All exports)
    iphlpapi.dll (Only GetIpAddrTable)
--- quote ---

I don't have the game to test with so I looked at the source code of the
mod/injector. It seems BSIPA's variant of Doorstop provides its own
'winhttp.dll' which is used as injector "proxy" dll. I guess the injector's
'winhttp' from private path is not picked up due to the Wine builtin having the
same name?

That would be still a valid Wine bug. There are a couple of Wine bugs of the
same class related to preferring builtin when a "native" dll of same name from
working directory should have been loaded.

* bug 14980 ("Wine does not automatically use the riched20 installed by Office
2003/2007/2010/2013/2016")
* bug 43472 ("R-Link 2 Toolbox crashes on startup (Wine's 'packager.dll' is
preferred over native, causing failure to load app provided library with same
name)")
* bug 45551 ("InstallShield exits with 0x80004002, cannot find
SECURITY.MySetFileSecurity (Wine's 'security.dll' is preferred over native,
causing failure to load app provided library with same name)")

Last time that kind of problem was discussed here:

https://www.winehq.org/pipermail/wine-devel/2019-April/thread.html#143773
("[PATCH] packager: Prefer native version.") -> no indication/conclusion on the
proper solution

Reopening and refining some fields.

$ sha1sum BSIPA-3.12.12.zip
362ec6ae31fe318c758bcd966d3b553a81774b20  BSIPA-3.12.12.zip

$ du -sh BSIPA-3.12.12.zip
1.4M    BSIPA-3.12.12.zip

$ wine --version
wine-4.6-111-g0664b062c6

Regards

--
Do not reply to this email, post in Bugzilla using the
above URL to reply.
You are receiving this mail because:
You are watching all bug changes.