且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

由于信号命令失败:分段故障:11

更新时间:2022-05-14 00:35:37

我最近遇到了同样的问题,我将尝试概括我是如何解决它的,因为很多这些答案都是为了帮助每个人。

I recently encountered the same problem, and I will try to generalise how I solved it, as a lot of these answers are to spesific to be of help to everyone.

1。首先查看错误消息的底部,以识别导致分段错误的文件和函数。

1. First look at the bottom of the error message to identify the file and function which causes the segmentation fault.

2。然后我查看该功能并将其全部注释掉。我编译完了它现在有效了。然后我一次删除部分函数的注释,直到我点击l那个导致错误的人。在此之后,我能够修复它,一切正常。 :)

2. Then I look at that function and commented out all of it. I compiled and it now worked. Then I removed the comments from parts of the function at a time, until I hit the line that was responsible for the error. After this I was able to fix it, and it all works. :)