Dosbox-x: VBETEST causes floating point exception

Created on 8 Sep 2020  路  7Comments  路  Source: joncampbell123/dosbox-x

Describe the bug
VBETEST runs through video modes and eventually causes a floating point exception in DOSBox-X.

To Reproduce
Steps to reproduce the behavior:

  1. Run VBETEST
  2. Let it test each mode
  3. Eventually it hits something that causes a floating point error (divide by zero?)

Expected behavior
Tests all modes

I'll take some time tonight to gdb this crash and see where the fault is.

Ref: https://twitter.com/angealbertini/status/1303408409333690368

bug video

All 7 comments

@Wengier I'm going to pull from master and look into this issue. It might be something simple.

@Wengier Now the VESA BIOS is not reporting any modes. What happened?

Also vmemsize doesn't seem to have any effect anymore, no matter whether it's under the [dosbox] or [video] sections.

@Wengier Hold on, I see the problem.

@Wengier Pushing fix to master now.

This is the crash:

Thread 1 "dosbox-x" received signal SIGFPE, Arithmetic exception.
0x000000000052aa00 in VESA_GetDisplayStart (x=@0x21c60c4: 0, y=@0x21c60c8: 0) at int10_vesa.cpp:659
659 y = (Bit16u)(start_pixel / virtual_screen_width);
(gdb) backtrace

0 0x000000000052aa00 in VESA_GetDisplayStart (x=@0x21c60c4: 0, y=@0x21c60c8: 0) at int10_vesa.cpp:659

1 0x0000000000520107 in INT10_Handler () at int10.cpp:650

2 0x000000000043c7d6 in Normal_Loop () at dosbox.cpp:368

3 0x000000000043c9be in DOSBOX_RunMachine () at dosbox.cpp:609

4 0x0000000000776ddd in CALLBACK_RunRealInt (intnum=intnum@entry=33 '!') at callback.cpp:212

5 0x000000000051588f in DOS_Shell::Execute (this=this@entry=0x4938360, name=name@entry=0x7fffffffb100 "VBETEST", args=args@entry=0x7fffffffcd97 "") at shell_misc.cpp:1136

6 0x000000000050c6df in DOS_Shell::DoCommand (this=this@entry=0x4938360, line=0x7fffffffcd97 "", line@entry=0x7fffffffcd90 "vbetest") at shell_cmds.cpp:252

7 0x00000000004f8d20 in DOS_Shell::ParseLine (this=0x4938360, line=0x7fffffffcd90 "vbetest") at shell.cpp:397

8 0x00000000004fbbe0 in DOS_Shell::Run (this=0x4938360) at shell.cpp:658

9 0x00000000004f96a1 in SHELL_Run () at shell.cpp:1653

10 0x0000000000578658 in VM_Boot_DOSBox_Kernel () at sdlmain.cpp:7151

11 0x00000000005386a4 in BIOS::cb_bios_boot__func () at bios.cpp:8585

12 0x000000000043c7d6 in Normal_Loop () at dosbox.cpp:368

13 0x000000000043c9be in DOSBOX_RunMachine () at dosbox.cpp:609

14 0x000000000042e290 in main (argc=, argv=) at sdlmain.cpp:9749

I think I fixed it, but I'm starting to think there are bugs in VBETEST.EXE itself as well. It doesn't seem to handle too much video RAM very well, in fact it can't figure out how to do some of it's panning tests with more than 4-8MB of RAM and in other cases it's got some drawing issues.

Considering the EXE has a copyright of 1994 it's possible video cards had nowhere near that much memory anyway.

Yup, 16-color SVGA modes with more than 4MB of RAM seems to cause it problems.

So to make DOSBox-X accurate, I'm going to need to run it on real hardware and various SVGA cards to see what is supposed to happen.

Was this page helpful?
0 / 5 - 0 ratings