Crash in 13.0.0 |
Post Reply |
Author | |
terrym
Senior Member Joined: 13 April 2007 Status: Offline Points: 836 |
Post Options
Thanks(0)
Posted: 12 March 2009 at 4:35am |
Hi
I am not sure if this is a problem with 13.0.0 (I doubt it), but we are having strange issues with new versions created using 13.0.0 whereby on some installations of Windows (XP Home Edition, it seems; and as I said only some customers) that our application crashes.
Unfortunately :( unless anybody knows how, with Visual Studio 2008 SP1 the remote debugger does not work on XP Home Edition lol so we cant even debug. However we put some debug dialogs and found the case of he crash to be at:
pFrame = CreateNewFrame( pDocument, NULL ); However this is called from CSingleDocTemplate.cpp which is part of windows and called initially from OpenDocumentFile
Very strange problem and ANY help would be highly appreciated in how we can debug this on the clients machine due to the fact remote debugger is not able to be run on XP Home.
|
|
Thank you,
Terry Mancey email terry@tmancey.ltd.uk | linkedin www.tmancey.ltd.uk | twitter @tmancey |
|
znakeeye
Senior Member Joined: 26 July 2006 Status: Offline Points: 1672 |
Post Options
Thanks(0)
|
I would investigate what this pDocument pointer contains. Which class is it? How was it initialized?
1) Then, list all processes and services. Are they running themed XP or Classic mode?
2) Multiple monitors?
3) Restricted account?
|
|
PokerMemento - http://www.pokermemento.com/
|
|
znakeeye
Senior Member Joined: 26 July 2006 Status: Offline Points: 1672 |
Post Options
Thanks(0)
|
My best guess, however, is: The resource string used for the document creation is damaged ("Blabla.document\nBlabla"). Perhaps you are using a different language DLL on these computers and the translations are somehow damaged?
|
|
PokerMemento - http://www.pokermemento.com/
|
|
terrym
Senior Member Joined: 13 April 2007 Status: Offline Points: 836 |
Post Options
Thanks(0)
|
Our resource string is:
"Alphabet Names\n\nAlphabet Names\nAlphabet Names Files (*.and)\n.and\nAlphabetNames.Document\nAlphabet Names Document File"
And we only have English
|
|
Thank you,
Terry Mancey email terry@tmancey.ltd.uk | linkedin www.tmancey.ltd.uk | twitter @tmancey |
|
terrym
Senior Member Joined: 13 April 2007 Status: Offline Points: 836 |
Post Options
Thanks(0)
|
Not sure why its red above, oops.
And thanks for the help, it is much appreciated.
|
|
Thank you,
Terry Mancey email terry@tmancey.ltd.uk | linkedin www.tmancey.ltd.uk | twitter @tmancey |
|
znakeeye
Senior Member Joined: 26 July 2006 Status: Offline Points: 1672 |
Post Options
Thanks(0)
|
Copy all source code from CFrameWnd::CreateNewFrame and make your own function that logs all errors! |
|
PokerMemento - http://www.pokermemento.com/
|
|
terrym
Senior Member Joined: 13 April 2007 Status: Offline Points: 836 |
Post Options
Thanks(0)
|
Hi
Ok we made our own version of CreateNewFrame and now find it crashes when it calls CreateObject, the windows Create Object code is below (found in objcore.cpp)
CObject* CRuntimeClass::CreateObject() { ENSURE(this); if (m_pfnCreateObject == NULL)
{ TRACE(traceAppMsg, 0, _T("Error: Trying to create object which is not ") _T("DECLARE_DYNCREATE \nor DECLARE_SERIAL: %hs.\n"),m_lpszClassName); return NULL; }
CObject* pObject = NULL;
TRY { pObject = (*m_pfnCreateObject)();} END_TRY return pObject;} |
|
Thank you,
Terry Mancey email terry@tmancey.ltd.uk | linkedin www.tmancey.ltd.uk | twitter @tmancey |
|
terrym
Senior Member Joined: 13 April 2007 Status: Offline Points: 836 |
Post Options
Thanks(0)
|
so with the error we are getting it seems ENSURE( this ); is failing. Any ideas??? |
|
Thank you,
Terry Mancey email terry@tmancey.ltd.uk | linkedin www.tmancey.ltd.uk | twitter @tmancey |
|
ABuenger
Newbie Joined: 02 February 2006 Status: Offline Points: 1075 |
Post Options
Thanks(0)
|
Null pointer. ptr->CreateObject(); where ptr is null. |
|
Codejock support
|
|
terrym
Senior Member Joined: 13 April 2007 Status: Offline Points: 836 |
Post Options
Thanks(0)
|
m_pFrameClass is allocated by Windows, any ideas why this would fail??? only a very small amount of machines, 4 out of 1,000's ??? and all XP Home so far.
And thank you for your help it is very much appreciated.
|
|
Thank you,
Terry Mancey email terry@tmancey.ltd.uk | linkedin www.tmancey.ltd.uk | twitter @tmancey |
|
terrym
Senior Member Joined: 13 April 2007 Status: Offline Points: 836 |
Post Options
Thanks(0)
|
We are using same CMainFrame PreCreateWindow as examples, could it be a bug with XTP??? do you think |
|
Thank you,
Terry Mancey email terry@tmancey.ltd.uk | linkedin www.tmancey.ltd.uk | twitter @tmancey |
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Hi,
don't think its some change in Toolkit. Compare with your old application code and check what you changed.
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
terrym
Senior Member Joined: 13 April 2007 Status: Offline Points: 836 |
Post Options
Thanks(0)
|
Hi
Thats the thing, we have not changed anything in our application. Just simple bug fixes which could not have been anything to do with this.
|
|
Thank you,
Terry Mancey email terry@tmancey.ltd.uk | linkedin www.tmancey.ltd.uk | twitter @tmancey |
|
znakeeye
Senior Member Joined: 26 July 2006 Status: Offline Points: 1672 |
Post Options
Thanks(0)
|
What kind of class object is 'this', in this case?
|
|
PokerMemento - http://www.pokermemento.com/
|
|
terrym
Senior Member Joined: 13 April 2007 Status: Offline Points: 836 |
Post Options
Thanks(0)
|
Hi its CMainFrame, however we used our code from old XTP and it had CXTPFrameOffice2007Hook??? in CMainFrm.h
But the new sample does not have this, we have now removed this and app is working fine, but we are awaiting customer to confirm if working or not.
Any ideas on this finding please?
|
|
Thank you,
Terry Mancey email terry@tmancey.ltd.uk | linkedin www.tmancey.ltd.uk | twitter @tmancey |
|
terrym
Senior Member Joined: 13 April 2007 Status: Offline Points: 836 |
Post Options
Thanks(0)
|
Hi If you'd like to see then you can get from http://www.my-software.co.uk/temp/an-setup.exe Znakeeye if you want a free serial number let me know. |
|
Thank you,
Terry Mancey email terry@tmancey.ltd.uk | linkedin www.tmancey.ltd.uk | twitter @tmancey |
|
znakeeye
Senior Member Joined: 26 July 2006 Status: Offline Points: 1672 |
Post Options
Thanks(0)
|
Also, double-check that you do not have any resource conflicts. It could be that your "Alphabet Names\n\nAlphabet Names\nAlphabet Names Files (*.and)\n.and\nAlphabetNames.Document\nAlphabet Names Document File" string has a duplicate ID, which only becomes a problem if some DLLs are loaded in a different order than on your system - or whatever :P. Just double-check your identifiers!
|
|
PokerMemento - http://www.pokermemento.com/
|
|
znakeeye
Senior Member Joined: 26 July 2006 Status: Offline Points: 1672 |
Post Options
Thanks(0)
|
Or just run Team Viewer or another remote desktop software - on a problem computer which has VC++ installed, of course.
|
|
PokerMemento - http://www.pokermemento.com/
|
|
znakeeye
Senior Member Joined: 26 July 2006 Status: Offline Points: 1672 |
Post Options
Thanks(0)
|
Cool setup program! How did you create it? Got an error immediately:
"Failed to retrieve printer properties, DeviceName: ...'
It's not an error. We have "special" printers here at work. I believe you cannot assume you can read the properties.
Yeah, and I get this error too:
---------------------------
Alphabet Names --------------------------- Failed to create empty document. --------------------------- OK --------------------------- XP Pro SP2 (eng), Classic.
|
|
PokerMemento - http://www.pokermemento.com/
|
|
znakeeye
Senior Member Joined: 26 July 2006 Status: Offline Points: 1672 |
Post Options
Thanks(0)
|
Terry, I think I know why you got the error. I'll post a new thread to be able to post an image...
|
|
PokerMemento - http://www.pokermemento.com/
|
|
terrym
Senior Member Joined: 13 April 2007 Status: Offline Points: 836 |
Post Options
Thanks(0)
|
Thanks, it was created using Setup Factory 8 from IndigoRose.com, its very easy to configure etc. aswell and does all the hard work for you really.
|
|
Thank you,
Terry Mancey email terry@tmancey.ltd.uk | linkedin www.tmancey.ltd.uk | twitter @tmancey |
|
terrym
Senior Member Joined: 13 April 2007 Status: Offline Points: 836 |
Post Options
Thanks(0)
|
Thanks :) as any help is appreciated
|
|
Thank you,
Terry Mancey email terry@tmancey.ltd.uk | linkedin www.tmancey.ltd.uk | twitter @tmancey |
|
terrym
Senior Member Joined: 13 April 2007 Status: Offline Points: 836 |
Post Options
Thanks(0)
|
Didn't think to check this, but its got a unique ID so it aint this :(
|
|
Thank you,
Terry Mancey email terry@tmancey.ltd.uk | linkedin www.tmancey.ltd.uk | twitter @tmancey |
|
terrym
Senior Member Joined: 13 April 2007 Status: Offline Points: 836 |
Post Options
Thanks(0)
|
Problem is, then we'd have to have the source code on their machine and dont trust the client with source code :( Its only happened on 5 XP Home machines now which makes it even stranger as we installed XP Home on Virtual PC and it works perfect with fresh install.
|
|
Thank you,
Terry Mancey email terry@tmancey.ltd.uk | linkedin www.tmancey.ltd.uk | twitter @tmancey |
|
larryp
Groupie Joined: 15 January 2005 Location: United States Status: Offline Points: 61 |
Post Options
Thanks(0)
|
This is not an answer to your problem, but it might help with debugging crashes on a clients computer.
We use a crash handler to write a minidump file that contains the crash info. We have a dialog that is displayed on a crash to allow the user to quickly send it to us. We copy the minidump file into our source code directory, double-click it to start Visual Studio, hit F5 (Run) and it takes us right to the crash and shows us the call stack. Very easy and has helped us many times.
We use a variation of the code by Hans Dietrich on CodeJock (http://www.codeproject.com/KB/debug/XCrashReportPt1.aspx). There are some changes to use it on Visual Studio 2008, but it works nicely.
--Larry
|
|
terrym
Senior Member Joined: 13 April 2007 Status: Offline Points: 836 |
Post Options
Thanks(0)
|
Very cool, do you have a version that works straight away for VS2008. We dont mind paying as it would be great to implement for this customer to test for us.
|
|
Thank you,
Terry Mancey email terry@tmancey.ltd.uk | linkedin www.tmancey.ltd.uk | twitter @tmancey |
|
terrym
Senior Member Joined: 13 April 2007 Status: Offline Points: 836 |
Post Options
Thanks(0)
|
Hi
Ok very cool, however not sure if something we are missing in Visual Studio 2008, but when we enter the EIP address it doesn't go to the code location??? Any ideas please?
|
|
Thank you,
Terry Mancey email terry@tmancey.ltd.uk | linkedin www.tmancey.ltd.uk | twitter @tmancey |
|
ABuenger
Newbie Joined: 02 February 2006 Status: Offline Points: 1075 |
Post Options
Thanks(0)
|
http://www.codeproject.com/KB/debug/XCrashReportPt1.aspx?msg=1245807#xx1245807xx |
|
Codejock support
|
|
larryp
Groupie Joined: 15 January 2005 Location: United States Status: Offline Points: 61 |
Post Options
Thanks(0)
|
I should have mentioned that Hans has four articles posted. The last one is at http://www.codeproject.com/KB/debug/XCrashReportPt4.aspx
I put together a zip file containing Hans test application and my changes to it. I compiled it with Visual Studio 2008 and ran a quick test on Vista Ultimate. I have not thoroughly tested it, but it should be a good starting point. As the saying goes, "It is working on my machine".
To use the code you must follow the steps that Hans outlined. Some of the highlights are as follows:
* Build your release mode application with DEBUG information stored in the PDB. This is not a problem, since you do not ship the pdb files to your customer.
* Include the crash handler files in your application.
* Ship the crash report executable with your program.
When the program crashes on a clients machine, the code compiled into your program will create a minidump file, launch the crash report executable and exit. The crash report executable dumps the registry to a file, zips up all files and allows the user to email the zip file back to you.
Once you get the email, extract the minidump file and copy it into your source code directory.
This must be an exact copy of the source as it was built for the customer, including the path to the source.
Then double-click on the mindump file and Visual Studio opens.
Click run and Visual Studio takes you to the crash.
It includes the stack trace and stack variables but does not include data on the heap.
I have been using this technique for about three years and it has helped me solve many crashes. I have used it with Visual Studio 2003, 2005 and now 2008.
How do I send you the code? E-mail or do you have a web-server I can post it to?
--Larry
|
|
ABuenger
Newbie Joined: 02 February 2006 Status: Offline Points: 1075 |
Post Options
Thanks(0)
|
Why not post it here? There is an upload button when you make a new post. |
|
Codejock support
|
|
larryp
Groupie Joined: 15 January 2005 Location: United States Status: Offline Points: 61 |
Post Options
Thanks(0)
|
uploads/20090314_224943_XCrashReport.zip
I have uploaded a zip file. It contains a readme with more information.
Hope this helps.
--Larry
|
|
terrym
Senior Member Joined: 13 April 2007 Status: Offline Points: 836 |
Post Options
Thanks(0)
|
Thank you very much for this great help. I appreciate this and will add this to our project tomorrow and let you know our results. And if we can ever be of assistance to you just let us know as we owe you big time.
|
|
Thank you,
Terry Mancey email terry@tmancey.ltd.uk | linkedin www.tmancey.ltd.uk | twitter @tmancey |
|
terrym
Senior Member Joined: 13 April 2007 Status: Offline Points: 836 |
Post Options
Thanks(0)
|
Thanks, much appreciated.
Terry
|
|
Thank you,
Terry Mancey email terry@tmancey.ltd.uk | linkedin www.tmancey.ltd.uk | twitter @tmancey |
|
terrym
Senior Member Joined: 13 April 2007 Status: Offline Points: 836 |
Post Options
Thanks(0)
|
Thanks to larryp for such a great library. We have now fixed our issue.
Once again thanks, your help was much appreciated
|
|
Thank you,
Terry Mancey email terry@tmancey.ltd.uk | linkedin www.tmancey.ltd.uk | twitter @tmancey |
|
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 |