#18688 closed defect (fixed)

gtk: regression: Crash on startup [PATCH]

Reported by: leamas Owned by:
Priority: normal Milestone: 3.1.4
Component: wxGTK Version: 3.0.4
Keywords: Cc: leamas.alec@…
Blocked By: Blocking:
Patch: yes

Description

Our (too big) application aborts on startup on an assertion. This seems to be a regression, a fix has been present but later removed.

The assertion is ./src/gtk/window.cpp(5059): assert "increment > 0" failed in IsScrollIncrement(), when using gtk3 libraries.

This was fixed by 45d66f592 in 2013, basically acknowledging that while increment is expected to be > 0 it not always is.

Later on the fix was reverted by ccd1d40d, after identifying and handling a cause for increments == 0.

Now, it seems that despite 45d66f592 there are other reasons increment == 0 is still around. In practise, this means that we cannot compile OpenCPN without NDEBUG, disabling all sorts of useful tests.

Attaching the assertion stacktrace + the patch fixing it.

Attachments (2)

wxwidgets.trace download (1.9 KB) - added by leamas 16 months ago.
Stack trace
wxwidgets.patch download (424 bytes) - added by leamas 16 months ago.
Patch

Download all attachments as: .zip

Change History (10)

Changed 16 months ago by leamas

Stack trace

Changed 16 months ago by leamas

Patch

comment:1 Changed 16 months ago by leamas

  • Cc leamas.alec@… added

The OpenCPN source code is available at https://github.com/OpenCPN/OpenCPN

EDIT: I might stress that this only happens on gtk3, gtk2 builds are not affected.

Last edited 16 months ago by leamas (previous) (diff)

comment:2 Changed 16 months ago by leamas

  • Cc leamas.alec@… removed
  • Version changed from 3.0.3 to 3.0.4

comment:3 Changed 16 months ago by leamas

  • Cc leamas.alec@… added
  • Patch set

comment:4 Changed 16 months ago by vadz

  • Milestone set to 3.1.4

I don't really know why does this happen, but it doesn't seem completely obvious to me why this shouldn't happen neither, so I agree that relaxing this assert looks like the right thing to do if it happens in practice.

Paul, any objections to doing this?

comment:5 Changed 15 months ago by vadz

Trac didn't notice it, but there was 81309f083d51e33bd24dc63e3698c6a39f31f4f7 changing the code here. I didn't have time to retest with it yet, so I'm not sure if this problem is fixed now or if anything still remains to be done.

comment:6 Changed 15 months ago by pcor

  • Resolution set to port to stable
  • Status changed from new to portneeded

comment:7 Changed 14 months ago by Paul Cornett <paulcor@…>

In 02ea6174/git-wxWidgets:

Ensure that scrollbar GtkRange page increment is set to a positive value

It should not be less than the step increment, which is always one.
See #18688

(cherry picked from commit 81309f083d51e33bd24dc63e3698c6a39f31f4f7)

comment:8 Changed 14 months ago by pcor

  • Resolution changed from port to stable to fixed
  • Status changed from portneeded to closed
Note: See TracTickets for help on using tickets.