Segmentation Fault occurs with glCreateProgramObjectARB() under Linux, if some ATI Mobility Radeon cards are used.
Recently, when I was doing a project under Linux, I found my code runs well on department computers but not on my own laptop. When the program calls glCreateProgramObjectARB(), it fails with Segmentation Fault and program is terminated.
以上供搜索引擎索引使用。下面开始正文。看不懂的都学中文去!恕在下没有精力翻译成又臭又长的英语。
最近写作业的时候发现同样的程序,在Windows下好好的,在Linux下不行。同样是Linux下呢,在学校机房就能用,在我的笔记本电脑上就是不行。具体症状是只要一调用OpenGL的glCreateProgramObjectARB(),程序立刻报一个segmentation fault(就是你不小心用了野指针的时候会发生的那种错误),然后就崩溃退出了。跟同学讨论发现有这个问题的都是ATI Mobility Radeon!我的笔记本电脑是HD 3650。某同学是HD 5470。所以这么看来大概是驱动有问题吧。
然后有同学说不能用开源驱动,要用ATI最新的闭源驱动11.2就好了。可是我用的就是这个11.2,上周刚装的,还是一样不行。刚才Ubuntu 10.04提示有新内核,问我要不要升级。我想那就升级试试看吧,于是就升级。从2.6.32-28升级到了2.6.32-29,然后按惯例重装显卡驱动。这么一搞居然就好了。反馈给那位同学,他说他的也是2.6.32-29。不过他还听说2.6.33系列是不行的是会崩溃的。也不知道是不是真的。
总之问题解决了就好。
你可以使用这个链接引用该篇文章 http://publishblog.blogchina.com/blog/tb.b?diaryID=6998990