Programming Forums

Programming Forums (http://www.programmingforums.org/forumindex.php)
-   C++ (http://www.programmingforums.org/forum15.html)
-   -   programming or virus problem (http://www.programmingforums.org/showthread.php?t=14066)

mukul Sep 30th, 2007 4:01 AM

programming or virus problem
 
Hello

I am a programmer working on visual studio 6.0 and working on visual C++ . I made a windows 32 bit application using mfc . The application is running all right but the application quits itself while running without any error message . I know this can be due to run time memory bound overrun but i have checked and rechecked it lots and lots of times but not able to find any such problem . Even if i dont execute any memory allocation code the same problem still prevails . I am not sure whether it is due to erronous coding or there is some virus in my system . please help me out .

DaWei Sep 30th, 2007 4:03 AM

Forum help and debugging both depend on lots of accurate information. You're hovering right around empty.

mukul Sep 30th, 2007 4:10 AM

The applications is an image processing application using CxImage 5.99c library . I have run the application several times but there is no regular pattern of the quiting of application . It just quits itself anytime . There is no trend of quiting . The values of all the inernal variables used is coming out to be correct . I dont know how to proceed further to find out the cause of problem . All my attempts for checking run time bound cheking are showing correct results .

grumpy Sep 30th, 2007 4:53 AM

The symptoms you describe suggest a programming error, either in the CxImage library, or in your code that uses it. Certainly, the most common cause of an abnormal program termination is an error by the programmer who wrote it (or, if libraries are being used, by the programmer of the library). Symptoms that change every time you run the program might suggest the cause of the error is some operation on input data (or output data that is read in next time) or, in really bad (and thankfully relatively rare) cases, might suggest your program is misbehaving so badly that it is upsetting functioning of the operating system.

The fact that internal variables are being printed out correctly probably means nothing. It is quite possible to have code misbehaving before or after you print the data out without affecting some specific data.

It is extremely unlikely a virus is causing your problem. Viruses very rarely target programs that are under development by computer users. Those that do will typically have more wide ranging symptoms.

You haven't really provided enough information for people to help. What you need to do is attempt to find a SMALL but COMPLETE sample of code that exhibits your symptoms. That can mean commenting out large (or small) areas of code, until the symptoms change or disappear -- and then try to work out WHY the symptoms have changed. You might have to do this several times as odds are in favour of there being lots of problems in your code that contribute to the problem.

For future reference, it is a good idea to get small parts of your program working correctly, rather than trying to get everything going at once. Then, once you have small parts working, progressively put them together and check how they interact. Such approaches avoid the problems you're having, rather than leaving them to the end when they are more difficult to find.


All times are GMT -5. The time now is 2:58 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC