already did, nothing wrong
already did, nothing wrong
Post your backtrace.
Did you mean this?:
Signal name: SIGSEGV
Signal meaning: Segmentation fault
if not:
http://pastebin.com/R5uubZPf
---The text that you have entered is too long (46227 characters). Please shorten it to 10000 characters long.
anything else?
No, that is the compiled code of a QWidget::setParent function.
But it might get us closer to the error.
If your program fails in this function, you're creating a widget with a non valid parent.
I guess Channel is a widget?
And the first argument in the constructor is the parent?
Does "this" exist?
Channel is a widget yes, and "this" exist while calling it and yes the first arguemnt is QWidget
I would love to see the backtrace.
What system are you using? Window, Linux, MacOs, ... ?
What IDE are you using? Qt Creator, ... ?
Windows, Qt creator (to debug), and Qt Command Line to compile. how do i get the backtrace?
In Qt Creator, in stead of running the program normally, run the program in the debugger.
When it crashes, go to the stack view (should be the list on the left I think), it should contain the backtrace.
nope, cant see anything![]()
I'm not in front of my computer at the moment so I can't help you with that at the moment.
But to give some more information:
The backtrace is a list of functions that were the last functions being run in your program.
The very last function in this list usually contains the crash. You can then follow the list of functions to see where the problem first occured.
Segmentation faults happen when you try to access memory that you should never access (like the memory segment of the kernel). Most of the time this happens when the pointer to an object is 0.
The stack list should be the list on the left in the debugging section of Qt Creator.
I agree that running in a debugger will be the fastest solution here. Another point: you never check the results of your "find" operation. Despite your insistence that there's a space to be found in the string, it's poor form not to check that the operation actually succeeded.
You could also simply print the results of each line shown to cerr, which would at least isolate the line that is causing the problem. Printing out tmp prior to the string manipulations would also shed some light.
ok i have made something like this:
and then read->append(buffer) and it worked but i commented out the:Qt Code:
if(sscanf(tmp.c_str(), "/join %s", buffer) > 0) {To copy to clipboard, switch view to plain text mode
so its something wrong with them.Qt Code:
To copy to clipboard, switch view to plain text mode
Bookmarks