program received signal:SIGABRT

平常我们写程序的时候经常会遇到这样的问题。program received signal:SIGABRT 以及EXC_BAD_ACCESS

SIGABRT 一般是过度release 或者 发送 unrecogized selector导致。

EXC_BAD_ACCESS 是访问已被释放的内存导致。

查了下StackOverflow。找到下面的答案,说道linux内核下面了!

SIGABRT is raised by the abort(3) function. It's impossible to tell exactly what's going on in your program without more information, but the most common reasons that abort() gets called are:

  • Your sending a message to an Objective-C object that doesn't support/implement that message. This results in the dreaded "unrecognized selector sent to instance" error.(你发送给对象一个它并不支持或者是没实现的消息,这导致可怕的 "unrecognized selector sent to instance" 错误
  • You have a failed assertion somewhere. In non-debug builds that define the macro NDEBUG, the standard library macro assert(3) calls abort() when the assertion fails.(某个地方你做了个错误的判断)
  • You have some memory stomping/allocation error. When malloc/free detect a corrupted heap, the may call abort() (see, e.g. this question)
  • You're throwing an uncaught exception (either a C++ exception or an Objective-C exception)(内存分配出错,内存泄露,会调用abort())

In almost all cases, the debug console will give you a little more information about what's causingabort() to be called, so always take a look there.

(多数情况下,调试控制台会给你更多的信息关于导致了abort的原因。所以仔细看)。



  • 1
    点赞
  • 5
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
引用提到,在使用Pytorch 1.8训练TD3算法时,遇到了报错"Process finished with exit code 134 (interrupted by signal 6: SIGABRT)"的问题。根据引用中提供的解决方法,这个问题可能与系统使用的显卡有关。一个可能的解决方法是安装NVIDIA PRIME并切换至独立显卡模式。具体步骤如下: 1. 打开终端并执行以下命令安装NVIDIA PRIME: ``` sudo apt install nvidia-prime ``` 2. 切换至独立显卡模式: ``` sudo prime-select nvidia ``` 3. 等待切换完成,当提示显示"Done"时,表示切换已完成。 4. 重新启动系统。 通过以上步骤,切换到独立显卡模式后,anaconda-navigator报错的问题应该会解决。您可以继续使用Pytorch 1.8训练TD3算法,而不会再出现"Process finished with exit code 134 (interrupted by signal 6: SIGABRT)"的错误。如果未来需要切换回集成显卡模式,可以使用以下命令: ``` sudo prime-select intel ``` 然后重新启动系统即可切换到集成显卡模式。这样,您应该能够解决报错问题并顺利训练TD3算法。<span class="em">1</span><span class="em">2</span><span class="em">3</span> #### 引用[.reference_title] - *1* *3* [Process finished with exit code 134 (interrupted by signal 6: SIGABRT)的解决方法,ubuntu16.04](https://blog.csdn.net/qq_45386324/article/details/104466422)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"] - *2* [Process finished with exit code 134 (interrupted by signal 6: SIGABRT)的解决方法--Pycharm2021.3.3](https://blog.csdn.net/akansase/article/details/126736176)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"] [ .reference_list ]

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值