All Forums
 Microsoft Windows CE
 General CE
 CRT Source Code
 Forum Locked
 Send Topic to a Friend
 Printer Friendly
Author Topic  

rickd

3 Posts

Posted - 19 Sep 2006 :  12:53:32  Show Profile  Email Poster
I am getting access violations in my application when exiting. The problem appears to be some cleanup code in wWinMaiCRTStartUp()that calls a pointer to an unitialized function (cccccccc()). The code apparently originated in a file:

"c:\jameson\private\winceos\coreos\core\corelibc\crtw32\startup\crt0dat.c'

Where can I get this file and how do I add it to my embedded visual c++ installation so I can step into it with the debugger?

ctacke

877 Posts

Posted - 19 Sep 2006 :  13:02:06  Show Profile  Email Poster
That's the C Run Time and the source isn't published (that I know of anyway) from Microsoft. THat said, I've never seen this error either. It sounds like you have eitehr done something strange in modifying the app startup function, or maybe you have some global class instances that you're attempting to initialize before the app runs (e.g. MyClass instance = MyClass(params); in the global space).

Can you show the code that's causing this?
Go to Top of Page

rickd

3 Posts

Posted - 19 Sep 2006 :  13:33:14  Show Profile  Email Poster
I can't show the code because it is a very large project and I can't distill it into an example. It may be caused by something that I have done but I've already spent too much time trying to track it down with no results.

By the way, it's not at startup that the error occurs. wWinMainCRTStartup() does some intialization and then calls WinMain() which does not return until the application has been closed at which time it does some cleanup - that's where the problem is. The cleanup code is calling cccccccc() which indicates to me that it is some type of unitialized pointer to a function. I could probably simulate the effect by calling onexit((_onexit_t)0xcccccccc). (In fact, I just tried this in a Win32 MFC program and it behaved exactly as expected).

I have already spent too much time blindly changing things in my source code to see if anything will fix the problem. I really need to see that wWinMainCRTStartup() so I and step through it and find out where that bad function pointer is coming from.



Edited by - rickd on 19 Sep 2006 13:36:02
Go to Top of Page

ctacke

877 Posts

Posted - 19 Sep 2006 :  13:45:48  Show Profile  Email Poster
I just verified that the source for that is actually available in the shared source (at least in CE 5.0). On my machine it's at:

C:\WINCE500\PRIVATE\WINCEOS\COREOS\CORE\CORELIBC\CRTW32\STARTUP

The PB license prohibits sending it or posting it, but you can always get the evaluation edition from Microsoft and look at it.
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.03 seconds. Snitz Forums 2000