bugBattle for Wesnoth - Bugs: bug #20497, Crash for tall background images

Show feedback again

You are not allowed to post comments on this tracker with your current authentification level.

bug #20497: Crash for tall background images

Submitted by:  J Tyne <jamit>
Submitted on:  Mon Feb 11 02:20:08 2013  
Category: BugSeverity: 5 - Blocker
Priority: 5 - NormalItem Group: Graphics
Status: FixedPrivacy: Public
Assigned to: B. Lipka <lipk>Open/Closed: Closed
Release: 1.11.1+svn (r56298)Operating System: Linux

Sun Feb 24 10:52:20 2013, SVN revision 56401:

Properly handle unscaled background images when they're bigger than the display's resolution. Fixes bug #20497

(Browse SVN revision 56401)

B. Lipka <lipk>
Project MemberIn charge of this item.
Tue Feb 12 18:55:50 2013, comment #3:

@Elvish_Hunter: jamit is right, don't be hasty :)

I'd actually prefer to display the top-center part of the image in such cases. It doesn't really matter for landscapes but it saves the most valuable part of portraits (at least those of humanoid ones) which are also commonly used as story art.

Also, we definitely have to make sure that the floating images are displayed over the same area of the background as on higher resolutions.

B. Lipka <lipk>
Project MemberIn charge of this item.
Tue Feb 12 18:47:06 2013, comment #2:

That gets into some of the questions I don't know the answer to: If the image is too tall, should it be chopped off at the bottom or centered with both top and bottom chopped? If the image merely gets shifted down, does that impact images that might be placed relative to that background? (And also for wide/left/right, of course.)

J Tyne <jamit>
Project Member
Tue Feb 12 13:18:17 2013, comment #1:

Although this is not my field, I prepared a quick patch that seems to work:
In the case in question, the image is positioned at y=0 and it's possible again to play DiD. If there are no better solutions, I'll commit it.
Also, since this bug effectively prevents from playing a mainline content, I'm raising its severity as blocker.

Elvish_Hunter <elvish_hunter>
Project Member
Mon Feb 11 02:20:08 2013, original submission:

Due to the change that allows multiple background images for a [story][part], an unscaled background that is taller than the screen (or wider, most likely) will cause the game to crash with an assertion failure. This can be readily demonstrated by running Wesnoth (in a window, presumably) with a height less than 600 and trying to start "Descent into Darkness". While this is an extreme case, it really should not cause a crash.

I traced the cause to storyscreen/render.cpp around line 155. Line 155 is a call to blit_surface(), and the fourth parameter to this call is drect. In the situation that causes this crash, drect.y is negative, and that leads to the assertion failure.

While I see why the crash occurs, I do not see enough of the intended behavior to guess at what the fix is. So here's where I turn it over to someone else.

J Tyne <jamit>
Project Member


No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -unavailable- added by shadowmaster (Updated the item)
  • -unavailable- added by lipk (Posted a comment)
  • -unavailable- added by elvish_hunter (Posted a comment)
  • -unavailable- added by jamit (Submitted the item)

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.


    Error: not logged in



    Follow 4 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Tue Mar 26 12:25:03 2013shadowmasterOpen/ClosedOpen=>Closed
    Sun Feb 24 10:57:46 2013lipkStatusIn Progress=>Fixed
    Tue Feb 12 18:56:09 2013lipkStatusNone=>In Progress
    Tue Feb 12 13:18:17 2013elvish_hunterSeverity4 - Important=>5 - Blocker
    Show feedback again

    Back to the top

    Powered by Savane 3.1-cleanup