Skip to contentSkip to conversation

unsupported screen resolution crashes sdl-qemu

Qemu-devel Sascha Krissler 3 participants 7 messages Aug 24, 2013 – Jun 15, 2016

lore
Share & tools
lore
#0 lore raw

Public bug reported:

if the (windows) guest sets a screen resolution that the SDL backend does not support, qemu does an exit(1).
with this fix, the the resolution is still wrong (only part of the desktop is displayed), but qemu keeps running and the guest can auto-revert the video mode:

ui/sdl.c:do_sdl_resize()

    SDL_Surface * tmp_screen;
    tmp_screen = SDL_SetVideoMode(width, height, bpp, flags);
    if (!tmp_screen) {
//      fprintf(stderr, "Could not open SDL display (%dx%dx%d): %s\n", width, 
//              height, bpp, SDL_GetError());
//      exit(1);
    } else {
        real_screen = tmp_screen;
    }

** Affects: qemu
Importance: Undecided
Status: New

Signature · 29 lines
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1216368

Title:
  unsupported screen resolution crashes sdl-qemu

Status in QEMU:
  New

Bug description:
  if the (windows) guest sets a screen resolution that the SDL backend does not support,
  qemu does an exit(1).
  with this fix, the the resolution is still wrong (only part of the desktop is displayed),
  but qemu keeps running and the guest can auto-revert the video mode:

  ui/sdl.c:do_sdl_resize()
      SDL_Surface * tmp_screen;
      tmp_screen = SDL_SetVideoMode(width, height, bpp, flags);
      if (!tmp_screen) {
  //      fprintf(stderr, "Could not open SDL display (%dx%dx%d): %s\n", width, 
  //              height, bpp, SDL_GetError());
  //      exit(1);
      } else {
          real_screen = tmp_screen;
      }

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1216368/+subscriptions
#1 lore raw

Sorry, a little confusion what's the problem you want to solve?

Signature · 29 lines
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1216368

Title:
  unsupported screen resolution crashes sdl-qemu

Status in QEMU:
  New

Bug description:
  if the (windows) guest sets a screen resolution that the SDL backend does not support,
  qemu does an exit(1).
  with this fix, the the resolution is still wrong (only part of the desktop is displayed),
  but qemu keeps running and the guest can auto-revert the video mode:

  ui/sdl.c:do_sdl_resize()
      SDL_Surface * tmp_screen;
      tmp_screen = SDL_SetVideoMode(width, height, bpp, flags);
      if (!tmp_screen) {
  //      fprintf(stderr, "Could not open SDL display (%dx%dx%d): %s\n", width, 
  //              height, bpp, SDL_GetError());
  //      exit(1);
      } else {
          real_screen = tmp_screen;
      }

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1216368/+subscriptions
#2 lore raw
In reply to Sascha Krissler

its in the first sentence. let me rephrase: the (windows) guest can select some screen resolution which SDL cannot provide. what happens is that qemu quits without giving the quest a chance to shut down. thats like having a monitor that crashes windows when it doesnt support the video mode.

Signature · 29 lines
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1216368

Title:
  unsupported screen resolution crashes sdl-qemu

Status in QEMU:
  New

Bug description:
  if the (windows) guest sets a screen resolution that the SDL backend does not support,
  qemu does an exit(1).
  with this fix, the the resolution is still wrong (only part of the desktop is displayed),
  but qemu keeps running and the guest can auto-revert the video mode:

  ui/sdl.c:do_sdl_resize()
      SDL_Surface * tmp_screen;
      tmp_screen = SDL_SetVideoMode(width, height, bpp, flags);
      if (!tmp_screen) {
  //      fprintf(stderr, "Could not open SDL display (%dx%dx%d): %s\n", width, 
  //              height, bpp, SDL_GetError());
  //      exit(1);
      } else {
          real_screen = tmp_screen;
      }

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1216368/+subscriptions
#3 lore raw
In reply to Sascha Krissler

Yes, it is a bug. It should go back to the previous setting if the new screen resolution falied. I will send a patch later.

Thanks.

Signature · 29 lines
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1216368

Title:
  unsupported screen resolution crashes sdl-qemu

Status in QEMU:
  New

Bug description:
  if the (windows) guest sets a screen resolution that the SDL backend does not support,
  qemu does an exit(1).
  with this fix, the the resolution is still wrong (only part of the desktop is displayed),
  but qemu keeps running and the guest can auto-revert the video mode:

  ui/sdl.c:do_sdl_resize()
      SDL_Surface * tmp_screen;
      tmp_screen = SDL_SetVideoMode(width, height, bpp, flags);
      if (!tmp_screen) {
  //      fprintf(stderr, "Could not open SDL display (%dx%dx%d): %s\n", width, 
  //              height, bpp, SDL_GetError());
  //      exit(1);
      } else {
          real_screen = tmp_screen;
      }

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1216368/+subscriptions
#4 lore raw
In reply to Sascha Krissler

Patch posted:

http://patchwork.ozlabs.org/patch/270084/

Signature · 29 lines
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1216368

Title:
  unsupported screen resolution crashes sdl-qemu

Status in QEMU:
  New

Bug description:
  if the (windows) guest sets a screen resolution that the SDL backend does not support,
  qemu does an exit(1).
  with this fix, the the resolution is still wrong (only part of the desktop is displayed),
  but qemu keeps running and the guest can auto-revert the video mode:

  ui/sdl.c:do_sdl_resize()
      SDL_Surface * tmp_screen;
      tmp_screen = SDL_SetVideoMode(width, height, bpp, flags);
      if (!tmp_screen) {
  //      fprintf(stderr, "Could not open SDL display (%dx%dx%d): %s\n", width, 
  //              height, bpp, SDL_GetError());
  //      exit(1);
      } else {
          real_screen = tmp_screen;
      }

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1216368/+subscriptions
#5 lore raw
In reply to Sascha Krissler

this patch does solve the problem

Signature · 29 lines
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1216368

Title:
  unsupported screen resolution crashes sdl-qemu

Status in QEMU:
  New

Bug description:
  if the (windows) guest sets a screen resolution that the SDL backend does not support,
  qemu does an exit(1).
  with this fix, the the resolution is still wrong (only part of the desktop is displayed),
  but qemu keeps running and the guest can auto-revert the video mode:

  ui/sdl.c:do_sdl_resize()
      SDL_Surface * tmp_screen;
      tmp_screen = SDL_SetVideoMode(width, height, bpp, flags);
      if (!tmp_screen) {
  //      fprintf(stderr, "Could not open SDL display (%dx%dx%d): %s\n", width, 
  //              height, bpp, SDL_GetError());
  //      exit(1);
      } else {
          real_screen = tmp_screen;
      }

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1216368/+subscriptions
#6 lore raw
In reply to Sascha Krissler

Patch has been included here a while ago already:
http://git.qemu.org/?p=qemu.git;a=commitdiff;h=898ae2846de4dcb1
... so this ticket could now be marked as fixed.

** Changed in: qemu
Status: New => Fix Released

Signature · 29 lines
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1216368

Title:
  unsupported screen resolution crashes sdl-qemu

Status in QEMU:
  Fix Released

Bug description:
  if the (windows) guest sets a screen resolution that the SDL backend does not support,
  qemu does an exit(1).
  with this fix, the the resolution is still wrong (only part of the desktop is displayed),
  but qemu keeps running and the guest can auto-revert the video mode:

  ui/sdl.c:do_sdl_resize()
      SDL_Surface * tmp_screen;
      tmp_screen = SDL_SetVideoMode(width, height, bpp, flags);
      if (!tmp_screen) {
  //      fprintf(stderr, "Could not open SDL display (%dx%dx%d): %s\n", width, 
  //              height, bpp, SDL_GetError());
  //      exit(1);
      } else {
          real_screen = tmp_screen;
      }

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1216368/+subscriptions