protonscr

Touhou Fantastic Danmaku Festival Part II

protonopen appid 1031480Game compatibility - Unofficial.NET.NET-XNA
ValveSoftware/Proton#3657 · opened 2020-03-20 by williewillus · updated 2023-12-27 · 7 comments · github · game page · search this game
1 matching comments, n / p to jump
Wwilliewillus 2020-03-20 github

Compatibility Report

  • Name of the game with compatibility issues: Touhou Fantastic Danmaku Festival Part II
  • Steam AppID of the game: 1031480

System Information

I confirm:

  • [x] that I haven't found an existing compatibility report for this game.
  • [x] that I have checked whether there are updates for my system available.

steam-1031480.log

Symptoms

Pre-launch configure screen comes up successfully, but clicking through that leads to the game exiting -- the main window never comes up.
Probably same reason as the prequel to this game (#2114)

Reproduction

Launch the game and hit start on the pre-launch configuration screen.

Fflibitijibibo 2020-03-31 github

This one seems to be a GDI issue?

[00000039:] EXCEPTION handling: System.ArgumentException: The requested FontFamily could not be found [GDI+ status: FontFamilyNotFound]
[00000039:] EXCEPTION handling: System.ArgumentException: 'CP1252' is not a supported encoding name. For information on defining a custom encoding, see the documentation for the Encoding.RegisterProvider method.
Parameter name: name
Mmadewokherd 2020-04-01 github

Eh, winforms always does that.

But, I just noticed this:
124711.074:0038:0039:trace:mscoree:ReallyFixupVTable 006FD1E8,02080000,L"Z:\\data\\SteamLibrary\\steamapps\\common\\Touhou FDF Part II\\Microsoft.Xna.Framework.Graphics.dll"

That means we're using the real XNA instead of FNA, so no surprise it doesn't work. The override code must not work right when the dll's are in the application directory.

Rregrettable 2021-01-02 github

But, I just noticed this:
124711.074:0038:0039:trace:mscoree:ReallyFixupVTable 006FD1E8,02080000,L"Z:\\data\\SteamLibrary\\steamapps\\common\\Touhou FDF Part II\\Microsoft.Xna.Framework.Graphics.dll"

That means we're using the real XNA instead of FNA, so no surprise it doesn't work. The override code must not work right when the dll's are in the application directory.

None of the instructions on winedb/protondb helped me before this. I guess it makes sense, if you want to play the game, just remove all the dlls. Thanks a lot though, I've reinstalled both games like 5 times, and only got to play a little bit before this.

Wwilliewillus 2023-12-25 github

Hmm, recently I've been getting a different problem. The game starts and I can start a run successfully, but once I reach a boss I get a GDI related error:

[22:01:48]
System.ArgumentException: A null reference or invalid value was found [GDI+ status: InvalidParameter]
  at System.Drawing.GDIPlus.CheckStatus (System.Drawing.Status status) [0x00098] in <fc2ea6474c6d4315858618f13de6e72a>:0 
  at System.Drawing.Bitmap..ctor (System.Int32 width, System.Int32 height, System.Drawing.Imaging.PixelFormat format) [0x00016] in <fc2ea6474c6d4315858618f13de6e72a>:0 
  at (wrapper remoting-invoke-with-check) System.Drawing.Bitmap..ctor(int,int,System.Drawing.Imaging.PixelFormat)
  at Microsoft.Xna.Framework.SpriteFontX.addTex (System.Char chr) [0x0008f] in <03ed30b1955b4102b4cadc0c09055462>:0 
  at Microsoft.Xna.Framework.SpriteFontX.Draw (Microsoft.Xna.Framework.Graphics.SpriteBatch sb, System.String str, Microsoft.Xna.Framework.Vector2 position, Microsoft.Xna.Framework.Vector2 maxBound, Microsoft.Xna.Framework.Vector2 scale, Microsoft.Xna.Framework.Color color) [0x00082] in <03ed30b1955b4102b4cadc0c09055462>:0 
  at Microsoft.Xna.Framework.SpriteFontX.Draw (Microsoft.Xna.Framework.Graphics.SpriteBatch sb, System.String str, Microsoft.Xna.Framework.Vector2 position, Microsoft.Xna.Framework.Color color) [0x00018] in <03ed30b1955b4102b4cadc0c09055462>:0 
  at THMHJ.Dialog.Draw (Microsoft.Xna.Framework.Graphics.SpriteBatch s) [0x003cc] in <03ed30b1955b4102b4cadc0c09055462>:0 
  at THMHJ.Game.SDraw (THMHJ.NSpriteBatch s) [0x00385] in <03ed30b1955b4102b4cadc0c09055462>:0 
  at THMHJ.Main.Draw (Microsoft.Xna.Framework.GameTime gameTime) [0x00065] in <03ed30b1955b4102b4cadc0c09055462>:0 
  at Microsoft.Xna.Framework.Game.Tick () [0x0026c] in <ac49f792d1924f2ca9e12200b1e6ae07>:0 
  at Microsoft.Xna.Framework.Game.RunLoop () [0x0001f] in <ac49f792d1924f2ca9e12200b1e6ae07>:0 
  at Microsoft.Xna.Framework.Game.Run () [0x00035] in <ac49f792d1924f2ca9e12200b1e6ae07>:0 
  at THMHJ.Program.Main (System.String[] args) [0x0006b] in <03ed30b1955b4102b4cadc0c09055462>:0 

To reproduce, just press Z repeatedly at the menu to enter the game with the default shot (or pick easy mode when the choice comes up for easier repro). When you reach the end of stage 1, the game will crash when the boss enters.
This happens with all the XNA dll's and stuff intact and untouched.

Mmadewokherd 2023-12-26 github

That means we're using the real XNA instead of FNA, so no surprise it doesn't work. The override code must not work right when the dll's are in the application directory.

FWIW, this comment is doubly no longer relevant. Load order was fixed so FNA is being used now, and Wine Mono has advanced to the point that the real XNA can sometimes work if configured to use it (by setting WINE_MONO_OVERRIDES=Microsoft.Xna.Framework.*,Gac=y). Since this appears to be an issue in a support library, I doubt it will make a difference which one is used though.

Mmadewokherd 2023-12-26 github

It's a gdiplus bug. The game calls GdipMeasureString with just the newline character "\n" which returns 0x0, then it tries to create a Bitmap with that size, which fails. I guess "\n" should have a non-zero size.

I confirmed that by hacking around it with this modification, but that's obviously not the correct solution:

diff --git a/dlls/gdiplus/graphics.c b/dlls/gdiplus/graphics.c
index ea6a6ba3874..cbc473e59e2 100644
--- a/dlls/gdiplus/graphics.c
+++ b/dlls/gdiplus/graphics.c
@@ -5615,6 +5615,13 @@ GpStatus WINGDIPAPI GdipMeasureString(GpGraphics *graphics,
     if (temp_hdc)
         DeleteDC(temp_hdc);
 
+    TRACE("<- %s\n", debugstr_rectf(bounds));
+
+    if (bounds->Width == 0.0)
+        bounds->Width = 1;
+    if (bounds->Height == 0.0)
+        bounds->Height = 1;
+
     return Ok;
 }
Mmadewokherd 2023-12-27 github

I just pushed a hack, so this should work with Experimental on the bleeding-edge beta.