简体   繁体   English

Python-Ubuntu 12.04中的细分错误

[英]Python - segmentation error in ubuntu 12.04

My program is coded in Python, and it calls a bash script in a vte window: 我的程序是用Python编码的,它在vte窗口中调用bash脚本:

在此处输入图片说明

In 14.04 or 14.10 ubuntu system, no problem. 在14.04或14.10 ubuntu系统中,没问题。 (python 2.7.8) (python 2.7.8)

But, in ubuntu 12.04, the window closes with this message: (python 2.7.3) 但是,在ubuntu 12.04中,窗口关闭,显示以下消息:(python 2.7.3)

segmentation error

To debug, I've tried to use gdb with this line: 为了调试,我尝试在以下行中使用gdb

gdb -ex r --args python my_program.py

The output of gdb at the end is: 最后的gdb输出为:

Program received signal SIGPIPE, Broken pipe.
0xb7fdd416 in __kernel_vsyscall ()

I know it's a problem with the bash script, but I don't know realy what is the problem. 我知道bash脚本有问题,但我真的不知道问题出在哪里。 The line to call the bash script is: 调用bash脚本的行是:

self.child_pid = self.v.fork_command(None, ['/bin/bash', cli, '-f', '-d', dest, '-u', adresse, v])

It is possible to debug this for ubuntu 12.04 ? 是否可以针对ubuntu 12.04进行调试? How can I do ? 我能怎么做 ?

I have found a solution with insering a sleep 1 in the bash script (cli), just after the ffmpeg command: 我在ffmpeg命令之后找到了在bash脚本(cli)中插入sleep 1的解决方案:

ffmpeg -y -i "${M3U2}" -vcodec copy -acodec copy "${Directory}/${PROG}_${ID}.mkv"
sleep 1

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM