|
It crashes every time and always at the same place.
But if I try to make the same steps which leads to crash on
my computer, everything is working correctly.
I can't visit the user with the debugger
rrrado
|
|
|
|
|
rrrado wrote:
It crashes every time and always at the same place.
Perhaps you could add some debugging code (message box, or a log file) to that particular area of the program.
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|
maybe I'll have to do so,
but it's probably inside quite complex function running in worker thread,
calling lot of functions, which are operating with strings, network and database
It would be so many messages
rrrado
|
|
|
|
|
I did not say it would be easy, unfortunately. The only thing I can offer that might expedite your time is a macro. It's bulky, but the goal is to squelch a bug, not operate at maximum efficiency, right?
#define LOG(x) {FILE *p=fopen(..., "a");fprintf(p, "%s\n", x);fclose(p);}
...
LOG("Starting abc task"); This is just an example. You might want to tweak it so that variables and such can be output, too.
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|
good idea to write it into file thanx
rrrado
|
|
|
|
|
Let's just hope that the file I/O does not mask the problem.
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|
I think you get that message after someone has called 'abort'. And 'abort' can get called when an exception is thrown inside an exception handler or when a C++ exception isn't caught at all.
So if you're using exception handling it's worth reviewing it. And if you're not it's worth looking at whether any of the libraries you're using are, and trying some try/catch stuff...
Paul
|
|
|
|
|
Thanks for suggestion, I didn't know that unhandled exceptions are making this.
I'm not using exception handlig, it seems to be much more difficult to use than good old return value errors.
I'll try to make some TRY CATK on whole function
rrrado
|
|
|
|
|
if it was an exeption, you should have the error message like this : unhandled exception 0x...... at....
TOXCCT >>> GEII power
|
|
|
|
|
That's what you get under the debugger. In a release build running alone using VC7.1 you get a message box containing,
"Runtime error!
This program has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information"
Paul
|
|
|
|
|
no, the message i described was a Windows generated messageBox...
TOXCCT >>> GEII power
|
|
|
|
|
Yes but it only appears if visual studio is intalled on the computer (because it asks you if you want to debug the code).
|
|
|
|
|
hiiiiiii
can anybody telll me how can i pick the RGB value from an image on "onMouseOver event" and how can i show them in edit boxes.
|
|
|
|
|
Try to get your control's device context and use GetPixel()
rrrado
|
|
|
|
|
GetRValue, GetBValue and GetGValue are used to get the color from the return value of GetPixel()
Don't try it, just do it!
|
|
|
|
|
thanx Alexander
canu give me the code so that it will help me alot coz i m a bit new to VC++
its a bit urgent dear.
waiting for ur reply
thanx again
bye
regards
tahir
|
|
|
|
|
Hi,
I have a question regarding reading and writing to the same (text)file. I know it is not Visual C++ (just C++) but I still hope someone will respond.
I have a project which I run from the command promp. The same exe file is run twice, with different parameters sent to the main() function, so that I have two dos windows open at the same time.
Below P1 is the first program and P2 the second program.
P1 output file is P2 inputfile and vice versa.
P1 reads a line with cin and then output it to a file. P2 does the same.
Everything works fine so far but...
...the question is how I would code a loop so that P1 reads a line from P2 output file with i.e. getline() until the textfile is updated(changed) by P2 and ONLY then print it out on P1 screen and vice versa???
This might seem to be a stupid program but it is for studying purpose.
Thanks in advance for any hints or solutions
Regards
Lars
|
|
|
|
|
I've never tried it, but I'm sure that there's some function in windows API which will setup notifications for you when choosen file is changed.
(most of the editors use this to reload the file when it's modified outside the editor,
maybe you would find this in wordpad sample soure code)
rrrado
|
|
|
|
|
But I think better way to send data from one program to another is using the pipe (p1.exe | p2.exe - stdin of p2 is connected to stdout of p1), but I've tried this only in unix, I'm not sure how will this run in Win)
rrrado
|
|
|
|
|
rrrado wrote:
I'm not sure how will this run in Win
In much the same way. See these two MSDN articles for examples:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dllproc/base/creating_a_child_process_with_redirected_input_and_output.asp
http://support.microsoft.com/default.aspx?scid=kb;en-us;190351
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|
Thanks for the suggestions!
Lars
|
|
|
|
|
Hi, I have a peculiar problem ! I'm developing a specialised backup facility which uses formatted CD's (created by Adaptec DirectCD) as the backup medium. I am testing the program as the CD reaches it's limit space-wise. Naturally, I test the available space on the CD using GetDiskFreeSpace() and compare it against the file size using CFile::GetLength() before embarking upon the write (using CFile::Write()) for that particular file. However, BEFORE I hit failure on the size comparison,I get an exception (diskFull) during a write operation. i.e.
CFile exception: diskFull, File E:\C\Data\Clipart\Christmas\Candle and holly.bmp, OS error information = 112.
First-chance exception in MyBackup.exe (MFC40D.DLL): 0xE06D7363: Microsoft C++ Exception.
However, using Explorer AFTER the event, I find that the free space on the CD is VASTLY greater than the size of the file being written at the time of failure (eg 300Kb vers 32Kb). If I rerun the backup (which SHOULD occur in the same file order), I get the failure in a different file (VERY suspicious,don't you think ?) I'm stumped as to how to persue this problem - can anyone make any suggestions ?
Doug
|
|
|
|
|
You cannot write on CDs directly like this, i wish we could
Search for some CD writer API
Papa
while (TRUE)
Papa.WillLove ( Bebe ) ;
|
|
|
|
|
why E: should be a "CD reader". i personnaly have 3 hard disks where two of them have two partitions...
C: , D: , E: , F: , and G: are HDD for me !
TOXCCT >>> GEII power
|
|
|
|
|
Because you didnt read his post, you just wanted to answer
He said
"Hi, I have a peculiar problem ! I'm developing a specialised backup facility which uses formatted CD's (created by Adaptec DirectCD) as the backup medium"
Papa
while (TRUE)
Papa.WillLove ( Bebe ) ;
|
|
|
|