Hi i have a quite strange problem....this is the code
Code:
void ClassC::protocolList(QList<Protocol*> **list) { (*list) = this->mProtocolList; }
When i debug this assignment it doesn't go further.....it remains at this line
Can anyone tell me why?
Printable View
Hi i have a quite strange problem....this is the code
Code:
void ClassC::protocolList(QList<Protocol*> **list) { (*list) = this->mProtocolList; }
When i debug this assignment it doesn't go further.....it remains at this line
Can anyone tell me why?
Can you elaborate how you debug and how it "remains at this line"?
I set a breakpoint one line before and the program stops as expected then i press step over and the program does one step. Now the debugger is at my problem assignment line....and when i press step over again it does not move on......in detail: the arrow which indicates at whic line the debugger is standing disappears for a second and the reappears at the same line....instead of appearing at the next line
i hope i explained my problem in a way you can understand
can you tell us which compiler are you using?
Change your code to the following:
And run your program without a debugger. See if the statements get printed properly. Maybe there is some problem with the debugger itself (Qt Creator is known to work not very well with MSVC debugger).Code:
void ClassC::protocolList(QList<Protocol*> **list) { qDebug() << Q_FUNC_INFO << "Enter"; (*list) = this->mProtocolList; qDebug() << Q_FUNC_INFO << "Leave"; }
When program reaches the line it crashes and windows says: ****.exe doesnt work anymore
and debug output is:
Starte D:\HTL\DA\*****\02_Software\01_Program\****\debug\ ****.exe...
void ClassC::protocolList(QList<Protocol*>**) Enter
D:\HTL\DA\*****02_Software\01_Program\****\debug\* ****.exe beendet, Rückgabewert -1073741819
I am using MinGW
GNU Make 3.81
In that case no wonder the debugger doesn't want to continue execution...
Your code is simply invalid - I'd say you are passing an invalid pointer into this function. Why are you passing a pointer to a pointer to a list?
OK...now i have it!
You where right wysota....it was an invalid pointer because somewhere in my code i initialised a local variable of the type ClassC with the same name.....after changing it to the real variable it all worked fine....i hope you understand what i mean ^^
Thanks for the tipp