Unsolved QtCreator debugger whats happened?
-
@Simon-Platten Not every node but every list has its own pointer to the first element in the list.
Maybe we are talking about different things? What do you mean if you say "node"? Don't you mean "list"? Node is actually one entry in a list/tree.
MyList - a class representing a list.
Node - an entry in the list (contains a data field and pointer to next node).
head - points to the first node in the list.
Maybe I just don't understand your use case and you really want all MyList instances to handle exactly same data (in this case a static head pointer is the way to go).
I don't know whether this static is the problem with the debugger - that was just an assumption. -
@jsulm, In my code the list and the node are one in the same, thats why I have a static pointer to head. Every node has access to the head of the list, I don't need another structure or class to define the list, because the list and the nodes share the same class.
Simply example:
class clsNode { private: static clsNode* mpobjHead; clsNode* mpobjNext; /* other members... for the node instance */ public: clsNode(); static clsNode* pobjGetHead() { return mpobjHead; } clsNode* pobjGetNext() { return mpobjNext; } };
-
Hi,
Since you are using Qt and you are implementing a linked list, why not use QLinkedList ?
-
@SGaist , Thank you, I'm pretty sure that the implementation of my linked list is ok, as this application is working fine without problems and the linked list has been established for over a year now....its just the debugger which is not behaving well...pointers and 'this' not showing correctly, in every other aspect the application and debugger is ok....so frustrating.
-
I'm still no further forward in finding a reason why the debugger has stopped working properly, its very annoying and seems to be something in my code that has broken the debugger, but how can anything in the code being debugged break the debugger?
-
I don't think this is a problem in your code... I have almost the same problem since I upgraded to Qt Creator 4.2.1 with Desktop Qt 5.7.1 MSVC2015_64bit.
I can't access "this" pointer whichever the class, and one time out of two (and even more) I also can't access member object/variable...
So annoying when it come to debug the code... I have to "qDebug" everything...
Hope someone will find what's wrong...
(PS. I don't have any static variable/object, so IT AIN'T THE PROBLEM)
-
@OlivierDuguay, thank you for posting, nice to know I'm not the only one experiencing this, now how do we escalate this issue so someone at Qt investigates the problem?
-
@Simon-Platten You can file a bug report if there isn't one already (https://bugreports.qt.io/secure/Dashboard.jspa)
-
@jsulm, thank you, I'll do it now.
-
Can you share the link to the report ? That will make it easier to find.
-
-
Better, but not completely fixed, visit https://bugreports.qt.io/browse/QTCREATORBUG-18030 for solution.
-
Yes, it's happening,
Code:
int* p = mask.size.p;
is shown as int and value is p[0]