All Forums
 Microsoft Windows CE
 eVC Application Development
 bitsyX powers down during new thread
 Forum Locked
 Send Topic to a Friend
 Printer Friendly
Author Topic  

Iain Reid

2 Posts

Posted - 11 Mar 2004 :  13:08:30  Show Profile  Email Poster
Shortly after creating a new Thread, my BitsyX goes black (screen) and powers down. I have traced the lines in my code where this occurs but have no idea why.

//// IN MAIN FUNCTION

LPTHREAD_START_ROUTINE pStart = MyClient::StaticRun;
LPDWORD pThreadID = 0;
HANDLE m_hClientThread = CreateThread(NULL, 0, pStart, 0, pThreadID);

//////////
ULONG WINAPI MyClient::StaticRun(LPVOID param) {
MyClient* pClient = (MyClient*)param;
return pClient->ClientProc(); ////////////// <---- 'crashes' here
}

///////
ULONG MyClient::ClientProc() {
bool mybool = true; //////////// <--- does not reach this line
....
}


The code is part of a program that I am porting from Windows XP to Windows CE. The lines above work fine on XP. I have checked the CE documentation but it hasn't thrown up any clues...


could it have something to do with threads (prioritys and/or memory footprints) ??

any suggestions welcome.

-Iain

edit1: I should add that the Debug port reports nothing. The system just crashes.


Edited by - Iain Reid on 11 Mar 2004 14:47:40

Iain Reid

2 Posts

Posted - 15 Mar 2004 :  09:33:57  Show Profile  Email Poster

ok I think I solved this. it was a memory alloaction error when porting the code and nothing to do with threads at all.

thanks.
-iain
Go to Top of Page
  Topic  
 Forum Locked
 Send Topic to a Friend
 Printer Friendly
Jump To:
Eurotech Support Forums © Eurotech Inc. Go To Top Of Page
This page was generated in 0.02 seconds. Snitz Forums 2000