Bug 220335 - Crashes when turning on full-screen mode
Summary: Crashes when turning on full-screen mode
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: nethack-vultures
Version: 6
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Karen Pease
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: FE7Target
TreeView+ depends on / blocked
 
Reported: 2006-12-20 14:49 UTC by Michael Schwendt
Modified: 2007-11-30 22:11 UTC (History)
1 user (show)

Fixed In Version: 2.1.0-9
Clone Of:
Environment:
Last Closed: 2007-08-30 20:23:44 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
Incomplete 16 bpp surface support (2.52 KB, patch)
2007-03-02 18:46 UTC, 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 18:48 UTC, Hans de Goede
no flags Details | Diff

Description Michael Schwendt 2006-12-20 14:49:20 UTC
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
anyway.

*** glibc detected *** /usr/games/vulturesclaw/vulturesclaw: malloc(): memory co
rruption: 0x0a1d87a8 ***
======= Backtrace: =========
/lib/libc.so.6[0x80160b]
/lib/libc.so.6(__libc_malloc+0x7e)[0x802d2e]
/usr/games/vulturesclaw/vulturesclaw[0x81cdea0]
/usr/games/vulturesclaw/vulturesclaw[0x81cfe27]
/usr/games/vulturesclaw/vulturesclaw[0x81cea41]
/usr/games/vulturesclaw/vulturesclaw[0x81ceb70]
/usr/games/vulturesclaw/vulturesclaw[0x81ccbe1]
/usr/games/vulturesclaw/vulturesclaw[0x81cce3d]
/usr/games/vulturesclaw/vulturesclaw[0x81cbfcc]
/usr/games/vulturesclaw/vulturesclaw[0x81d434e]
/usr/games/vulturesclaw/vulturesclaw[0x81ce11a]
/usr/games/vulturesclaw/vulturesclaw[0x81d0259]
/usr/games/vulturesclaw/vulturesclaw[0x81d04f9]
/usr/games/vulturesclaw/vulturesclaw[0x81c2e36]
/usr/games/vulturesclaw/vulturesclaw[0x8062fda]
/usr/games/vulturesclaw/vulturesclaw[0x8065e8e]
/usr/games/vulturesclaw/vulturesclaw[0x804c0c6]
/usr/games/vulturesclaw/vulturesclaw[0x81bed77]
/lib/libc.so.6(__libc_start_main+0xdc)[0x7b0f2c]
/usr/games/vulturesclaw/vulturesclaw[0x804ab11]
======= Memory map: ========
Aborted

Comment 1 Hans de Goede 2007-03-02 18:45:00 UTC
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:
vultures-2.1.0-partial-16bpp-support.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:
vultures-2.1.0-fs-window-toggle-crash.patch

Regards,

Hans


Comment 2 Hans de Goede 2007-03-02 18:46:41 UTC
Created attachment 149137 [details]
Incomplete 16 bpp surface support

Comment 3 Hans de Goede 2007-03-02 18:48:26 UTC
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 11:21:40 UTC
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-11 04:03:28 UTC
Sorry -- I missed the bugzilla email when the patch came in.  I'll get it in 
tonight.

Comment 6 Karen Pease 2007-03-11 05:46:47 UTC
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.