|
Hi.
I am feeling a bit overwhelmed at the moment, I could use a small amount of direction...
How do I go about installing a crash handler into my own application? One that would catch crashes and generate a minidump?
I've already got one that works in .net 2003 -- but will need to move on to the next devstudio sooner or later....
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br />
Peter Weyzen<br />
Staff Engineer<br />
<A HREF="http://www.soonr.com">SoonR Inc.</A>
|
|
|
|
|
Don't. Dr.Watson already does this. To configure enter "drwtsn32" in the run dialog.
Steve
|
|
|
|
|
DrWatson is really only appropriate in an environment I am in control of.
I work on a commercial application.... which does crash from time to time.
I wanna capture these crashes on user's machines out there in the real world...
DrWatson is not appropriate for this situation.
So, back to my original question...
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br />
Peter Weyzen<br />
Staff Engineer<br />
<A HREF="http://www.soonr.com">SoonR Inc.</A>
|
|
|
|
|
|
Thanks for that. Our old crash handling code was kinda complex, but could be boiled down to just this...
With the conversion from 2003 to 2005 there's lots of things to figure out, lots of things that were defined and are now not defined....
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br />
Peter Weyzen<br />
Staff Engineer<br />
<A HREF="http://www.soonr.com">SoonR Inc.</A>
|
|
|
|
|
How does the .Net 2003 one work?
You could add exception handling to catch crashes. Not sure what information you might want in a "mini-dump"
One place I worked at had a trace mode that users could turn on to log application execution. The trace would generate text for key function call points and variables. There was also an exception handler that would save the trace log out before closing.
|
|
|
|
|
A minidump is somethat can be generated by a windows api -- it's a binary file that contains the status of the program at the time of the crash. It contains registers, stack frames, list of modules loaded, etc...
You can load the dump directly into visual studio, to see the conditions of the crash.
It's very handy.
We like to do this automatically -- if their program crashes, it generates this file and get's uploaded back to our servers. It's a handy way to see what problems our users are running into without having to interact with them...
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br />
Peter Weyzen<br />
Staff Engineer<br />
<A HREF="http://www.soonr.com">SoonR Inc.</A>
|
|
|
|
|
OK, I have never seen this before --- maybe some of you folks have. I have a legacy VC++ 6.0 program that communicates with a host computer. This program is all dialog-based and sends requests to the host through pressing buttons on the dialogs. Now if I step through a certain section of code that I'm trying to implement, it reacts differently during the Debug that it does during normal operation. It appears that one of the messages I am sending to the host either gets "lost" somewhere during normal ops, but gets handled when stepping through the code. Does anyone have any idea what could possibly be going on here?
Thanks for any and all input. This one has me almost to the point of pulling out my hair by the roots.
John P.
|
|
|
|
|
This may be completely unrelated, but if you are using TCP/IP and sockets, are you checking your
recv() calls to make sure you are getting all the bytes you are requesting? recv() only guarantees
1 byte received on any successful call (although almost always you get more) and this is a common
mistake. It happens with named pipes as well (that WTF cost me many hours once )
Also, remember that threads behave differently single stepping so you may be exposing a
synchronization problem that will bite you later on.
My 2 cents.
Mark
|
|
|
|
|
Something like this happened to me once. Turned out there was a memory leak that must have wondered into the buffered space in debug mode and not hurt anything but in release mode it caused a crash. We used Bounds Checker to track the memory leak.
|
|
|
|
|
I've also seen problems like this when you have multiple threads on the client or server and don't put appropriate synchonization in place, eg mutex. Single-stepping in the debugger gives the app time to breathe between calls so the conflicts don't occur.
It could also be something to do with not blocking correctly on the tcp socket
Don
|
|
|
|
|
Thank you all for you responses.
John P.
|
|
|
|
|
How did you learn to program?
Is it from the internet? a book?
If from internet wut site and if book, wut book?
I'm trying to learn any language like C++ or C# and i dont have any materials and dont know where to get some good sources.
When you first learn your language, was it hard and how long did it take you to start to create simple programs?
I'm sry if this is too many questions but im new here and i want to understand some of the experiences you had.
|
|
|
|
|
For me, I went back to school (college) and read textbooks and of course the programming assignments. After school, you learn the language pretty much by reading books on that particular language and then doing the sample programs they offer. If I were you, I would learn 'C' first. C++ is much too difficult to grasp as your first language unless your IQ is really high. There are a number of good books on 'C'. There are also many websites that have tutorials. You can even get FREE software programs like DevC++ which will allow you to run both 'C' programs and C++ when you're ready for that. Make good use of your Google searches and you should find what you need.
Good luck!
John P.
|
|
|
|
|
I actually think you're better off learning C++ first.
Steve
|
|
|
|
|
Learning a programming language does not teach one how to program. In college I started with a course titled "Programming Logic and Design" which was about constructs like memory, variable width, arrays, algorithms (sorting etc.) and worked with flow charts and pseudo code only.
led mike
|
|
|
|
|
Mike's post reminded me that you need to know HOW you personally learn best.
I'm one of those who found Mike's class on abstact concepts to be a total waste of time--it's why I dropped CS as a major. I learn by doing.
(Interestingly, my two sons are opposites in their basic learning style; one of my sons is very extreme in the learn by doing. He is almost hopeless in learn by reading or by watching. My other son can just watch someone do something and he knows it. Learn which one you are.)
Anyone who thinks he has a better idea of what's good for people than people do is a swine.
- P.J. O'Rourke
|
|
|
|
|
if you can learn C++ then C# will not hard
|
|
|
|
|
will you stop spamming and cross-posting the boards ?
if you have a general question, not refering to a particuliar language, then ask the right forum : General Discussions, The Lounge, or The Soapbox (depending on what you intend us to answer you)
|
|
|
|
|
"I'm trying to learn any language like C++ or C# and i dont have any materials and dont know where to get some good sources."
It is not as general as you think, I did mention C++ and C#, if you had read carefully. So it is not considered spam. I asked about C++ and C# and about where I can get some good materials, which is specific enough to be in the C++ and C# forums. By the way, I did post this in the Lounge.
"I'm sry if this is too many questions but im new here and i want to understand some of the experiences you had."
You are right about posting across boards, but I am a new member and I don't see it as spamming, as I did mention specifically C++ and C#. Rather than accusing me of a spammer, you could have just told me what I had done wrong in a more polite way. Now I can see how you treat new members and you are not as helpful as any other Code Project Users. If you didn't like what I posted, you could have simply scrolled down the page, ignoring my post.
Sry if this offends you but other users did not complain and had contributed to my questions.
Have a good day.
|
|
|
|
|
I learnt from the BASIC examples in the manual that came with my ZX Spectrum.
I guess nobody learns like that anymore, now that computers don't come with an accessible programming language built in
|
|
|
|
|
To SendMessage how to send a string as argument
and how to recieve and display that string
lets say in a edit box i have some text ABCD , i want to capture this text to a CString and pass this CString to Sendmessage as Wparam parameter to other remote process(iam using sockets for remote connevtion). and at remote Application i will capture this wparam and display the message
how to do this using send message.
Thanks in advance
abhi
|
|
|
|
|
You don't use SendMessage to communicate to another process using a socket.
Also, don't cross post.
led mike
|
|
|
|
|
SendMessage is for sends a message to the window
|
|
|
|
|
abhiramsss wrote: Sendmessage as Wparam parameter to other remote process(iam using sockets for remote connevtion). and at remote Application i will capture this wparam and display the message
I suggest don't use SendMessage to send the data between client and server.
Go through the following sample you will get the solution how to send the CString to remote process.
http://www.codeproject.com/useritems/MFCSockets.asp[ ^]
wrote:
Knock out 't' from can't,
You can if you think you can
|
|
|
|