I have some code which creates a CEikScrollBar and deletes it in a loop. Unfortunately, I get a EWservPanicDuplicateHandle panic on the second iteration, during the ConstructL call. When I try to debug the problem, sometimes it goes away. So I'm thinking that the problem has to do with the window server not servicing its messages fast enough. I'm including the stack trace below on the off chance that someone has seen this kind of thing before. Does anyone have an idea? Any hints about the meaning of this panic are also helpful.

thanks

-----------------------------------------------

CWsClient::SessionPanic(int 60) line 303 + 9 bytes
CWsClient::PPanic(TClientPanic EWservPanicDuplicateHandle) line 295
CWsObject::OwnerPanic(TClientPanic EWservPanicDuplicateHandle) line 56
CWsClientWindow::ConstructL(const TWsClCmdCreateWindow & {...}, CWsWindowBase * 0x02c4a2a0, int 0) line 44
CWsClient::CreateNewWindowL(const TWsClCmdCreateWindow & {...}) line 228
CWsClient::CommandL(int 22, const void * 0x4883f1c0) line 486
CWsCliObj::CommandL(int 22, const void * 0x4883f1c0) line 1165
CWsClient::CommandBufL() line 447
CWsClient::DoServiceL(const RMessage2 & {...}, int & 1) line 1068 + 32 bytes
CWsClient::ServiceL(const RMessage2 & {...}) line 1048
CServer2::RunL() line 586
CActiveScheduler::DoStart() line 384 + 27 bytes
CActiveScheduler::Start() line 327 + 24 bytes
WindowServerThread(void * 0x00000000) line 895
User::StartThread(int (void *)* 0x48801d11 WindowServerThread(void *), void * 0x00000000) line 448 + 7 bytes
runThread(void * 0x007b4b20) line 157 + 23 bytes