Middle-clicking in any window will crash the game (assertion error)

Bug #1095695 reported by Hans Joachim Desserud on 2013-01-03
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
widelands
Critical
Unassigned

Bug Description

Steps to reproduce:
1. Start a new game.
2. Open main menu (leftmost item on the bottom)
3. Middle-click somewhere in the window (or seemingly any other window)

Expected result:
This is useful for collapsing the window, keeping only the title around, allowing the player to unfold it later.

Actual result:
Currently, this crash the game.

Widelands bzr r6476 on Ubuntu 12.10

Hans Joachim Desserud (hjd) wrote :
Mark Scott (mxsscott) wrote :

r6476 on MacOSX 10.5.8 - no crash. Window folds successfully.

Mark Scott (mxsscott) wrote :

Clarification - only affects OpenGL rendering:

Surface* Graphic::create_surface(int32_t w, int32_t h, bool alpha) const
{
#ifdef USE_OPENGL
 if (g_opengl)
 {
  return new GLSurfaceTexture(w, h, alpha);
 }
       else
#endif

.
.
.

void GLSurfaceTexture::init(uint32_t w, uint32_t h)
{
 handle_glerror();
 assert(w);
 assert(h); // <<<< ASSERT FAILURE. h = 0.

SirVer (sirver) wrote :

My Bug. I'll Look into it - a zero height surface makes no sense and is a waste of memory.

SirVer (sirver) wrote :

Fixed in r6477. I changed my mind and basically just removed the assert statements. There would be a lot of corner cases that would need extra testing and could fail (just) in panel.cc, so I decided that the few bytes for an empty surface are really not worth the trouble.

Changed in widelands:
status: New → Fix Committed
SirVer (sirver) wrote :

Released in build-18 rc1.

Changed in widelands:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Bug attachments