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 1682 - Resize collapses window instantly to a size of 0 x 124.
Summary: Resize collapses window instantly to a size of 0 x 124.
Status: RESOLVED FIXED
Alias: None
Product: SDL
Classification: Unclassified
Component: events (show other bugs)
Version: HG 2.0
Hardware: x86 Windows 7
: P2 critical
Assignee: Sam Lantinga
QA Contact: Sam Lantinga
URL:
Keywords:
: 1704 (view as bug list)
Depends on:
Blocks:
 
Reported: 2013-01-06 06:49 UTC by Marco Schmidt
Modified: 2013-02-08 01:05 UTC (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Marco Schmidt 2013-01-06 06:49:45 UTC
After sizing my main window (the only window in my application) through grabbing the window border with the mouse the window collapses instantly to a size of 0 x 124. In my application I can not resize the window to a normal size again.

I tried to reproduce the problem - and here a the minimal steps I found.  

I'm running WIN8 x64, VS2012Pro, HG SDL-2.0 tip, WIN32-Build.

Minimal steps to reproduce my problem: 

- open solution SDL_VS2012
- make testdraw2 the start project
- pass command line option --resize to the debuggee testdraw2
- starting the application testdraw2 
- try to resize the window
- the application window resizes to a minimal size 0 x 124.
- the application crashes to divide by zero .... (this is only the aftermath but a unhandled error condition)
Comment 1 Marco Schmidt 2013-01-07 05:53:54 UTC
I reproduced the bug on WIN7 x64, VS2012Pro, HG SDL-2.0 tip, WIN32-Build too.
Comment 2 Marco Schmidt 2013-01-08 04:07:41 UTC
Debugging under windows 7 reveals that possible the changes of revision 6788 (036f53f2f5aa31a3c23357c42aa36831dbcd9a53) lead to this behavior.
Comment 3 Marco Schmidt 2013-01-13 22:25:59 UTC
Possibly setting the maximum width to Zero as default value leads to this behavior.
Comment 4 Vincent Ordy 2013-01-15 12:39:23 UTC
I'm having the same problem on Win7 64-bit, VS2008Pro, SDL-2.0 from January 1st, Win32-build.

Obviously the problem is in src/video/windows/SDL_windowsevents.c in WIN_WindowProc.  When the maximum size is not initialized, info->ptMaxTrackSize is filled with a small size and Windows resizes the window.
Comment 5 Philipp Wiesemann 2013-01-30 13:01:40 UTC
Maybe similar to bug 1704.
Comment 6 Sam Lantinga 2013-02-01 22:48:57 UTC
*** Bug 1704 has been marked as a duplicate of this bug. ***
Comment 7 Sam Lantinga 2013-02-08 01:05:04 UTC
Fixed, thanks!
http://hg.libsdl.org/SDL/rev/a69e10925a58