We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 2846 - SDL_UpdateRect is ignored in while.
Summary: SDL_UpdateRect is ignored in while.
Status: RESOLVED FIXED
Alias: None
Product: SDL_image
Classification: Unclassified
Component: misc (show other bugs)
Version: 2.0.0
Hardware: x86_64 Windows 7
: P2 minor
Assignee: Sam Lantinga
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-01-16 19:04 UTC by Moige
Modified: 2015-01-22 22:34 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Moige 2015-01-16 19:04:41 UTC
Part of a software i'm developping need the computer to work by himself for a while, but is supposed to keep on showing me its progress by editing part of the window and updatig said part.
The problem is that after a certain number of occurences, the updating part simply stop working. The while keep on running and eventually ends normally, but i can't understand why it shows the progresses made only for the first occurrences of the while.

What's worse is that before giving me the hand back a second while, a bit shorter, has to take place, but if during the first the updating part stops working the second will block UpdateRect too.

The code can be found here; http://www.codeshare.io/UIqZw and http://www.codeshare.io/1yPuv though it might be edited soon.
Comment 1 Moige 2015-01-17 09:54:49 UTC
Additional debugging shows that neither the SDL_FillRect nor SDL_UpdateRect invocations fail, but instead the SDL_Rect variable used somehow sees its 'h' component getting zeroed.
Since there should not be any changes made to that one variable during the 'while' loop, i'd guess this happens during the SDL_FillRect calls; this is the only one using a SDL_Rect* parameter, and as a result the only one that could possibly edit it. If so, i can't pinpoint the problem any more precisely.

Thanks for your time.
Comment 2 Moige 2015-01-22 22:34:31 UTC
out-of-screen positioning caused SDL_FillRect to nullify some SDL_Rect components, hence the impression SDL_UpdateRect wasn't working.