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

 
 
Show feedback again

bug #20497: Crash for tall background images

Submitted by:  J Tyne <jamit>
Submitted on:  Mon 11 Feb 2013 02:20:08 AM UTC  
 
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

Add a New Comment (Rich MarkupRich Markup):
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Sun 24 Feb 2013 10:52:20 AM UTC, 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 12 Feb 2013 06:55:50 PM UTC, 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 12 Feb 2013 06:47:06 PM UTC, 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 12 Feb 2013 01:18:17 PM UTC, 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 11 Feb 2013 02:20:08 AM UTC, 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

 

(Note: upload size limit is set to 1024 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

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.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 4 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Tue 26 Mar 2013 12:25:03 PM UTCshadowmasterOpen/ClosedOpen=>Closed
    Sun 24 Feb 2013 10:57:46 AM UTClipkStatusIn Progress=>Fixed
    Tue 12 Feb 2013 06:56:09 PM UTClipkStatusNone=>In Progress
    Tue 12 Feb 2013 01:18:17 PM UTCelvish_hunterSeverity4 - Important=>5 - Blocker
    Show feedback again

    Back to the top


    Powered by Savane 3.1-cleanup