duandi5328 2015-03-31 11:03
浏览 277

通过Cmd.Run执行命令时Golang中的跟踪陷阱错误

My program use os/exec.Cmd to play mp3 sound with libsox (https://github.com/OUCC/prism/blob/d0b96fe82c1aefb183a0435404e92acd083b6247/kiosk/main.go#L100). But after the sound is played (command is executed), I got following error and program exited.

trace trap (core dumped)  kiosk

Same problem is happen when I replaced the command with "ls". It's not important which command is executed.

I used debugger to know what's wrong and I got this stack trace:

I tried to make simple program that cause same program but I failed to do this... Please give me some advice.

go1.4 linux/amd64

update
minimal example https://gist.github.com/yuntan/df45e29a00158f0076ef

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 八路抢答器设计出现故障
    • ¥15 opencv 无法读取视频
    • ¥15 用matlab 实现通信仿真
    • ¥15 按键修改电子时钟,C51单片机
    • ¥60 Java中实现如何实现张量类,并用于图像处理(不运用其他科学计算库和图像处理库))
    • ¥20 5037端口被adb自己占了
    • ¥15 python:excel数据写入多个对应word文档
    • ¥60 全一数分解素因子和素数循环节位数
    • ¥15 ffmpeg如何安装到虚拟环境
    • ¥188 寻找能做王者评分提取的