久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

    <bdo id='qC3I6'></bdo><ul id='qC3I6'></ul>
  1. <small id='qC3I6'></small><noframes id='qC3I6'>

  2. <legend id='qC3I6'><style id='qC3I6'><dir id='qC3I6'><q id='qC3I6'></q></dir></style></legend>

      <i id='qC3I6'><tr id='qC3I6'><dt id='qC3I6'><q id='qC3I6'><span id='qC3I6'><b id='qC3I6'><form id='qC3I6'><ins id='qC3I6'></ins><ul id='qC3I6'></ul><sub id='qC3I6'></sub></form><legend id='qC3I6'></legend><bdo id='qC3I6'><pre id='qC3I6'><center id='qC3I6'></center></pre></bdo></b><th id='qC3I6'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='qC3I6'><tfoot id='qC3I6'></tfoot><dl id='qC3I6'><fieldset id='qC3I6'></fieldset></dl></div>
    1. <tfoot id='qC3I6'></tfoot>

      使用“嘗試";避免分段錯誤

      using quot;tryquot; to avoiding a segmentation fault(使用“嘗試;避免分段錯誤)
      • <bdo id='tZffH'></bdo><ul id='tZffH'></ul>
        <tfoot id='tZffH'></tfoot>

        <small id='tZffH'></small><noframes id='tZffH'>

        • <legend id='tZffH'><style id='tZffH'><dir id='tZffH'><q id='tZffH'></q></dir></style></legend>

          <i id='tZffH'><tr id='tZffH'><dt id='tZffH'><q id='tZffH'><span id='tZffH'><b id='tZffH'><form id='tZffH'><ins id='tZffH'></ins><ul id='tZffH'></ul><sub id='tZffH'></sub></form><legend id='tZffH'></legend><bdo id='tZffH'><pre id='tZffH'><center id='tZffH'></center></pre></bdo></b><th id='tZffH'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='tZffH'><tfoot id='tZffH'></tfoot><dl id='tZffH'><fieldset id='tZffH'></fieldset></dl></div>

                <tbody id='tZffH'></tbody>

                本文介紹了使用“嘗試";避免分段錯誤的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                問題描述

                最近在我的一個程序中,我遇到了分段錯誤問題.我設法找到了導致問題的線路,但我還沒有找到解決方法.

                Recently in one of my programs I got a segmentation fault problem. I managed to find the line that its is causing the problem but I haven't find the way of fixing it.

                行:

                self.window_player.add(self.vlc)
                

                其中 self.vlc 是一個小部件,self.window_player 是一個空的 Gtk.Window() 在 glade 中創建.

                where self.vlc is a widget and self.window_player is an empty Gtk.Window() created in glade.

                該行在我的程序的 __init__ 處,所以實際上這個問題只在啟動程序時發生.奇怪的事實是,錯誤只出現了 10 次中的 1 次(啟動程序)

                The line is at the __init__ of my program, so actually this problem only happen when launching the program. The weird fact is that the error only appears like 1 of 10 times (of launching the program)

                錯誤:Segmentation fault 是我從終端得到的唯一輸出

                the error: Segmentation fault is the only output that I get from the terminal

                所以我嘗試了:

                while True:
                    try:
                        self.window_player.add(self.vlc)
                        break
                    except:
                        print "segmentation"
                

                問題是try似乎沒有排除分段錯誤!

                The problem is that the segmentation fault don't seems to be excepted by the try!

                推薦答案

                對不起,你處理不了.段錯誤是由內存損壞、超出自有內存邊界的讀取或寫入、雙重釋放和其他一些原因引起的.

                Sorry, you can't handle it. A segfault is caused by memory corruption, reading or writing beyond boundaries of owned memory, double frees, and a few other.

                您可以在此處找到一些導致段錯誤的問題示例:

                You can found a few examples of issues that cause a segfault here:

                https://gist.github.com/carlos-jenkins/8873932

                操作系統會殺死有問題的程序,你無能為力.您唯一的解決方案是糾正根本問題.

                The operating system will kill the offending program, you can't do much about it. Your only solution is to correct the root problem.

                您可以使用 Valgrind 工具運行程序,它可以讓您準確找到問題所在:

                You can run a program using the tool Valgrind, it will allow you to find exactly where the problem is:

                http://valgrind.org/

                在 Ubuntu 上,只需 sudo apt-get install valgrind 然后 valgrind <program cmd> 將啟動程序.這種偏離會慢很多,但大多數時候會發現問題.

                On Ubuntu, just sudo apt-get install valgrind and then valgrind <program cmd> will launch the program. This offcourse will be a lot slower, but will identify the problem most of the time.

                旁注:從技術上講,您可以通過為該信號注冊回調來捕獲 SIGSEV 信號.但你不應該.有關更多信息,請參閱此答案:

                Side note: Technically you can catch a SIGSEV signal by registering a callback for this signal. But you shouldn't. See this answer for more information:

                https://stackoverflow.com/a/10203062/439494

                這篇關于使用“嘗試";避免分段錯誤的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

                【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

                相關文檔推薦

                How to bind a function to an Action from Qt menubar?(如何將函數綁定到 Qt 菜單欄中的操作?)
                PyQt progress jumps to 100% after it starts(PyQt 啟動后進度躍升至 100%)
                How to set yaxis tick label in a fixed position so that when i scroll left or right the yaxis tick label should be visible?(如何將 yaxis 刻度標簽設置在固定位置,以便當我向左或向右滾動時,yaxis 刻度標簽應該可見
                `QImage` constructor has unknown keyword `data`(`QImage` 構造函數有未知關鍵字 `data`)
                Change x-axis ticks to custom strings(將 x 軸刻度更改為自定義字符串)
                How to show progress bar while saving file to excel in python?(如何在python中將文件保存為excel時顯示進度條?)

                    <tbody id='Y9QJf'></tbody>
                  • <bdo id='Y9QJf'></bdo><ul id='Y9QJf'></ul>

                    1. <tfoot id='Y9QJf'></tfoot>

                      <i id='Y9QJf'><tr id='Y9QJf'><dt id='Y9QJf'><q id='Y9QJf'><span id='Y9QJf'><b id='Y9QJf'><form id='Y9QJf'><ins id='Y9QJf'></ins><ul id='Y9QJf'></ul><sub id='Y9QJf'></sub></form><legend id='Y9QJf'></legend><bdo id='Y9QJf'><pre id='Y9QJf'><center id='Y9QJf'></center></pre></bdo></b><th id='Y9QJf'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='Y9QJf'><tfoot id='Y9QJf'></tfoot><dl id='Y9QJf'><fieldset id='Y9QJf'></fieldset></dl></div>

                        1. <legend id='Y9QJf'><style id='Y9QJf'><dir id='Y9QJf'><q id='Y9QJf'></q></dir></style></legend>

                          <small id='Y9QJf'></small><noframes id='Y9QJf'>

                          主站蜘蛛池模板: 欧美电影网 | 亚洲精品视频观看 | 91精品国产综合久久香蕉麻豆 | 久久综合一区二区 | 免费激情网站 | 福利视频网站 | 午夜免费福利片 | 青娱乐一区二区 | h视频免费在线观看 | 97久久久| 成人午夜看片 | 一区二区手机在线 | www.欧美视频 | 欧美日韩在线成人 | 亚洲视频在线看 | 日韩黄色小视频 | 超碰成人av | 免费国产黄 | 久久亚洲一区二区三区四区 | 中文字幕一区在线 | 精品国产乱码久久久久久闺蜜 | 国产天天操 | 91国内精品| 国产91一区 | 亚洲一区国产精品 | 日韩欧美一区二区三区在线播放 | 国产视频导航 | 精品国产乱码久久久久久闺蜜 | 老牛影视av一区二区在线观看 | 最新国产精品 | 久久精品成人热国产成 | 成人免费在线网 | 欧美色a v | 亚洲欧美视频 | 一区二区三区四区视频 | 欧美日韩一区二区三区在线观看 | 精品国产一区二区三区久久久蜜月 | 国产美女视频 | 日韩精品一区二区三区在线播放 | 一区在线免费视频 | 久久精品国产久精国产 |