Link to home
Start Free TrialLog in
Avatar of funvill
funvillFlag for Canada

asked on

COleDateTime Crashing on some computers


I build this little program, all it does is use COleDateTime to get the current time.

on most 90% of the computers i test it on it works fine, with no problems,
but i have found 5 windows XP computers that it crashes on start up.

Do you know what could cause some computers to crash when creating a COleDateTime object ?
Is there some documation on why COleDateTime crashes on some computers

I have included the source code and the compiled EXE

Thank you for your time.

Avatar of DanRollins
Flag of United States of America image

When I run the included EXE, I get an access violation (on my Win2K PC).  

It appears to be in the MFC object CDateTimeCtrl, in the GetTime member function.

The funny thing is, when *I* build the project (debug or release) the error does not occur AND it never seems to call that function!

I don't understand why it would be calling a member of CDateTimeCtrl.  I'm thinking there may be a difference in your MFC library version or soemthing like that.  

What version of VC++ are you using?
I'd recommend applying the latest service patch and try to rebuild.

It is difficult for me to isolate the specific problem because I can only re-create it when using your pre-compiled EXE.   Try this:

Change your project settings.  For Release mode: Under Link, put a check mark in
    Generate Debug Info
Build it and see if you can get it to malfunction.  If it does, you should be able to examine the stack-trace back to the actual failure point.

If you can create a release-version EXE with debug info that fails reliably, then add it to your ZIP file and I'll look at it again.

-- Dan
Avatar of funvill



The first time i compiled it with visual studios 6 with no servic pack

This version is done with visual studios 6 with servers pack 6

This version was done on my friends computer with

Could you please run these two versions and tell me if they crash.
I can not test these on the computers that failed durning the weekend.

Thank you for you time

- Funvil
Avatar of DanRollins
Flag of United States of America image

Link to home
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of funvill


Yep, i agree.

Just waitting to get a responce from my customer.

thanks for your help
Avatar of funvill


this also worked for my customer,

Thank you DanRollins