| | |
turbo c processor fault
Please support our C++ advertiser: Intel Parallel Studio Home
Thread Solved |
•
•
Join Date: Dec 2006
Posts: 4
Reputation:
Solved Threads: 0
when I exit a function i get 'general protection exception' -' processor fault'. Function writes to file and works ok except won't exit. What does this mean please, and where should I look ? Am using Turbo C 4.5 & Windows xp. Must be overwriting memory somehow I suppose but can't see where. Have increased stack size in .def file- no use.
All suggestions welcome !!
All suggestions welcome !!
Could you post the code you're having trouble with? Most likely you're trying to acess memory you shouldn't be, such as using a pointer that isn't pointing to what you expect it to, but it's kind of hard to guess unless you actually show us what you're trying to do.
"Technological progress is like an axe in the hands of a pathological criminal."
All my posts may be freely redistributed under the terms of the MIT license.
All my posts may be freely redistributed under the terms of the MIT license.
•
•
•
•
when I exit a function i get 'general protection exception' -' processor fault'. Function writes to file and works ok except won't exit. What does this mean please, and where should I look ? Am using Turbo C 4.5 & Windows xp. Must be overwriting memory somehow I suppose but can't see where. Have increased stack size in .def file- no use.
All suggestions welcome !!
http://www.daniweb.com/techtalkforums/thread50370.html
•
•
Join Date: Dec 2006
Posts: 4
Reputation:
Solved Threads: 0
Thanks for encouraging me to look for coding bug.
You are right. Eventually I traced it to repeated calls to a library routine, fcvt, which converts floats to strings. I didn't expect a problem here because I've used it elsewhere, but not with repeated calls. It seems I have to store the ouput in a static variable. Hence the return addresses getting screwed up, and the bizarre error messages.
You are right. Eventually I traced it to repeated calls to a library routine, fcvt, which converts floats to strings. I didn't expect a problem here because I've used it elsewhere, but not with repeated calls. It seems I have to store the ouput in a static variable. Hence the return addresses getting screwed up, and the bizarre error messages.
•
•
•
•
Thanks for reply. You are probably right that I'm missing some goodies staying with an old compiler, but I don't want the cost of a new one, or learning a new environment.
In spite of the bizarre error messages, it turned out to be a simple coding error.
cost is no excuse -- some such as Dev-C++ are free.
>> or learning a new environment
If you want to do this as a hobby that's ok. But no company uses that compiler any more.
Last edited by Ancient Dragon; Dec 28th, 2006 at 5:51 pm.
Don't PM me with questions -- you might get a nasty PM in response. If you have a question then post it in one of the forums.
Depends on what exactly do you mean by a company -- a big time software gaint or a small time budding organization with no more than 10 people.
If the former, then yes, you are correct. But if the latter, then no, I have seen small time companies (like those in embedded development etc.) using free IDE's like Code::Blocks and Dev C++.
If the former, then yes, you are correct. But if the latter, then no, I have seen small time companies (like those in embedded development etc.) using free IDE's like Code::Blocks and Dev C++.
I don't accept change; I don't deserve to live.
Jo Tujhe Jagaaye, Nindein Teri Udaaye Khwaab Hai Sachcha Wahi.
Nindon Mein Jo Aaye Jise To Bhul Jaaye Khawab Woh Sachcha Nahi.
Khwaab Ko Raag De, Nind Ko Aag De
Jo Tujhe Jagaaye, Nindein Teri Udaaye Khwaab Hai Sachcha Wahi.
Nindon Mein Jo Aaye Jise To Bhul Jaaye Khawab Woh Sachcha Nahi.
Khwaab Ko Raag De, Nind Ko Aag De
![]() |
Other Threads in the C++ Forum
- Previous Thread: What is the purpose of registers
- Next Thread: c++ data structres -trees
Views: 3791 | Replies: 15
| Thread Tools | Search this Thread |
Tag cloud for C++
6 add api array arrays beginner binary c++ c/c++ calculator char class classes code compile compiler console conversion convert count data delete desktop directshow dll dynamic encryption error file forms fstream function functions game givemetehcodez google graph homeworkhelper iamthwee ifstream input int integer java lazy lib linkedlist linker linux loop looping loops map math matrix memory microsoft newbie news number output parameter pointer problem program programming project proxy python random read recursion recursive reference return sort stream string strings struct studio system template templates test text tree unix url variable vector video visual visualstudio win32 windows winsock word wordfrequency wxwidgets






