Author Topic: plugin codestat wx-3.0.2 and wx-3.1.1 trunk; assert problem and fix  (Read 568 times)

Offline blauzahn

  • Multiple posting newcomer
  • *
  • Posts: 70
starting codestat using cb svn11019 a dialog pops up:
Quote
assert "value <= m_maximum" failed in Update(): invalid progress value

ASSERT INFO and patch that fixes this are attached.

I can always reproduce this assert. Open CodeBlocks_wx30-unix.workspace, activate a
smaller project like codestat and start plugins code statistics. The value becomes larger
than 100 on the last file.

Off-by-one error in divisor. Apart from removing -1 I clamped the value for safety reasons
since the data-member are not gathered locally.

Os is Ubuntu 16.04 amd64 gnome3

It would be nice, if an admin could try this and apply this patch if appropriate.

Thank you