问题:
qt中包错“the inferior stopped because it triggered an exception",如下图所示:
定位结果:
加了好多日志后,原来是调用memcpy时传的第三个参数(拷贝字符的个数)为负数,导致报错。
02-17
6637
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
08-17
2583
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
06-13
1万+
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
05-08
7008
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
08-26
2万+
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
07-20
2551
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)