Request for wxGrid to add set row text color (Issue #23753)

50 views
Skip to first unread message

guzmanpaco

unread,
Aug 3, 2023, 2:55:46 AM8/3/23
to wx-...@googlegroups.com, Subscribed

Description

We would like to request for wxGrid to have a new function:
void SetRowTextColour( int row, const wxColour& );

Currently, you can only change 1 cell's text color at a time.
On older wxWidgets 3.1.0 and 3.1.5, we are encountering issues when trying to change each row's cell color.

We encounter segfault when the following occurs very fast:

  1. wxMutex lock
  2. Row added
  3. Row text is modified
  4. Set each cell color to a specific color
  5. wxMutex unlock

We encounter segfault at 4 due to GetOrCreateCellAttrPtr(row, col) of SetTextColour(colour) sometimes returning invalid pointer. If we comment out #4 sequence, issue does not encounter segfault.

We think that maybe adding SetRowTextColour to grid could prevent the issue.

I have created a sample program using a modified grid sample, but the issue cannot be reproduced with wxWidgets 3.2.2.1.

Could you investigate the cause of GetOrCreateCellAttrPtr(row, col) returning an invalid pointer?
If this was fixed in Ver.3.2.2.1, could you please provide the correction details? It is not mentioned in the current change log.

Thank you


Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/issues/23753@github.com>

VZ

unread,
Aug 3, 2023, 4:19:54 PM8/3/23
to wx-...@googlegroups.com, Subscribed

Sorry, if the issue can't be reproduced in 3.2.2, then there is really no point in adding a new function which could only be added in versions later than 3.2.2 where it wouldn't be needed, so this is a rather strange request.

I'm not aware of any specific bugs related to this fixed in 3.2, but then there are many, many details missing here (such as where/why does it crash and what does the mutex have to do with it). You could try bisecting the history between 3.1.5 and 3.2.2 to find the commit which fixes the problem for you, but we really can't help you with this.


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/issues/23753/1664596594@github.com>

VZ

unread,
Aug 3, 2023, 4:19:54 PM8/3/23
to wx-...@googlegroups.com, Subscribed

Closed #23753 as completed.


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/issue/23753/issue_event/10002857169@github.com>

Reply all
Reply to author
Forward
0 new messages