Toss about for a long time, finally clear the specific reason!
According to the exception prompt, vector is out of bounds, but it has not been located to which vector variable for a long time.
Write the class printf before and after the interrupt position, find the interrupted function, and print inside the function, only to find that the function doesn’t go in at all. It’s strange how you can’t go back in, no other thread, no other place to cause a crash. At this point, I should have thought to check the input of the function earlier. If the input is not correct, the function cannot enter. However, I have never encountered the situation that the input causes the function to not enter, so I did not think to check the input.
The input is a vector type, and the error is due to a problem with the access method.
Vector has a variety of access methods, which can be accessed directly in the way of array, such as VEC variable, VEC [0], or at(), vec.AT (0). There are differences between the two approaches. If veC happens to be empty, accessing the 0th element as an array will not be considered wrong, but the second access using the at method will result in the above error!!
According to the exception prompt, vector is out of bounds, but it has not been located to which vector variable for a long time.
Write the class printf before and after the interrupt position, find the interrupted function, and print inside the function, only to find that the function doesn’t go in at all. It’s strange how you can’t go back in, no other thread, no other place to cause a crash. At this point, I should have thought to check the input of the function earlier. If the input is not correct, the function cannot enter. However, I have never encountered the situation that the input causes the function to not enter, so I did not think to check the input.
The input is a vector type, and the error is due to a problem with the access method.
Vector has a variety of access methods, which can be accessed directly in the way of array, such as VEC variable, VEC [0], or at(), vec.AT (0). There are differences between the two approaches. If veC happens to be empty, accessing the 0th element as an array will not be considered wrong, but the second access using the at method will result in the above error!!
Read More:
- [Solved] runtime error: reference binding to null pointer of type ‘std::vector<int, std::allocator<int>>‘
- Go Slice Error: panic:runtime error:index out of range [0] with length 0 [Solved]
- runtime error ‘9’: subscript out of range error in VBA programming
- [Solved] MindSpore Error: ValueError: `padding_idx` in `Embedding` out of range
- std::dynamic_pointer_cast Error: source type is not polymorphic
- How to Solve “RIP Address Out Of Range” Error
- Android Studio Error: String index out of range 0 [How to Solve]
- [Solved] TensorFlow severing Container Creat Error: failed: Out of range: Read less bytes than requested
- [Solved] std::max() error C2589: ‘(‘ : illegal token on right side of ‘::‘
- Mongodb std::exception::what(): basic_filebuf::underflow error reading the file: iostream error
- How to Solve Docker Error: elasticsearch exception: type=cluster_block_exception, reason=blocked by: [FORBIDDEN/12/index read-only / allow delete (api)];
- [Solved] electron-builder Package mac Error: panic: runtime error: index out of range
- C++ Primer Program in VsCode error: no match for call to ‘(std::__cxx11::string…)
- How to Solve error C2039: “to_ String “: not a member of” STD “
- How to Solve Vector Variable Error in sub thread
- Chrome Error: Uncaught Error: SECURITY_ERR: DOM Exception 18
- Linux C++ Error: invalid use of incomplete type [How to Solve]
- [Solved] The method getContextPath() from the type HttpServletRequest refers to the missing type String
- Libtorch Error: Expected object of type Variable but found type CUDALongType for argument #2 ‘index’
- maven Error: Element ‘dependency’ cannot have character [children], because the type’s content type is