藍森林首頁 | 返回主頁 | 本站地圖 | 站內搜索 | 聯繫信箱 |
 您目前的位置:首頁 > 自由軟件 > 技術交流 > 應用編程


    

藍森林 http://www.lslnet.com 2006年6月6日 10:18


在main()的時候就出現Segmentation fault

在程序一開始執行的時候就出現:Segmentation fault,會是什麼原因?
0x80713c4 in __do_global_ctors_aux () at xilusmssubmit.cpp:32
32      XiluYDSMSSystem         tYDSMSSystem;
(gdb) next
0x804b3ee in _init ()
(gdb) next
Single stepping until exit from function _init,
which has no line number information.
0x804b96f in _start ()
(gdb) next
Single stepping until exit from function _start,
which has no line number information.

Program received signal SIGSEGV, Segmentation fault.
0x804ba15 in main (argc=Error accessing memory address 0xbf9d1f3c: Bad address.
) at xilusmssubmit.cpp:38
38      int     main(int argc,char * argv[])

這會是哪種原因造成的?請大家幫忙解釋一下.....

在main()的時候就出現Segmentation fault

在__do_global_ctors_aux () 函數中可能出現指針越界問題,你好好查查,最好把代碼貼出來。

在main()的時候就出現Segmentation fault

因為前面執行的時候都沒有問題,我跟蹤下去,一路上都沒有問題,代碼太多,這裡顯示不下..請諒解,
不知道大家以前有沒有遇到過這種情況,誰能幫忙解決一下....

在main()的時候就出現Segmentation fault

把__do_global_ctors_aux () 函數代碼貼出來

在main()的時候就出現Segmentation fault

連接的庫有問題,是有可能出現這種現象的。

在main()的時候就出現Segmentation fault

在main()的時候就出現Segmentation fault

-->
你把你認為出錯的代碼貼出來。
還有main()函數。像你這樣說一說,
怎麼幫你找出錯誤?

在main()的時候就出現Segmentation fault

不要讓別人為你debug。



Copyright © 1999-2000 LSLNET.COM. All rights reserved. 藍森林網站 版權所有。 E-mail : webmaster@lslnet.com