Issues with Kyounyuu Fantasy Gaiden

Questions about Wine on Linux
Post Reply
fraterh
Level 2
Level 2
Posts: 12
Joined: Thu Mar 22, 2018 12:19 pm

Issues with Kyounyuu Fantasy Gaiden

Post by fraterh » Mon Apr 09, 2018 12:20 pm

When I try to run Kyounyuu Fantasy Gaiden I get stuck on a black window. I'm using wine 3.0.Below, the output of the command:

Code: Select all

003a:err:x11settings:X11DRV_ChangeDisplaySettingsEx No matching mode found 800x450x16 @0! (XRandR 1.2)
003a:err:x11settings:X11DRV_ChangeDisplaySettingsEx No matching mode found 800x600x24 @0! (XRandR 1.2)
003a:err:x11settings:X11DRV_ChangeDisplaySettingsEx No matching mode found 800x450x32 @0! (XRandR 1.2)
003a:err:seh:setup_exception_record stack overflow 928 bytes in thread 003a eip 7c6a8395 esp 02440f90 stack 0x2440000-0x2442000-0x2540000
Does anybody have any ideas to fix that? Thanks in advance.

User avatar
Bob Wya
Level 12
Level 12
Posts: 2772
Joined: Sat Oct 16, 2010 7:40 pm
Location: Cambridge
Contact:

Re: Issues with Kyounyuu Fantasy Gaiden

Post by Bob Wya » Mon Apr 09, 2018 2:36 pm

fraterh wrote:When I try to run Kyounyuu Fantasy Gaiden I get stuck on a black window. I'm using wine 3.0.Below, the output of the command:

Code: Select all

003a:err:x11settings:X11DRV_ChangeDisplaySettingsEx No matching mode found 800x450x16 @0! (XRandR 1.2)
003a:err:x11settings:X11DRV_ChangeDisplaySettingsEx No matching mode found 800x600x24 @0! (XRandR 1.2)
003a:err:x11settings:X11DRV_ChangeDisplaySettingsEx No matching mode found 800x450x32 @0! (XRandR 1.2)
003a:err:seh:setup_exception_record stack overflow 928 bytes in thread 003a eip 7c6a8395 esp 02440f90 stack 0x2440000-0x2442000-0x2540000
Does anybody have any ideas to fix that? Thanks in advance.
You'll need to test your game in a Wine Virtual Desktop...
It's try to set a very odd screen refresh rate setting (0Hz ??).
Requested screen refresh rate changes will be ignored when Wine is running applications in an standard X window (aka Wine Virtual Desktop mode).

Just check the Emulate a virtual desktop box - when using the winecfg utility:
Image
Supposedly the game supports the following resolutions:
  • 1280x960 1024x768 800x600 (4:3)
  • 1280x720 1024x576 800x450 (16:9)
So I'd recommend setting your Wine Virtual Desktop to match the largest size, in that list, that will still fit on your native monitor resolution.

If that still doesn't work... Just post the (new) full Wine terminal log.
The full command used to launch the game would be useful - to double check you're not doing something funky there!

Thanks
Bob

fraterh
Level 2
Level 2
Posts: 12
Joined: Thu Mar 22, 2018 12:19 pm

Re: Issues with Kyounyuu Fantasy Gaiden

Post by fraterh » Mon Apr 09, 2018 2:58 pm

Thanks, Bob Wya! Unfortunately the problems remains:

Code: Select all

0030:err:x11settings:X11DRV_ChangeDisplaySettingsEx No matching mode found 1280x960x16 @0! (desktop)
0030:err:x11settings:X11DRV_ChangeDisplaySettingsEx No matching mode found 800x600x24 @0! (desktop)
0030:err:x11settings:X11DRV_ChangeDisplaySettingsEx No matching mode found 1280x960x32 @0! (desktop)
0030:err:seh:setup_exception_record stack overflow 928 bytes in thread 0030 eip 7c6a8395 esp 02440f90 stack 0x2440000-0x2442000-0x2540000
Here's the print of winecfg:
winecfg.png
Winecfg print
winecfg.png (7.54 KiB) Viewed 1790 times

User avatar
Bob Wya
Level 12
Level 12
Posts: 2772
Joined: Sat Oct 16, 2010 7:40 pm
Location: Cambridge
Contact:

Re: Issues with Kyounyuu Fantasy Gaiden

Post by Bob Wya » Mon Apr 09, 2018 3:13 pm

fraterh wrote:Thanks, Bob Wya! Unfortunately the problems remains:

Code: Select all

0030:err:x11settings:X11DRV_ChangeDisplaySettingsEx No matching mode found 1280x960x16 @0! (desktop)
0030:err:x11settings:X11DRV_ChangeDisplaySettingsEx No matching mode found 800x600x24 @0! (desktop)
0030:err:x11settings:X11DRV_ChangeDisplaySettingsEx No matching mode found 1280x960x32 @0! (desktop)
0030:err:seh:setup_exception_record stack overflow 928 bytes in thread 0030 eip 7c6a8395 esp 02440f90 stack 0x2440000-0x2442000-0x2540000
Your winecfg resolution setting doesn't match the exhaustive list of resolutions that the game supported - which I bothered to list (that are also listed in the console spam).
Please fix this!

Btw is it the English port of the older 2011 Japanese game... The port that only supports Windows Vista (and newer)?

Bob

fraterh
Level 2
Level 2
Posts: 12
Joined: Thu Mar 22, 2018 12:19 pm

Re: Issues with Kyounyuu Fantasy Gaiden

Post by fraterh » Mon Apr 09, 2018 4:03 pm

Thanks, Bob! I thought (for some unknown reason) that you suggested to me use resolution greater than the ones supported by the game. Now it matches the greater:
winecfg2.png
winecfg2.png (7.47 KiB) Viewed 1784 times
However, the problems remains:

Code: Select all

0031:err:x11settings:X11DRV_ChangeDisplaySettingsEx No matching mode found 800x450x16 @0! (desktop)
0031:err:x11settings:X11DRV_ChangeDisplaySettingsEx No matching mode found 800x600x24 @0! (desktop)
0031:err:x11settings:X11DRV_ChangeDisplaySettingsEx No matching mode found 800x450x32 @0! (desktop)
0031:err:seh:setup_exception_record stack overflow 928 bytes in thread 0031 eip 7c7a8395 esp 02440f90 stack 0x2440000-0x2442000-0x2540000
Btw is it the English port of the older 2011 Japanese game... The port that only supports Windows Vista (and newer)?
Yes, exactly. That's why my wineprefix is configured to "emulate" windows 7. I don't know if this is enough, tough.

User avatar
Bob Wya
Level 12
Level 12
Posts: 2772
Joined: Sat Oct 16, 2010 7:40 pm
Location: Cambridge
Contact:

Re: Issues with Kyounyuu Fantasy Gaiden

Post by Bob Wya » Mon Apr 09, 2018 4:14 pm

@fraterh,

OK, try blocking Wine's ability to change to new resolution settings, by disabling the xrandr interface completely:

Code: Select all

wine reg add 'HKEY_CURRENT_USER\Software\Wine\X11 Driver' /v 'UseXRandR' /t 'REG_SZ' /d 'N' /f
Bob

fraterh
Level 2
Level 2
Posts: 12
Joined: Thu Mar 22, 2018 12:19 pm

Re: Issues with Kyounyuu Fantasy Gaiden

Post by fraterh » Wed Apr 11, 2018 1:38 pm

Thanks, Bob and sorry for the late reply. Unfortunately, the problems remains:
Output without virtual desktop:

Code: Select all

0031:err:x11settings:X11DRV_ChangeDisplaySettingsEx No matching mode found 800x450x16 @0! (XF86VidMode)
0031:err:x11settings:X11DRV_ChangeDisplaySettingsEx No matching mode found 800x600x24 @0! (XF86VidMode)
0031:err:x11settings:X11DRV_ChangeDisplaySettingsEx No matching mode found 800x450x32 @0! (XF86VidMode)
0031:err:seh:setup_exception_record stack overflow 928 bytes in thread 0031 eip 7c6a8395 esp 02440f90 stack 0x2440000-0x2442000-0x2540000
Output with virtual desktop

Code: Select all

002e:err:x11settings:X11DRV_ChangeDisplaySettingsEx No matching mode found 800x450x16 @0! (desktop)
002e:err:x11settings:X11DRV_ChangeDisplaySettingsEx No matching mode found 800x600x24 @0! (desktop)
002e:err:x11settings:X11DRV_ChangeDisplaySettingsEx No matching mode found 800x450x32 @0! (desktop)
002e:err:seh:setup_exception_record stack overflow 928 bytes in thread 002e eip 7aea8395 esp 02440f90 stack 0x2440000-0x2442000-0x2540000

User avatar
Bob Wya
Level 12
Level 12
Posts: 2772
Joined: Sat Oct 16, 2010 7:40 pm
Location: Cambridge
Contact:

Re: Issues with Kyounyuu Fantasy Gaiden

Post by Bob Wya » Wed Apr 11, 2018 4:06 pm

@fraterh,

That's really odd... Plus the request for 0Hz refresh. :?

What's the output from:

Code: Select all

xrandr
?

Also can you run the program preceded with:

Code: Select all

export WINEDEBUG=+xrandr,+x11drv
The terminal log should be a lot longer...
So it would probably be better to post this on a pastebin-esque site...

Thanks
Bob

fraterh
Level 2
Level 2
Posts: 12
Joined: Thu Mar 22, 2018 12:19 pm

Re: Issues with Kyounyuu Fantasy Gaiden

Post by fraterh » Thu Apr 12, 2018 6:06 am

Thanks, Bob! Here's the output:

Virtual desktop disabled:
http://cryptb.in/K4n6o#4814692092eff15ecd4f2bb10a5834ba

Virtual desktop enabled:
http://cryptb.in/IbeF#b347b6e55dbe96eff3114a686d817ac7

xrandr output:

Code: Select all

Screen 0: minimum 320 x 200, current 1440 x 900, maximum 8192 x 8192
VGA-1 disconnected primary (normal left inverted right x axis y axis)
HDMI-1 connected 1440x900+0+0 (normal left inverted right x axis y axis) 408mm x 255mm
   1440x900      59.89*+
   1280x1024     60.02  
   1280x960      60.00  
   1024x768      60.00  
   800x600       60.32  
   640x480       59.94  
   720x400       70.08  
DP-1 disconnected (normal left inverted right x axis y axis)

User avatar
Bob Wya
Level 12
Level 12
Posts: 2772
Joined: Sat Oct 16, 2010 7:40 pm
Location: Cambridge
Contact:

Re: Issues with Kyounyuu Fantasy Gaiden

Post by Bob Wya » Thu Apr 12, 2018 4:07 pm

fraterh wrote:Thanks, Bob! Here's the output:

Virtual desktop disabled:
http://cryptb.in/K4n6o#4814692092eff15ecd4f2bb10a5834ba

Virtual desktop enabled:
http://cryptb.in/IbeF#b347b6e55dbe96eff3114a686d817ac7

xrandr output:

Code: Select all

Screen 0: minimum 320 x 200, current 1440 x 900, maximum 8192 x 8192
VGA-1 disconnected primary (normal left inverted right x axis y axis)
HDMI-1 connected 1440x900+0+0 (normal left inverted right x axis y axis) 408mm x 255mm
   1440x900      59.89*+
   1280x1024     60.02  
   1280x960      60.00  
   1024x768      60.00  
   800x600       60.32  
   640x480       59.94  
   720x400       70.08  
DP-1 disconnected (normal left inverted right x axis y axis)
xrandr looks fine.

I can't see what function is making the offending call: ChangeDisplaySettingsEx()

Can I be a pain and ask for:

Code: Select all

export WINEDEBUG=+timestamp,+tid,+d3d,+system,+explorer,+user,+x11settings,+xrandr,+x11drv,+xvidmode
Hopefully Cryptbin won't creak under the strain! :shock:

Thanks
Bob

fraterh
Level 2
Level 2
Posts: 12
Joined: Thu Mar 22, 2018 12:19 pm

Re: Issues with Kyounyuu Fantasy Gaiden

Post by fraterh » Fri Apr 13, 2018 5:45 am

Thanks, Bob. Here's the output you requested:
Virtual desktop disabled:


http://cryptb.in/rzp#8cc3f25e0ac46b25d51d906c85278409

Virtual desktop enabled

https://cryptbin.com/6I3l#fc7038671973b ... c96fb57ee4

User avatar
Bob Wya
Level 12
Level 12
Posts: 2772
Joined: Sat Oct 16, 2010 7:40 pm
Location: Cambridge
Contact:

Re: Issues with Kyounyuu Fantasy Gaiden

Post by Bob Wya » Sat Apr 14, 2018 2:13 pm

fraterh wrote:Thanks, Bob. Here's the output you requested:
Virtual desktop disabled:


http://cryptb.in/rzp#8cc3f25e0ac46b25d51d906c85278409

Virtual desktop enabled

https://cryptbin.com/6I3l#fc7038671973b ... c96fb57ee4
So your game is committing "virtual suicide" by calling ChangeDisplaySettingsEx() with a 0 Hz refresh rate. :cry:

I'd suggest filing a bug about this issue on the WineHQ Bugzilla.
You can attach those (latest) terminal logs to the bug report.

A catchy, descriptive bug title always helps...
Something like "Kyounyuu Fantasy Gaiden calls ChangeDisplaySettingsEx() with a 0Hz Refresh Rate"

It would be easy enough to work (hack) around this - but it would require building Wine from source.
Basically a patch that ignored refresh rate changes would be sufficient (for the winex11.drv driver):

Code: Select all

--- a/dlls/winex11.drv/settings.c	2017-11-09 13:10:47.534355164 +0000
+++ b/dlls/winex11.drv/settings.c	2018-04-14 20:05:56.179438365 +0100
@@ -365,3 +365,3 @@ LONG CDECL X11DRV_ChangeDisplaySettingsE
         if (devmode->dmFields & DM_PELSHEIGHT) def_mode &= !devmode->dmPelsHeight;
-        if (devmode->dmFields & DM_DISPLAYFREQUENCY) def_mode &= !devmode->dmDisplayFrequency;
+        if (devmode->dmFields & DM_DISPLAYFREQUENCY) devmode->dmFields &= ~DM_DISPLAYFREQUENCY;
     }

Bob

fraterh
Level 2
Level 2
Posts: 12
Joined: Thu Mar 22, 2018 12:19 pm

Re: Issues with Kyounyuu Fantasy Gaiden

Post by fraterh » Sun Apr 15, 2018 12:37 pm

Thanks,Bob! I'll give a research on the wine wiki about how to do it. Anyway, thanks for all your help!

Post Reply