2

I am using Qt 5.0.1 under Ubuntu 10.04 and in my application I need to use QSharedPointer together with the appropriate dynamic_cast (object_cast) conversions at runtime. These conversions are called in a shared object which is properly loaded at runtime. I have to deploy my application to run it on an embedded computer with Ubuntu 10.04 operating system; that's why I'm using Qt under Ubuntu 10.04.

If I build the my application and I run it in the same machine where Qt libraries are installed, everything works as expected.

However if I run the application on the embedded computer, qSharedPointerDynamicCast (and the similar QSharedPointer::dynamicCast, qSharedPointerObjectCast and QSharedPointer::objectCast) fails and returns a null pointer. I have checked that both machines have the same configuration and, with the exception of dynamic_cast/object_cast issues, everything seems to work fine.

I think this may be a RTTI problem, however, after extensive googling, I did not find the solution of my problem.

demonplus
  • 5,613
  • 12
  • 49
  • 68
arms
  • 163
  • 1
  • 3
  • 9

1 Answers1

0

I think that the only explanation for your troubles is that you have memory bugs in your application and you're either corrupting your objects, or using freed objects. Use Valgrind and see what you get.

Kuba hasn't forgotten Monica
  • 95,931
  • 16
  • 151
  • 313