Background
I have terabytes of raw data files with a relatively small subset of tagged data. I wrote C ++ code (calling some ancient MSVC ++ 2003 code, which I greatly modified to compile on the latest compilers) to combine annotated data slices.
Most of this tagged data is concentrated in one file, but this file appears to be where my program crashes.
Problem
I get
Invalid parameter passed to C runtime function. Invalid parameter passed to C runtime function. terminate called after throwing an instance of 'int'
In my Qt output window, and the windows tell me the same thing in a popup window, but at the moment it is too late to get any useful information from the executable / debugger, it seems (although I don’t have a debugger with Qt at all).
What i tried
I searched all the information and found a lot of people with this error message, but it is so common that none of their problems can be the same as mine, and there is such a long list of various C runtime functions that sift them all slowly and don't seem to help.
My question
"Find a man a mistake, and you will help him for one day. Teach a man to debug, and you will help him all his life. Send a path to stackoverflow and you will help many men and get a lot of points."
Is there a general method to find the C runtime function, and what was the argument? Did I miss some fancy debugger features? Is there anything else you could recommend or information that I could provide?
I hope to get an answer to this question to help everyone with this problem, and not just me, but I will be glad if they help me too.
Specifically for my problem:
My stack trace looks like this:
0 ntdll! DbgBreakPoint 0x7727000d
1 ntdll! DbgUiRemoteBreakin 0x772ff156
2 ?? 0x6f06eaa1
3 KERNEL32! BaseThreadInitThunk 0x7501338a
4 ntdll! RtlInitializeExceptionChain 0x77299902
5 ntdll! RtlInitializeExceptionChain 0x772998d5
6 ??
and gdb cannot get a better trace (it seems that I'm trying to do with it, I get a timeout error).
After trying a couple more functions to be sure that everything gave a timeout, to try to "backtrace" again give me the result. I guess I just never put this much time in gdb after he once attacked me.
However, I could find something with this new information. Think that my problem is closed, but my general point is still true. I believe: now I have found a function with a problem (I think), but not why this is a problem, and that this is an invalid parameter. Even better, I traced it to a line that says "throw 1". So now I assume that windows / Qt translates this to an "invalid parameter". But this is not true.
It may just be the wrong code, it doesn't even need to be a C function, and nothing should be wrong with your parameters.
...
# 17 0x00c17d72 in libstdC ++ - 6! .Cxa_throw () from C: \ Qt \ 5.5 \ mingw492_32 \ bin \ libstdC ++ - 6.dll Information about the character table is not available. ...