| | |
GDB says it happens at a class declaration
Please support our C++ advertiser: Intel Parallel Studio Home
Thread Solved |
•
•
Join Date: Sep 2008
Posts: 31
Reputation:
Solved Threads: 0
Hello,
I am developing a library, which untill a few days ago was working perfectly. With some changes I needed to perform I started having a segmentation fault. The problem is that I cannot understand why the fault is happening since the conclusion from gdb is the following:
So, I understand it all starts when there is a copy of a Solution, but then why is gdb saying it occurs at a class declaration? What does this mean? How can I get to the bottom of the problem?
(SilvaConstraint does not have a copy constructor defined, but if I define one the gdb gives the same output; I checked the copy constructor at Solution also and I couldn't find any sign of memory violation)
Thank you for your help
I am developing a library, which untill a few days ago was working perfectly. With some changes I needed to perform I started having a segmentation fault. The problem is that I cannot understand why the fault is happening since the conclusion from gdb is the following:
C++ Syntax (Toggle Plain Text)
Program terminated with signal 11, Segmentation fault. [New process 31401] #0 0x0806a53a in Solution (this=0x9e1a8d0, copysol=@0x9e21908) at ../brickh-lib/Constraint.h:647 647 class SilvaConstraint{
(SilvaConstraint does not have a copy constructor defined, but if I define one the gdb gives the same output; I checked the copy constructor at Solution also and I couldn't find any sign of memory violation)
Thank you for your help
It is really hard for us to actually find the error without knowing what exactly your code is ,
Though You dont post the whole code, Post the Class And atleast 20 Lines Before and After the Class Definition,
Other-wise you can attach the whole file (donot forget to include tests in it) and post it up so someone can actually work on it.
Though You dont post the whole code, Post the Class And atleast 20 Lines Before and After the Class Definition,
Other-wise you can attach the whole file (donot forget to include tests in it) and post it up so someone can actually work on it.
•
•
Join Date: Sep 2008
Posts: 31
Reputation:
Solved Threads: 0
Hello
I am using meta-programming so posting evrything here will probably be useless adn confusing. What I am really looking for is maybe a hint of how to further debug this or what the meaning of gdb pointing to the class declaration is. I have tried a lot of things and I've googled a lot trying to find some explanation that would help me to do more... How can it be at the class declaration?! Shouldn't it at least be in the constructor, if it is at the time of creation?
Thank you
I am using meta-programming so posting evrything here will probably be useless adn confusing. What I am really looking for is maybe a hint of how to further debug this or what the meaning of gdb pointing to the class declaration is. I have tried a lot of things and I've googled a lot trying to find some explanation that would help me to do more... How can it be at the class declaration?! Shouldn't it at least be in the constructor, if it is at the time of creation?
Thank you
![]() |
Similar Threads
- Class declaration syntax error (C++)
- difference between a class declaration and a class definition (C++)
- plz help with the following class declaration in c++ (C++)
- help (overload << in a template class ) (C++)
- String declaration in class definition (C)
- writing a class without the class declaration? (C++)
- 6 Line class -> Me pounding head into wall (C)
Other Threads in the C++ Forum
- Previous Thread: Power Test - Resolve/C++
- Next Thread: Windows Programing
| Thread Tools | Search this Thread |
api array based beginner binary c++ c/c++ calculator char char* class classes code compile compiler console conversion count delete deploy desktop directshow dll download dynamic dynamiccharacterarray email encryption error file forms fstream function functions game givemetehcodez google graph gui homeworkhelp homeworkhelper iamthwee ifstream input int integer java lib linkedlist linker linux list loop looping loops map math matrix memory news numbertoword output parameter pointer problem program programming project proxy python random read recursion recursive reference return rpg sorting string strings struct temperature template templates test text text-file tree unix url variable vector video visual visualstudio win32 windows winsock wordfrequency wxwidgets





