[Qt-interest] Problem with QHash and QThread
Bo Thorsen
bo at fioniasoftware.dk
Thu Jun 16 19:19:28 CEST 2011
Your problem is in code you didn't send here. There is nothing in the
code you sent that will crash the application.
Bo.
Den 15-06-2011 00:43, Andrei Sebastian Cîmpean skrev:
> Hello everybody,
>
> I have stumbled upon a problem that I don't quite understand and I was hoping
> someone can help me get to the bottom of it.
> I have a class that inherits QThread. In the header file I have:
>
> inline uint qHash(const QPoint& p)
> {
> return qHash(p.x()+p.y());
> }
> struct Hexagon{
> QPoint center;
> int centerSSD;
> QHash<QPoint,int> points;
> };
> class HexagonalSearch : public QThread, public BlockMatching
> {
> Q_OBJECT
> (...)
>
> , with BlockMatching being a simple class that just has some functions preset.
> It compiles without any warnings, although I know that's not necessarily a
> condition for no problems.
> When I run the app and it gets to part where it has to execute the run()
> function the app crashes. I can't debug using Qt Creator (don't know why it
> freezes at setting breakpoints even after reinstall) but when I run the
> debugger it instantly crashes with the message "The inferior stopped ...." ->
> Segmentation fault, and it displays assembly code with a flag set for a
> compare (cmpq).
> I have attached a screenshot with the result.
> Any help would be greatly appreciated and would probably save my life.
>
> Thank you for your time and patience,
> Andrei Sebastian Cîmpean
>
>
>
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at qt.nokia.com
> http://lists.qt.nokia.com/mailman/listinfo/qt-interest
Bo Thorsen,
Fionia Software.
--
Expert Qt and C++ developer for hire
Contact me if you need expert Qt help
http://www.fioniasoftware.dk
More information about the Qt-interest-old
mailing list