View Full Version : QListWidget crashes when trying to clear

4th June 2014, 12:10
Hi All,

I have a list, that I fill with a QStringList. That works.
When I select an item, I want the list to be cleared and then filled with another QStringList.
The problem is, that when I click on one of the items, my whole Programme crashes, because of the following Error:

Invalid parameter passed to C runtime function.
Invalid parameter passed to C runtime function.
Error - RtlWerpReportException failed with status code :-1073741823. Will try to launch the process directly
terminate called after throwing an instance of 'std::out_of_range'
what(): vector::_M_range_check

my function for the Listwrite is the following:

void layout1::writeResultList(QStringList results){

Does anyone have an idea, why it crashes?


4th June 2014, 12:37
There seems to be an out-of-bounds access on an std::vector somewhere in the program. This may or may not be directly related to what you do in writeResultList(). First of all, you should try step-by-step debugging to see what statement causes the crash. Secondly, we cannot do much unless we see the complete source of your program.