crash adding new columns to standarditemmodel embedded in cartesianchart
Added by Mark Travis over 1 year ago
I'm trying to update a standarditemmodel by adding two new columns. The model has already been assigned to a cartesianchart, and I expect the new columns to show up in the chart.
Attached is an image of the stack trace where WApplication returns NULL.
The line that generates this error is standarditemmodel->insertColumns(6, 2); (The model contains 11 columns prior to the insert and should have 13 afterwards.)
The standarditemmodel DOES reflect the two additional columns being added before the crash. I can see them in the memory variable map.
Replies (2)
RE: crash adding new columns to standarditemmodel embedded in cartesianchart - Added by Roel Standaert over 1 year ago
It looks like you're making this change asynchronously when you don't have the WApplication
's UpdateLock
?
RE: crash adding new columns to standarditemmodel embedded in cartesianchart - Added by Mark Travis over 1 year ago
Ah! You are right. This is after I kick off a new thread. Just learned something new... again. 😊
I "got away with it in the past" because I was sending an update package back to the main thread which then updated another chart model WITHIN the event loop. ok, got it.
(I also got sidetracked when I saw this come through earlier today: 9100466 Fixed a possible access violation in WApplication::UpdateLock)