google-deepmind / google-deepmind/dm_control

Crash on macOS with matplotlib and dm_control.suite

未关闭
#157 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
Python
星标
4.7k
派生
764
PR 合并指标
30 天内没有已合并 PR

描述

I'm seeing a crash with the following program:
```python
import matplotlib.pyplot as plt
from dm_control import suite

plt.plot()
plt.show()
```

If I disable the dm_control import, or if I `import dm_control` without importing `suite`, the empty figure displays normally.

If I leave it as-is, I get the following error:

```
2020-09-21 09:26:23.494 Python[24974:1597019] -[NSApplication _setup:]: unrecognized selector sent to instance 0x7fa5e2974e80
2020-09-21 09:26:23.496 Python[24974:1597019] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[NSApplication _setup:]: unrecognized selector sent to instance 0x7fa5e2974e80'
*** First throw call stack:
(
0 CoreFoundation 0x00007fff344e1acd __exceptionPreprocess + 256
1 libobjc.A.dylib 0x00007fff5ebe5a17 objc_exception_throw + 48
2 CoreFoundation 0x00007fff3455b8d6 -[NSObject(NSObject) __retain_OA] + 0
3 CoreFoundation 0x00007fff3448393f ___forwarding___ + 1485
4 CoreFoundation 0x00007fff344832e8 _CF_forwarding_prep_0 + 120
5 Tk 0x00007fff4026e7d8 TkpInit + 466
6 Tk 0x00007fff401edb86 Tk_Init + 1706
[...]
54 Python 0x000000010b315d0b _PyEval_EvalFrameDefault + 6576
55 Python 0x000000010b31d7a6 _PyEval_EvalCodeWithName + 1870
56 Python 0x000000010b2876e5 _PyFunction_FastCallDict + 441
57 Python 0x000000010b35a35c pymain_run_module + 147
58 Python 0x000000010b3593f5 pymain_main + 4196
59 Python 0x000000010b359f80 _Py_UnixMain + 56
60 libdyld.dylib 0x00007fff603b43d5 start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
Abort trap: 6
```

I'm running Python 3.7.4 on MacOS 10.14.6 and `pip list` shows the following versions:
```
dm-control 0.0.322773188
dm-env 1.2
dm-tree 0.1.5
matplotlib 3.3.2
```

Seems related to issues #62 and #80.

贡献指南

打开贡献指南

调研方向

首先,在 Python 3.7.4、macOS 10.14.6 以及列出的 dm-control 和 matplotlib 版本上复现最小程序。将其行为与 issues #62 和 #80 进行比较,然后追踪与 Tk traceback 相关的 dm_control.suite import path。程序能够在不崩溃的情况下显示空 figure 即表示完成。

由索引模型根据 Issue 内容生成。

评估

技术栈
matplotlib, python
领域
data-visualization, desktop-dev, operating-systems
Issue 类型
缺陷
难度
4/5
预计耗时
3-5 天
活跃度
停滞
描述清晰度
基本清楚
新手友好度
35/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。