joncampbell123 / dosbox-x

DOSBox-X fork of the DOSBox project
GNU General Public License v2.0
2.53k stars 369 forks source link

Input crashes when 1) moving app window to other monitor, 2) switching app windows, 3) minimizing and restoring #5032

Open mc2 opened 3 weeks ago

mc2 commented 3 weeks ago

Describe the bug

Always: When I drag the DOSBox-x app window to a different monitor, the in-DOS mouse cursor freezes, and no mouse or keyboard input is recognized. Not always, but often, same problem when:

Steps to reproduce the behaviour

  1. Open dosbox-x -t using Mac Terminal
  2. See 'Z:>`
  3. Drag window to different monitor
  4. No mouse or keyboard available in DOSBox-x Dragging to initial monitor does not recover

Expected behavior

Able to move DOSBox-x to other monitors, switch and minimize/restore with no crash.

What operating system(s) this bug have occurred on?

MacOS Version 14.5 (23F79)

What version(s) of DOSBox-X have this bug?

2024.03.01 (ARM mac SDL2 64bit)

Used configuration

No response

Output log

LOG: Early LOG Init complete
LOG: DOSBox-X's working directory: /Users/mc2
LOG: Logging init: beginning logging proper. This is the end of the early init logging
LOG: Logging: No logfile was given. All further logging will be discarded.
LOG: DOSBox-X version 2024.03.01 Commit 02f36ba (macOS ARM SDL2 64-bit)
LOG: macOS EXE path: dosbox-x
LOG: macOS Resource path: 
LOG: macOS: NSTouchBar support detected in system
LOG: SDL: version 2.30.2, Video cocoa, Audio coreaudio
LOG: Host keyboard layout is now us (US English)
LOG: Mapper keyboard layout is now us (US English)
LOG: SDL2 reports desktop display mode 1920 x 1080
LOG: The default output for the video system: opengl
LOG: Configured windowposition: -
LOG: SDL: Current window pixel format: SDL_PIXELFORMAT_ARGB8888
LOG: Screen report: Method 'CoreGraphics' (1920.000 x 1080.000 pixels) at (0.000 x 0.000) (598.380 x 340.770 mm) (23.558 x 13.416 in) (81.500 x 80.500 DPI)
LOG: ISA BCLK: 8333333.333Hz (25000000/3)
LOG: monopal: green, 
LOG: Active save slot: 1 [Empty]
LOG: USING AVI+ZMBV
LOG: Max 3670016 sz 16384
LOG: Final 16384
LOG: MIDI:Opened device:coreaudio
LOG: Pentium CMPXCHG8B emulation is enabled
LOG: VOODOO LFB now at d0000000
LOG: Serial1: BASE 3f8h
LOG: Serial2: BASE 2f8h
LOG: Parallel1: BASE 378h
LOG: MPU-401 Registering I/O ports as if IBM PC MPU-401 at base 330h
LOG: Memory I/O complexity optimization enabled aka option 'memory io optimization 1'. If the game or demo is unable to draw to the screen properly, set the option to false.
LOG: The 'scanline render on demand' option is available and may provide a modest boost in video render performance if set to true.
LOG: Screen report: Method 'CoreGraphics' (1920.000 x 1080.000 pixels) at (0.000 x 0.000) (598.380 x 340.770 mm) (23.558 x 13.416 in) (81.500 x 80.500 DPI)
LOG: Allocated APM BIOS pm entry point at f000:ce20
LOG: Writing code to fce20
LOG: Writing code to fce40
LOG: Screen report: Method 'CoreGraphics' (1920.000 x 1080.000 pixels) at (0.000 x 0.000) (598.380 x 340.770 mm) (23.558 x 13.416 in) (81.500 x 80.500 DPI)
LOG: ISA Plug & Play BIOS enabled
LOG: VGA ROM BIOS init callback
LOG: pixratio 1.000, dw false, dh false
LOG: Aspect ratio: 640 x 480  xToY=1.333 yToX=0.750
LOG: Screen report: Method 'CoreGraphics' (1920.000 x 1080.000 pixels) at (0.000 x 0.000) (598.380 x 340.770 mm) (23.558 x 13.416 in) (81.500 x 80.500 DPI)
LOG: Screen report: Method 'CoreGraphics' (1920.000 x 1080.000 pixels) at (0.000 x 0.000) (598.380 x 340.770 mm) (23.558 x 13.416 in) (81.500 x 80.500 DPI)
LOG: WARNING: No translation support (to host) for code page 0
LOG: pixratio 1.350, dw false, dh false
LOG: Aspect ratio: 720 x 540  xToY=1.333 yToX=0.750
LOG: Screen report: Method 'CoreGraphics' (1920.000 x 1080.000 pixels) at (0.000 x 0.000) (598.380 x 340.770 mm) (23.558 x 13.416 in) (81.500 x 80.500 DPI)
LOG: Screen report: Method 'CoreGraphics' (1920.000 x 1080.000 pixels) at (0.000 x 0.000) (598.380 x 340.770 mm) (23.558 x 13.416 in) (81.500 x 80.500 DPI)
LOG:    2050916 ERROR BIOS:Keyboard layout file auto not found
LOG:    2050916 ERROR BIOS:Keyboard layout file auto not found
LOG: XMS: 50 handles allocated for use by the DOS environment
LOG: EMS page frame at 0xe000-0xefff
LOG: COMMAND.COM env size:             720 bytes
LOG: COMMAND.COM environment block:    0x0701 sz=0x002d
LOG: COMMAND.COM main body (PSP):      0x072f sz=0x009a
LOG: COMMAND.COM stack:                0x0749

[usually have to control-C here]

Additional information

FIle: https://mc2.github.io/temp/dosbox-x.conf

Macbook Air M1, 2020 LG HDL 4K monitor Logitech MX Master mouse USB Type-C Hub Apple external keyboard

Have you checked that no similar bug report(s) exist?

Code of Conduct & Contributing Guidelines

mc2 commented 3 weeks ago

Thank you!

joncampbell123 commented 2 weeks ago

I'm not able to reproduce that here, using the latest commit.

mc2 commented 2 weeks ago

Best guess currently, glitch has something to do with peripherals:

Changing one variable at a time now. Configuration of software/hardware relatively stable.

Trying different USB keyboards, resulting variously:

In every case of dragging to another monitor crashes DOSBox-x reliably. Command + Tab window switching and minimize/maximize at the moment mostly not crashing for a few days. Not sure what changed.

Will update if I can find a path to reproducibility. Thanks!

mc2 commented 2 weeks ago

latest commit

Um, using 2024.03.01 (ARM mac SDL2 64bit) release. Using this or a dev commit?

joncampbell123 commented 2 weeks ago

latest commit

Um, using 2024.03.01 (ARM mac SDL2 64bit) release. Using this or a dev commit?

latest dev commit.