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:

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{

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

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.

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 tried with VC++ debugger and here I get a proper location to look for an inconsistency, not the class declaration anymore. Any hints on why this GDB behavior?

This question has already been answered. Start a new discussion instead.