I use C++/Qt for my project and I am facing this strange issue.
My application runs fine on any native Linux machine and Windows. The problem appears when I use a remote Linux machine to execute my program and use a X Windows server (I use Xming) to view/use it.The debugger points to a line where the dynamic_cast fails to get the object pointer(the cast returns a nice NULL) instead of the actual object I wanted.
I suspect some configuration issue which I must be missing to enable these runtime checks.
Anyone has faced such issues, any pointers towards a solution would be welcome.
Ok, After a lot of trials this was the solution.
I needed to export the interface classes explicitly, using attribute((visibility("default"))) And to make sure there is an entry in the vtable, define and empty virtual destructor for this.
It seems on some linux machines, if I don't export It does not recognize the RTTI, and returns a NULL.