Bug 220335 - Crashes when turning on full-screen mode
Crashes when turning on full-screen mode
Product: Fedora
Classification: Fedora
Component: nethack-vultures (Show other bugs)
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Karen Pease
Fedora Extras Quality Assurance
Depends On:
Blocks: FE7Target
  Show dependency treegraph
Reported: 2006-12-20 09:49 EST by Michael Schwendt
Modified: 2007-11-30 17:11 EST (History)
1 user (show)

See Also:
Fixed In Version: 2.1.0-9
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2007-08-30 16:23:44 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
Incomplete 16 bpp surface support (2.52 KB, patch)
2007-03-02 13:46 EST, Hans de Goede
no flags Details | Diff
PATCH fixing the crashes on fs<->window toggle on a 16bpp X-server (974 bytes, patch)
2007-03-02 13:48 EST, Hans de Goede
no flags Details | Diff

  None (edit)
Description Michael Schwendt 2006-12-20 09:49:20 EST
Both vultureseye and vulturesclaw crash as soon as full-screen mode
is enabled in the tools dialog. It's 100% reproducible.

I currently cannot run vultureseye anymore, since after reproducing
the crash multiple times it now quits like this directly after
creating a random hero:

$ vultureseye
Too many hacks running now.

Hence here's the stracktrace for vulturesclaw that's printed in the
terminal. Debuginfo package is installed, but details are missing

*** glibc detected *** /usr/games/vulturesclaw/vulturesclaw: malloc(): memory co
rruption: 0x0a1d87a8 ***
======= Backtrace: =========
======= Memory map: ========
Comment 1 Hans de Goede 2007-03-02 13:45:00 EST
Hi all,

I stumbled over this bug, and thought it would be a good idea to take a look.
After about an hour of debugging I found that the crash is caused by 2 functions
in: vultures/vultures_gra.c not being able to handle the 16 bpp mode SDL gave
vultures when switching to fullscreen. So I fixed both functions to not only
handle 32 bpp visuals but also 16 bpp visuals. This fixed the crashes, but after
a fs-window toggle or vica versa the text colors were off (text was black).
Fixing the text colors however doesn't seem easy as vultures is actually
designed to only run with 32 bpp visuals. The (irrelevant) fixes to
vultures/vultures_gra.c are available in the to be attached patch:

I say irrelevant because the real problem is that vultures does clearly tell SDL
that it wants a 32 bpp mode when first starting up, but when then later
switching from windows to fullscreen or vica-versa says that any mode will do
and then on my 16 bpp colordepth X-server SDL happily returns a 16 bpp surface.

Fixing the windows <-> fullscreen to also always request 32 bpp fixes the crash
and gets the text colors right. This fix is in the to be attached patch:


Comment 2 Hans de Goede 2007-03-02 13:46:41 EST
Created attachment 149137 [details]
Incomplete 16 bpp surface support
Comment 3 Hans de Goede 2007-03-02 13:48:26 EST
Created attachment 149138 [details]
PATCH fixing the crashes on fs<->window toggle on a 16bpp X-server
Comment 4 Hans de Goede 2007-03-10 06:21:40 EST
Ping? I've presented the fix to you on a golden platter, some kinda repsonse
would be nice or even better a fixed package.
Comment 5 Karen Pease 2007-03-10 23:03:28 EST
Sorry -- I missed the bugzilla email when the patch came in.  I'll get it in 
Comment 6 Karen Pease 2007-03-11 00:46:47 EST
The fix has been sent off to plague on fc5, fc6, and fc7.  fc3 and fc4 don't 
seem to be accepting make plague any more for some reason.  :P

Thanks for your patches!

Note You need to log in before you can comment on or make changes to this bug.