msw\textctrl assert "wrong initial m_updatesCount value"

26 views
Skip to first unread message

Dan Korn

unread,
Oct 2, 2025, 6:41:23 PM (4 days ago) Oct 2
to wx-dev
Hello,

Using wxWidgets 2.6.3 on Windows.  When initializing a dialog, a series of events are triggered and eventually a call to wxTextCtrl::SetValue() results in an assertion failing in the UpdatesCountFilter constructor.  The message is:

...\wxWidgets-3.2.6\src\msw\textctrl.cpp(326): assert "m_count == -1 || m_count == -2" failed in UpdatesCountFilter::UpdatesCountFilter(): wrong initial m_updatesCount value

The string value that's being set in the wxTextCtrl is "." (a single dot/period).

What is the underlying cause of this?  How can I avoid this assertion?

The dialog works fine, other than this assert.

Thanks,
Dan

Igor Korot

unread,
Oct 2, 2025, 6:53:46 PM (4 days ago) Oct 2
to wx-...@googlegroups.com
Hi Dan,

On Thu, Oct 2, 2025 at 6:41 PM Dan Korn <dk...@marcom.com> wrote:
>
> Hello,
>
> Using wxWidgets 2.6.3 on Windows.

Are you really using a decade old codebase?

Thank you.
> --
> You received this message because you are subscribed to the Google Groups "wx-dev" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to wx-dev+un...@googlegroups.com.
> To view this discussion visit https://groups.google.com/d/msgid/wx-dev/86308d23-0010-4ae5-b88d-bf7f8fe10780n%40googlegroups.com.

Dan Korn

unread,
Oct 2, 2025, 7:12:05 PM (4 days ago) Oct 2
to wx-dev
Opps, sorry, typo.  We're using 3.2.6.

Dan

Igor Korot

unread,
Oct 2, 2025, 8:32:48 PM (3 days ago) Oct 2
to wx-dev
Hi, Dan,


On Thu, Oct 2, 2025, 4:12 PM Dan Korn <dk...@marcom.com> wrote:
Opps, sorry, typo.  We're using 3.2.6.

How do you create the control?

Thank you.

Vadim Zeitlin

unread,
Oct 3, 2025, 3:43:48 AM (3 days ago) Oct 3
to wx-...@googlegroups.com
On Thu, 2 Oct 2025 15:41:23 -0700 (PDT) Dan Korn wrote:

DK> Hello,
DK>
DK> Using wxWidgets 2.6.3 on Windows. When initializing a dialog, a series of
DK> events are triggered and eventually a call to wxTextCtrl::SetValue()
DK> results in an assertion failing in the UpdatesCountFilter constructor. The
DK> message is:
DK>
DK> ...\wxWidgets-3.2.6\src\msw\textctrl.cpp(326): assert "m_count == -1 ||
DK> m_count == -2" failed in UpdatesCountFilter::UpdatesCountFilter(): wrong
DK> initial m_updatesCount value
DK>
DK> The string value that's being set in the wxTextCtrl is "." (a single
DK> dot/period).
DK>
DK> What is the underlying cause of this? How can I avoid this assertion?

This is a bug and the only way to avoid it is to fix it, but,
unsurprisingly, I would appreciate having a way of reproducing it to be
able to do it.

DK> The dialog works fine, other than this assert.

This bug can result in missing events.

Regards,
VZ

Dan Korn

unread,
Oct 3, 2025, 12:08:27 PM (3 days ago) Oct 3
to wx-dev
Thanks Vadim.  I'll see if I can make a minimal sample to reproduce.

Dan

Reply all
Reply to author
Forward
0 new messages