![]() |
Crash in a multi-thread UI app. |
Post Reply
|
| Author | |
jeffcmj
Groupie
Joined: 28 October 2004 Status: Offline Points: 92 |
Post Options
Thanks(0)
Quote Reply
Topic: Crash in a multi-thread UI app.Posted: 01 April 2005 at 11:14am |
|
I got a assert fail in a multi-thread app. There is one mainframe in one thread. In XTPPaintManager::DrawControl Caused a Assert Fail. I think it's because m_fontIcon is static. Anyway to solve this problem? Thanks Edited by jeffcmj |
|
![]() |
|
jeffcmj
Groupie
Joined: 28 October 2004 Status: Offline Points: 92 |
Post Options
Thanks(0)
Quote Reply
Posted: 01 April 2005 at 12:22pm |
|
The official sample MSDI also has this problem. If I change a toolbar button to Combobox with Edit embeded, the same crash will happen.
|
|
![]() |
|
ICBM
Groupie
Joined: 15 January 2004 Location: New Zealand Status: Offline Points: 57 |
Post Options
Thanks(0)
Quote Reply
Posted: 04 April 2005 at 4:44pm |
|
<Disclaimer: I have not read the source code that you say is at fault> My thoughts would be, why are you performing gui updates on a different thread? This is 'not allowed'. Sometimes you can get away with it, but most often not. Only the thread that owns the window should do any kind of updates. |
|
![]() |
|
Oleg
Senior Member
Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
Quote Reply
Posted: 06 April 2005 at 10:35am |
|
In last 2 versions m_fontIcon is not static member (you can fix it in your sources) + you must use own paintmanager for each commandbars: if (!InitCommandBars()) CXTPCommandBars* pCommandBars = GetCommandBars(); pCommandBars->SetPaintManager(CXTPPaintManager::CreateThe me(xtpThemeOfficeXP)); |
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
Post Reply
|
|
|
Tweet
|
| Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |