Kivy does not work at all (seg faults) on MacOS
Software Versions
- Python: 3.11.6
- OS: MacOS Ventura 13.5, and 13.6.6 (Apple M2 Pro)
- Kivy: 2.3.0
- Kivy installation method:
pip install kivyinto a clean venv
Describe the bug
When attempting to use Kivy, a bus error occurs immediately. See below for stack trace.
Expected behavior
Application runs.
To Reproduce
From https://kivy.org/doc/stable/guide/basic.html#quickstart:
import kivy
kivy.require('2.3.0') # replace with your current kivy version !
from kivy.app import App
from kivy.uix.label import Label
class MyApp(App):
def build(self):
return Label(text='Hello world')
if __name__ == '__main__':
MyApp().run()
Code and Logs and screenshots
Application output (no additional info in kivy log):
% py kivytest.py
[INFO ] Logger: Record log in /Users/cipriani_pro2023/.kivy/logs/kivy_24-03-28_17.txt
[WARNING] Config: Upgrading configuration in progress.
[WARNING] Config: Older configuration version detected (24 instead of 27)
[INFO ] Kivy: v2.3.0
[INFO ] Kivy: Installed at "/Users/cipriani_pro2023/pyenv-factoryflash/lib/python3.11/site-packages/kivy/__init__.py"
[INFO ] Python: v3.11.6 (main, Nov 2 2023, 04:39:43) [Clang 14.0.3 (clang-1403.0.22.14.1)]
[INFO ] Python: Interpreter at "/Users/cipriani_pro2023/pyenv-factoryflash/bin/python3"
[INFO ] Logger: Purge log fired. Processing...
[INFO ] Logger: Purge finished!
[INFO ] Factory: 195 symbols loaded
[INFO ] Image: Providers: img_tex, img_imageio, img_dds, img_sdl2 (img_pil, img_ffpyplayer ignored)
[INFO ] Text: Provider: sdl2
[INFO ] Window: Provider: sdl2
[INFO ] GL: Using the "OpenGL ES 2" graphics system
[INFO ] GL: Backend used <sdl2>
[INFO ] GL: OpenGL version <b'2.1 Metal - 83.1'>
[INFO ] GL: OpenGL vendor <b'Apple'>
[INFO ] GL: OpenGL renderer <b'Apple M2 Pro'>
[INFO ] GL: OpenGL parsed version: 2, 1
[INFO ] GL: Shading version <b'1.20'>
[INFO ] GL: Texture max size <16384>
[INFO ] GL: Texture max units <16>
zsh: bus error python3 kivytest.py
Bus error log and stack trace:
-------------------------------------
Translated Report (Full Report Below)
-------------------------------------
Process: Python [88873]
Path: /opt/homebrew/*/Python.framework/Versions/3.11/Resources/Python.app/Contents/MacOS/Python
Identifier: org.python.python
Version: 3.11.6 (3.11.6)
Code Type: ARM-64 (Native)
Parent Process: zsh [61650]
Responsible: Terminal [18342]
User ID: 502
Date/Time: 2024-03-28 13:07:36.5233 -0400
OS Version: macOS 13.5 (22G74)
Report Version: 12
Anonymous UUID: 5EB3BC1B-34BF-6A22-2415-C798C4BA93A9
Sleep/Wake UUID: 74E1A2F8-C817-46FB-9C42-8D1B91D193B3
Time Awake Since Boot: 12000000 seconds
Time Since Wake: 169354 seconds
System Integrity Protection: enabled
Crashed Thread: 0 Dispatch queue: com.apple.main-thread
Exception Type: EXC_BAD_ACCESS (SIGBUS)
Exception Codes: UNKNOWN_0x101 at 0x000000000bad4007
Exception Codes: 0x0000000000000101, 0x000000000bad4007
Termination Reason: Namespace SIGNAL, Code 10 Bus error: 10
Terminating Process: exc handler [88873]
VM Region Info: 0xbad4007 is not in any region. Bytes before following region: 4145676281
REGION TYPE START - END [ VSIZE] PRT/MAX SHRMOD REGION DETAIL
UNUSED SPACE AT START
--->
__TEXT 102c74000-102c78000 [ 16K] r-x/r-x SM=COW .../MacOS/Python
Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 ??? 0xbad4007 ???
1 ImageIO 0x1aa744d80 IIOReadPlugin::callInitialize() + 136
2 ImageIO 0x1aa744a94 IIO_Reader::initImageAtOffset(CGImagePlugin*, unsigned long, unsigned long, unsigned long) + 124
3 ImageIO 0x1aa742328 IIOImageSource::makeImagePlus(unsigned long, IIODictionary*) + 808
4 ImageIO 0x1aa74e618 IIOImageSource::createImageAtIndex(unsigned long, IIODictionary*) + 80
5 ImageIO 0x1aa74e4e8 CGImageSourceCreateImageAtIndex + 276
6 img_imageio.cpython-311-darwin.so 0x104a08434 __pyx_pw_4kivy_4core_5image_11img_imageio_1load_image_data + 868
7 img_imageio.cpython-311-darwin.so 0x104a0bc94 __pyx_pw_4kivy_4core_5image_11img_imageio_18ImageLoaderImageIO_3load + 976
8 Python 0x1032b3d5c _PyEval_EvalFrameDefault + 40380
9 Python 0x1032b84e0 _PyEval_Vector + 116
10 Python 0x1031dafec _PyObject_FastCallDictTstate + 208
11 Python 0x10324187c slot_tp_init + 180
12 Python 0x10323a388 type_call + 144
13 Python 0x1031dbaec _PyObject_Call + 124
14 Python 0x1032b5c58 _PyEval_EvalFrameDefault + 48312
15 Python 0x1032b84e0 _PyEval_Vector + 116
16 Python 0x1031e6e90 property_descr_set + 112
17 Python 0x103229198 _PyObject_GenericSetAttrWithDict + 288
18 Python 0x103228240 PyObject_SetAttr + 96
19 Python 0x1032adf64 _PyEval_EvalFrameDefault + 16324
20 Python 0x1032b84e0 _PyEval_Vector + 116
21 Python 0x1031daf7c _PyObject_FastCallDictTstate + 96
22 Python 0x10324187c slot_tp_init + 180
23 Python 0x10323a388 type_call + 144
24 instructions.cpython-311-darwin.so 0x1048aa870 __Pyx_PyObject_FastCallDict + 364
25 instructions.cpython-311-darwin.so 0x1048b5484 __pyx_pw_4kivy_8graphics_12instructions_13RenderContext_3__init__ + 1380
26 Python 0x10323a388 type_call + 144
27 Python 0x1031dacd0 _PyObject_MakeTpCall + 128
28 Python 0x1032b3e34 _PyEval_EvalFrameDefault + 40596
29 Python 0x1032b84e0 _PyEval_Vector + 116
30 Python 0x1031daf7c _PyObject_FastCallDictTstate + 96
31 Python 0x10324187c slot_tp_init + 180
32 Python 0x10323a388 type_call + 144
33 Python 0x1031dacd0 _PyObject_MakeTpCall + 128
34 Python 0x1032b3e34 _PyEval_EvalFrameDefault + 40596
35 Python 0x1032a9444 PyEval_EvalCode + 168
36 Python 0x1032a58a0 builtin_exec + 332
37 Python 0x1032239a0 cfunction_vectorcall_FASTCALL_KEYWORDS + 76
38 Python 0x1032b5c58 _PyEval_EvalFrameDefault + 48312
39 Python 0x1032b84e0 _PyEval_Vector + 116
40 Python 0x1031dcc94 object_vacall + 224
41 Python 0x1031dcb50 PyObject_CallMethodObjArgs + 92
42 Python 0x1032e00e0 PyImport_ImportModuleLevelObject + 1244
43 Python 0x1032b0ba8 _PyEval_EvalFrameDefault + 27656
44 Python 0x1032b84e0 _PyEval_Vector + 116
45 Python 0x1031de0e0 method_vectorcall + 304
46 Python 0x1031db7c0 _PyVectorcall_Call + 152
47 Python 0x1032b5c58 _PyEval_EvalFrameDefault + 48312
48 Python 0x1032b84e0 _PyEval_Vector + 116
49 Python 0x1031dafec _PyObject_FastCallDictTstate + 208
50 Python 0x10324187c slot_tp_init + 180
51 Python 0x10323a388 type_call + 144
52 Python 0x1031dacd0 _PyObject_MakeTpCall + 128
53 Python 0x1032b3e34 _PyEval_EvalFrameDefault + 40596
54 Python 0x1032a9444 PyEval_EvalCode + 168
55 Python 0x1032fea18 run_eval_code_obj + 84
56 Python 0x1032fe97c run_mod + 112
57 Python 0x1032fe7bc pyrun_file + 148
58 Python 0x1032fe20c _PyRun_SimpleFileObject + 268
59 Python 0x1032fdb9c _PyRun_AnyFileObject + 216
60 Python 0x103319f70 pymain_run_file_obj + 220
61 Python 0x1033198b0 pymain_run_file + 72
62 Python 0x103319190 Py_RunMain + 704
63 Python 0x10331a2c8 Py_BytesMain + 40
64 dyld 0x1a0753f28 start + 2236
Thread 1:
0 libsystem_pthread.dylib 0x1a0aa6d8c start_wqthread + 0
Thread 2:
0 libsystem_pthread.dylib 0x1a0aa6d8c start_wqthread + 0
Thread 3:
0 libsystem_pthread.dylib 0x1a0aa6d8c start_wqthread + 0
Thread 4:
0 libsystem_pthread.dylib 0x1a0aa6d8c start_wqthread + 0
Thread 5:: CVDisplayLink
0 libsystem_kernel.dylib 0x1a0a6f750 __psynch_cvwait + 8
1 libsystem_pthread.dylib 0x1a0aac5a0 _pthread_cond_wait + 1276
2 CoreVideo 0x1a883fc68 CVDisplayLink::waitUntil(unsigned long long) + 324
3 CoreVideo 0x1a883ed38 CVDisplayLink::runIOThread() + 504
4 libsystem_pthread.dylib 0x1a0aabfa8 _pthread_start + 148
5 libsystem_pthread.dylib 0x1a0aa6da0 thread_start + 8
Thread 0 crashed with ARM Thread State (64-bit):
x0: 0x00000001aa9f21bd x1: 0x0000000000000000 x2: 0x00000001aa7a9d40 x3: 0x00000001aa7a9d98
x4: 0x0000000121ef37d0 x5: 0x0000000121ef37e0 x6: 0x0000000121ef38d0 x7: 0x00006000038d9040
x8: 0x00006000036dd188 x9: 0x0000000000000003 x10: 0x000000000000001d x11: 0x0000000000000000
x12: 0x0000000000000005 x13: 0x000000014385bd00 x14: 0x00000001fbb485d8 x15: 0x00000001fbb485d8
x16: 0x000000000bad4007 x17: 0x0000000200668d08 x18: 0x0000000000000000 x19: 0x00000001fde56428
x20: 0x0000000121ef37e0 x21: 0x0000000121ef38d0 x22: 0x0000600002d967c0 x23: 0x00006000038d87c0
x24: 0x00006000038d83e0 x25: 0x00006000038d87c0 x26: 0x00000001f93d6048 x27: 0x0000000104beb1b0
x28: 0x00000001059fed40 fp: 0x000000016d188ac0 lr: 0x00000001aa74cfc4
sp: 0x000000016d188730 pc: 0x000000000bad4007 cpsr: 0x60001400
far: 0x000000000bad4007 esr: 0x8a000000 (PC alignment)
Binary Images:
0x102c74000 - 0x102c77fff org.python.python (3.11.6) <1f092c2c-a2d2-33f4-aca3-8217fbb18b5a> /opt/homebrew/*/Python.framework/Versions/3.11/Resources/Python.app/Contents/MacOS/Python
0x103178000 - 0x10341bfff org.python.python (3.11.6, (c) 2001-2023 Python Software Foundation.) <3008368f-402b-3060-8375-fdadc155a1ea> /opt/homebrew/*/Python.framework/Versions/3.11/Python
0x102cf8000 - 0x102d17fff liblzma.5.dylib (*) <2e83b079-8e98-36a1-97c9-70c41a116801> /opt/homebrew/*/liblzma.5.dylib
0x102f74000 - 0x102f7bfff zlib.cpython-311-darwin.so (*) <b0a5fab2-03c0-36d3-813f-e5e2ad4e028a> /opt/homebrew/*/Python.framework/Versions/3.11/lib/python3.11/lib-dynload/zlib.cpython-311-darwin.so
0x102f88000 - 0x102f8bfff _bz2.cpython-311-darwin.so (*) <a972cae5-ddce-3c55-b967-641c422e81d8> /opt/homebrew/*/Python.framework/Versions/3.11/lib/python3.11/lib-dynload/_bz2.cpython-311-darwin.so
0x102fb0000 - 0x102fb7fff _lzma.cpython-311-darwin.so (*) <acfad6cd-7d77-3d16-9671-137661fb202f> /opt/homebrew/*/Python.framework/Versions/3.11/lib/python3.11/lib-dynload/_lzma.cpython-311-darwin.so
0x102f98000 - 0x102f9bfff _typing.cpython-311-darwin.so (*) <0de32fb1-0c65-3673-a516-8e816433fe23> /opt/homebrew/*/Python.framework/Versions/3.11/lib/python3.11/lib-dynload/_typing.cpython-311-darwin.so
0x1030e0000 - 0x1030ebfff math.cpython-311-darwin.so (*) <a46ef3d4-ff65-3e6e-8a2f-9c8bac70c634> /opt/homebrew/*/Python.framework/Versions/3.11/lib/python3.11/lib-dynload/math.cpython-311-darwin.so
0x1030c8000 - 0x1030cbfff _heapq.cpython-311-darwin.so (*) <c2a2fce5-02e4-39b8-b32e-7e405790d604> /opt/homebrew/*/Python.framework/Versions/3.11/lib/python3.11/lib-dynload/_heapq.cpython-311-darwin.so
0x1030f8000 - 0x1030fbfff _queue.cpython-311-darwin.so (*) <469302ad-ecdb-3363-967d-001268106d15> /opt/homebrew/*/Python.framework/Versions/3.11/lib/python3.11/lib-dynload/_queue.cpython-311-darwin.so
0x103108000 - 0x10310bfff _opcode.cpython-311-darwin.so (*) <66d8c6b3-fb84-36b2-840b-a13797c6d05c> /opt/homebrew/*/Python.framework/Versions/3.11/lib/python3.11/lib-dynload/_opcode.cpython-311-darwin.so
0x103118000 - 0x103153fff _clock.cpython-311-darwin.so (*) <bd82f707-6213-3ec6-9016-9fab5ced2cf8> /Users/USER/*/_clock.cpython-311-darwin.so
0x103890000 - 0x1038a3fff _ctypes.cpython-311-darwin.so (*) <ec58e2d4-7708-31cd-a2d7-7c8bc9c08a6e> /opt/homebrew/*/Python.framework/Versions/3.11/lib/python3.11/lib-dynload/_ctypes.cpython-311-darwin.so
0x10386c000 - 0x103873fff _struct.cpython-311-darwin.so (*) <a4697202-b011-3951-9826-175042eb156a> /opt/homebrew/*/Python.framework/Versions/3.11/lib/python3.11/lib-dynload/_struct.cpython-311-darwin.so
0x1039d0000 - 0x1039dffff _socket.cpython-311-darwin.so (*) <0b75fcb1-9f10-322a-b9bb-d5b43a47af8c> /opt/homebrew/*/Python.framework/Versions/3.11/lib/python3.11/lib-dynload/_socket.cpython-311-darwin.so
0x1039b4000 - 0x1039bbfff select.cpython-311-darwin.so (*) <0da55647-da55-3a0f-81ae-27b480e6aa43> /opt/homebrew/*/Python.framework/Versions/3.11/lib/python3.11/lib-dynload/select.cpython-311-darwin.so
0x1039ec000 - 0x1039f3fff array.cpython-311-darwin.so (*) <b0929d60-6621-3bd2-ab28-11d131fcaf9a> /opt/homebrew/*/Python.framework/Versions/3.11/lib/python3.11/lib-dynload/array.cpython-311-darwin.so
0x103880000 - 0x103883fff fcntl.cpython-311-darwin.so (*) <4f178f64-3529-388d-ad93-248436f71f22> /opt/homebrew/*/Python.framework/Versions/3.11/lib/python3.11/lib-dynload/fcntl.cpython-311-darwin.so
0x103a00000 - 0x103a03fff _posixsubprocess.cpython-311-darwin.so (*) <ac517351-6084-3d4c-8fd9-af2a4d7549bc> /opt/homebrew/*/Python.framework/Versions/3.11/lib/python3.11/lib-dynload/_posixsubprocess.cpython-311-darwin.so
0x103a48000 - 0x103a63fff _ssl.cpython-311-darwin.so (*) <a69adcf0-7c00-3be3-88a7-7b548640c05d> /opt/homebrew/*/Python.framework/Versions/3.11/lib/python3.11/lib-dynload/_ssl.cpython-311-darwin.so
0x103b44000 - 0x103bc3fff libssl.3.dylib (*) <d2afa8c1-62c0-3128-bd8f-0f50a1fedd97> /opt/homebrew/*/libssl.3.dylib
0x104c04000 - 0x104ee7fff libcrypto.3.dylib (*) <f0efa159-d4b6-3c5d-bc6d-ac5a53b13b8f> /opt/homebrew/*/libcrypto.3.dylib
0x103a10000 - 0x103a17fff binascii.cpython-311-darwin.so (*) <72a70cad-76ca-37a9-9d53-82eb43b6a615> /opt/homebrew/*/Python.framework/Versions/3.11/lib/python3.11/lib-dynload/binascii.cpython-311-darwin.so
0x103a24000 - 0x103a27fff _contextvars.cpython-311-darwin.so (*) <3b534670-b594-390f-a57b-f605f1f98bd6> /opt/homebrew/*/Python.framework/Versions/3.11/lib/python3.11/lib-dynload/_contextvars.cpython-311-darwin.so
0x103a9c000 - 0x103aa7fff _asyncio.cpython-311-darwin.so (*) <b3056205-dd13-35ea-ab56-c27351d23cb8> /opt/homebrew/*/Python.framework/Versions/3.11/lib/python3.11/lib-dynload/_asyncio.cpython-311-darwin.so
0x103ab8000 - 0x103aebfff _event.cpython-311-darwin.so (*) <c0f8da3a-e6c1-34a9-a82a-a3f1337fca73> /Users/USER/*/_event.cpython-311-darwin.so
0x103e48000 - 0x103eb3fff properties.cpython-311-darwin.so (*) <785774e1-592a-3f24-b683-0f7c2a25851a> /Users/USER/*/properties.cpython-311-darwin.so
0x103a80000 - 0x103a8bfff _metrics.cpython-311-darwin.so (*) <dec2436e-e6b0-378b-9f5b-f8bbb879388b> /Users/USER/*/_metrics.cpython-311-darwin.so
0x103b04000 - 0x103b1ffff weakproxy.cpython-311-darwin.so (*) <45d8e4bd-1b9c-3d4d-bbba-9399398b8ea7> /Users/USER/*/weakproxy.cpython-311-darwin.so
0x104894000 - 0x1048bffff instructions.cpython-311-darwin.so (*) <63056586-0992-367c-b0b4-838f28cd5f18> /Users/USER/*/instructions.cpython-311-darwin.so
0x103fe0000 - 0x103fe7fff buffer.cpython-311-darwin.so (*) <be526768-40bf-3b99-97e0-be9149155cc8> /Users/USER/*/buffer.cpython-311-darwin.so
0x104800000 - 0x10480bfff vertex.cpython-311-darwin.so (*) <109f780b-5c3a-311d-8551-3074f0671e67> /Users/USER/*/vertex.cpython-311-darwin.so
0x103e08000 - 0x103e2bfff cgl.cpython-311-darwin.so (*) <a8326de0-1a8b-331d-a9f9-2432297b699d> /Users/USER/*/cgl.cpython-311-darwin.so
0x10486c000 - 0x10487ffff vbo.cpython-311-darwin.so (*) <988534cd-7f0a-34c6-90d6-e8c2a767e624> /Users/USER/*/vbo.cpython-311-darwin.so
0x1048dc000 - 0x1048e7fff compiler.cpython-311-darwin.so (*) <81ea19cf-013f-3632-9b12-55e1641b4489> /Users/USER/*/compiler.cpython-311-darwin.so
0x10481c000 - 0x104837fff transformation.cpython-311-darwin.so (*) <101fdb05-1c1c-33c3-9e72-069f0af420bf> /Users/USER/*/transformation.cpython-311-darwin.so
0x104970000 - 0x104993fff shader.cpython-311-darwin.so (*) <3358d01d-3e2b-3c77-88dd-a030f2c47803> /Users/USER/*/shader.cpython-311-darwin.so
0x1048f8000 - 0x104947fff texture.cpython-311-darwin.so (*) <038f3724-7083-30af-b2df-8f4b21d7e39b> /Users/USER/*/texture.cpython-311-darwin.so
0x104a8c000 - 0x104ad3fff context_instructions.cpython-311-darwin.so (*) <770618ab-ad5b-32ec-8fdf-7110f19d629a> /Users/USER/*/context_instructions.cpython-311-darwin.so
0x103a34000 - 0x103a37fff _bisect.cpython-311-darwin.so (*) <0485697b-5f35-363c-bf21-1ca99882739b> /opt/homebrew/*/Python.framework/Versions/3.11/lib/python3.11/lib-dynload/_bisect.cpython-311-darwin.so
0x103b34000 - 0x103b37fff _random.cpython-311-darwin.so (*) <9a40fb5d-035f-3596-bcc6-52ec5b4f06ef> /opt/homebrew/*/Python.framework/Versions/3.11/lib/python3.11/lib-dynload/_random.cpython-311-darwin.so
0x10484c000 - 0x10484ffff _sha512.cpython-311-darwin.so (*) <d5768942-bc77-3e29-817a-cb14ca2bed2c> /opt/homebrew/*/Python.framework/Versions/3.11/lib/python3.11/lib-dynload/_sha512.cpython-311-darwin.so
0x1049a8000 - 0x1049affff _json.cpython-311-darwin.so (*) <91b6b913-dc57-32b6-aef2-1ddd2909852f> /opt/homebrew/*/Python.framework/Versions/3.11/lib/python3.11/lib-dynload/_json.cpython-311-darwin.so
0x104a00000 - 0x104a0ffff img_imageio.cpython-311-darwin.so (*) <eb7517d0-b608-37ce-9018-b3cec22ef304> /Users/USER/*/img_imageio.cpython-311-darwin.so
0x104a20000 - 0x104a43fff libpng16.16.dylib (*) <f89db0fa-4538-3acf-999d-4caf324f412a> /opt/homebrew/*/libpng16.16.dylib
0x10508c000 - 0x1050effff libtiff.6.dylib (*) <f96096fe-e34a-333a-979b-8b71c1e3d073> /opt/homebrew/*/libtiff.6.dylib
0x1049bc000 - 0x1049c3fff libgif.7.2.0.dylib (*) <0a2223ea-ec78-300b-b120-2a4a3a0233b7> /opt/homebrew/*/libgif.7.2.0.dylib
0x105110000 - 0x10516bfff libjpeg.8.3.2.dylib (*) <80e1a952-f5b2-30b5-a0cf-7ae2d01dd88d> /opt/homebrew/*/libjpeg.8.3.2.dylib
0x105228000 - 0x1052b3fff libzstd.1.5.5.dylib (*) <37e0f519-759d-3074-bb1d-ef7ab2c7326e> /opt/homebrew/*/libzstd.1.5.5.dylib
0x1049d0000 - 0x1049dffff _img_sdl2.cpython-311-darwin.so (*) <7131e2e8-f9ab-3e63-8e3f-8a4440af6fd0> /Users/USER/*/_img_sdl2.cpython-311-darwin.so
0x1055f4000 - 0x105737fff SDL2 (*) <5303404d-30cd-3f70-96f3-67ae4fbb6fd2> /Users/USER/*/SDL2
0x105770000 - 0x10588ffff SDL2_ttf (*) <3f597cf3-7132-305e-b2b8-a3cea8123e85> /Users/USER/*/SDL2_ttf
0x104a54000 - 0x104a73fff SDL2_image (*) <1df202a6-eddd-3add-a4c7-2a62f167a68f> /Users/USER/*/SDL2_image
0x105008000 - 0x105037fff SDL2_mixer (*) <666579da-36dd-3c5b-adbf-96febf0a64e4> /Users/USER/*/SDL2_mixer
0x10504c000 - 0x10507bfff png (*) <ffda03b0-8220-3ef5-adc9-4a463ead37b7> /Users/USER/*/png
0x1052d0000 - 0x1052ebfff fbo.cpython-311-darwin.so (*) <bd905380-7196-349d-a940-9604f7f769fe> /Users/USER/*/fbo.cpython-311-darwin.so
0x1051c4000 - 0x1051e3fff context.cpython-311-darwin.so (*) <0827bbc1-c3d6-3131-bf71-76240fc901fc> /Users/USER/*/context.cpython-311-darwin.so
0x1051f8000 - 0x105213fff stencil_instructions.cpython-311-darwin.so (*) <3ec1e1f4-6d01-364a-835c-c9c172480e1d> /Users/USER/*/stencil_instructions.cpython-311-darwin.so
0x1053f4000 - 0x10543ffff opengl.cpython-311-darwin.so (*) <6d7ee693-354f-3ad7-96e6-18c98e75ddcb> /Users/USER/*/opengl.cpython-311-darwin.so
0x105344000 - 0x105353fff opengl_utils.cpython-311-darwin.so (*) <9b2442e9-7229-3e6e-9641-683449ef2e79> /Users/USER/*/opengl_utils.cpython-311-darwin.so
0x105464000 - 0x105503fff vertex_instructions.cpython-311-darwin.so (*) <58bd33f2-ca58-3d1f-9c83-11930f343335> /Users/USER/*/vertex_instructions.cpython-311-darwin.so
0x105300000 - 0x105313fff gl_instructions.cpython-311-darwin.so (*) <3c0eca5f-9a36-3939-9828-c7e5a526793d> /Users/USER/*/gl_instructions.cpython-311-darwin.so
0x1053c4000 - 0x1053dffff boxshadow.cpython-311-darwin.so (*) <ae17e5dc-d2fe-33ef-863c-7c70d82bfca9> /Users/USER/*/boxshadow.cpython-311-darwin.so
0x105364000 - 0x10537ffff scissor_instructions.cpython-311-darwin.so (*) <2cda1198-3484-35f2-bf46-b2e0208a99f8> /Users/USER/*/scissor_instructions.cpython-311-darwin.so
0x1055a0000 - 0x1055bffff text_layout.cpython-311-darwin.so (*) <6b241a9e-85b6-39e8-8ebc-2337dee97f39> /Users/USER/*/text_layout.cpython-311-darwin.so
0x105394000 - 0x1053a3fff _text_sdl2.cpython-311-darwin.so (*) <d8d06bbd-6691-331b-a194-47c8c4d57d8a> /Users/USER/*/_text_sdl2.cpython-311-darwin.so
0x105538000 - 0x10555bfff _window_sdl2.cpython-311-darwin.so (*) <3bfe6abd-e17e-31b7-a6a3-5e58491c77bf> /Users/USER/*/_window_sdl2.cpython-311-darwin.so
0x10557c000 - 0x105583fff libffi-trampolines.dylib (*) <6ff88f39-a3dc-344a-b081-cb8ade4a84c9> /usr/lib/libffi-trampolines.dylib
0x105324000 - 0x10532bfff cgl_glew.cpython-311-darwin.so (*) <41474c43-3c49-3d77-97f5-59ebfc92a63b> /Users/USER/*/cgl_glew.cpython-311-darwin.so
0x1055d4000 - 0x1055dbfff cgl_gl.cpython-311-darwin.so (*) <b71fb603-0971-3ef9-8118-a9531cfcf1a2> /Users/USER/*/cgl_gl.cpython-311-darwin.so
0x105b30000 - 0x105b37fff cgl_sdl2.cpython-311-darwin.so (*) <482f292f-2655-3605-9612-38288726d1a9> /Users/USER/*/cgl_sdl2.cpython-311-darwin.so
0x107be4000 - 0x107beffff libobjc-trampolines.dylib (*) <8e928412-9e96-32d4-b173-d99beb9fed0b> /usr/lib/libobjc-trampolines.dylib
0x111c3c000 - 0x111ca7fff com.apple.AppleMetalOpenGLRenderer (1.0) <76243a19-d6d2-32ee-84d3-7bcfce93d66e> /System/Library/Extensions/AppleMetalOpenGLRenderer.bundle/Contents/MacOS/AppleMetalOpenGLRenderer
0x0 - 0xffffffffffffffff ??? (*) <00000000-0000-0000-0000-000000000000> ???
0x1aa734000 - 0x1aaa37fff com.apple.ImageIO (3.3.0) <b68622e8-9ca6-3705-ae8e-4a22c46b7aa1> /System/Library/Frameworks/ImageIO.framework/Versions/A/ImageIO
0x1a074e000 - 0x1a07dc587 dyld (*) <e7a99595-e0f8-34af-be8b-9347d0d658a4> /usr/lib/dyld
0x1a0aa5000 - 0x1a0ab1fff libsystem_pthread.dylib (*) <1f30fb9a-bdf9-32db-a709-8417666a7e45> /usr/lib/system/libsystem_pthread.dylib
0x1a0a6b000 - 0x1a0aa4ff7 libsystem_kernel.dylib (*) <08c5fe2a-b0bf-3ab6-bb42-460c18917d33> /usr/lib/system/libsystem_kernel.dylib
0x1a883c000 - 0x1a889dfff com.apple.CoreVideo (1.8) <a99dd321-e9f2-3195-a72d-d83acacb3f43> /System/Library/Frameworks/CoreVideo.framework/Versions/A/CoreVideo
External Modification Summary:
Calls made by other processes targeting this process:
task_for_pid: 0
thread_create: 0
thread_set_state: 0
Calls made by this process:
task_for_pid: 0
thread_create: 0
thread_set_state: 0
Calls made by all processes on this machine:
task_for_pid: 0
thread_create: 0
thread_set_state: 0
VM Region Summary:
ReadOnly portion of Libraries: Total=1.1G resident=0K(0%) swapped_out_or_unallocated=1.1G(100%)
Writable regions: Total=1.4G written=0K(0%) resident=0K(0%) swapped_out=0K(0%) unallocated=1.4G(100%)
VIRTUAL REGION
REGION TYPE SIZE COUNT (non-coalesced)
=========== ======= =======
Activity Tracing 256K 1
ColorSync 496K 24
CoreAnimation 16K 1
CoreGraphics 32K 2
Foundation 16K 1
Kernel Alloc Once 32K 1
MALLOC 269.4M 43
MALLOC guard page 192K 10
MALLOC_MEDIUM (reserved) 720.0M 6 reserved VM address space (unallocated)
MALLOC_NANO (reserved) 384.0M 1 reserved VM address space (unallocated)
OpenGL GLSL 256K 3
STACK GUARD 96K 6
Stack 18.7M 6
VM_ALLOCATE 12.1M 19
__AUTH 708K 181
__AUTH_CONST 13.4M 346
__CTF 824 1
__DATA 5687K 403
__DATA_CONST 17.3M 419
__DATA_DIRTY 721K 118
__FONT_DATA 2352 1
__GLSLBUILTINS 5174K 1
__LINKEDIT 807.4M 74
__OBJC_RO 66.4M 1
__OBJC_RW 2012K 1
__TEXT 271.6M 436
dyld private memory 272K 2
mapped file 64.2M 20
shared memory 848K 15
=========== ======= =======
TOTAL 2.6G 2143
TOTAL, minus reserved VM space 1.5G 2143
Full report attached: errorlog.txt
Looking at this...
[INFO ] Image: Providers: img_tex, img_imageio, img_dds, img_sdl2 (img_pil, img_ffpyplayer ignored)
And this...
1 ImageIO 0x1aa744d80 IIOReadPlugin::callInitialize() + 136
I don't entirely know what I'm talking about so I'm not sure if this is a valid question, but is there a way to remove the img_imageio image provider from consideration when running an application (perhaps also enabling img_pil)?
Also, I get the same bus error with kivy 2.1.0 and Python 3.10.14.
Looking at this...
[INFO ] Image: Providers: img_tex, img_imageio, img_dds, img_sdl2 (img_pil, img_ffpyplayer ignored)And this...
1 ImageIO 0x1aa744d80 IIOReadPlugin::callInitialize() + 136I don't entirely know what I'm talking about so I'm not sure if this is a valid question, but is there a way to remove the
img_imageioimage provider from consideration when running an application (perhaps also enablingimg_pil)?
os.environ["KIVY_IMAGE"] = "sdl2" will use sdl2 image provider only. (you need to set it before any kivy import)
Please keep us posted! (I'm on an Apple Silicon M1 Pro with macOS Sonoma and can't reproduce the same issue).
Additional test:
What happens if you use https://www.python.org/downloads/ installers, instead of using the homebrew provided Python?
Testing with different image providers yielded some new information; see below.
What happens if you use https://www.python.org/downloads/ installers, instead of using the
homebrewprovided Python?
Same issue with all of the ones I tried, with Kivy 2.1.0 and 2.3.0:
- 3.10.14 -- built from source
- 3.12.2 -- built from source
- 3.12.2 -- universal installer
os.environ["KIVY_IMAGE"] = "sdl2"will usesdl2image provider only. (you need to set it before anykivyimport)
Thanks. I tried with img_sdl2 and also img_pil. No success, but slightly different results with each. TLDR is that img_pil let the application make it slightly farther into the startup process before crashing.
With the default img_imageio etc. (original crash), for reference, the Kivy log was:
[INFO ] [Logger ] Record log in /Users/cipriani_pro2023/.kivy/logs/kivy_24-03-29_14.txt
[INFO ] [Kivy ] v2.1.0
[INFO ] [Kivy ] Installed at "/Users/cipriani_pro2023/pyenv-factoryflash/lib/python3.10/site-packages/kivy/__init__.py"
[INFO ] [Python ] v3.10.14 (main, Mar 19 2024, 21:46:16) [Clang 15.0.0 (clang-1500.1.0.2.5)]
[INFO ] [Python ] Interpreter at "/Users/cipriani_pro2023/pyenv-factoryflash/bin/python3.10"
[INFO ] [Logger ] Purge log fired. Processing...
[INFO ] [Logger ] Purge finished!
[INFO ] [Factory ] 189 symbols loaded
[INFO ] [Image ] Providers: img_tex, img_imageio, img_dds, img_sdl2, img_pil (img_ffpyplayer ignored)
[INFO ] [Window ] Provider: sdl2
[INFO ] [GL ] Using the "OpenGL ES 2" graphics system
[INFO ] [GL ] Backend used <sdl2>
[INFO ] [GL ] OpenGL version <b'2.1 Metal - 83.1'>
[INFO ] [GL ] OpenGL vendor <b'Apple'>
[INFO ] [GL ] OpenGL renderer <b'Apple M2 Pro'>
[INFO ] [GL ] OpenGL parsed version: 2, 1
[INFO ] [GL ] Shading version <b'1.20'>
[INFO ] [GL ] Texture max size <16384>
[INFO ] [GL ] Texture max units <16>
And the top of the crash log was:
0 ??? 0xbad4007 ???
1 ImageIO 0x190d0cd80 IIOReadPlugin::callInitialize() + 136
2 ImageIO 0x190d0ca94 IIO_Reader::initImageAtOffset(CGImagePlugin*, unsigned long, unsigned long, unsigned long) + 124
3 ImageIO 0x190d0a328 IIOImageSource::makeImagePlus(unsigned long, IIODictionary*) + 808
4 ImageIO 0x190d16618 IIOImageSource::createImageAtIndex(unsigned long, IIODictionary*) + 80
5 ImageIO 0x190d164e8 CGImageSourceCreateImageAtIndex + 276
6 img_imageio.cpython-310-darwin.so 0x103cf0f1c __pyx_pw_4kivy_4core_5image_11img_imageio_1load_image_data + 660
With img_sdl2, looks like it ultimately uses ImageIO, so same Kivy log as above, and the top of the crash log has a different trace but is basically the same:
0 ??? 0xbad4007 ???
1 ImageIO 0x190d0cd80 IIOReadPlugin::callInitialize() + 136
2 ImageIO 0x190d0ca94 IIO_Reader::initImageAtOffset(CGImagePlugin*, unsigned long, unsigned long, unsigned long) + 124
3 ImageIO 0x190d0a328 IIOImageSource::makeImagePlus(unsigned long, IIODictionary*) + 808
4 ImageIO 0x190d16618 IIOImageSource::createImageAtIndex(unsigned long, IIODictionary*) + 80
5 ImageIO 0x190d164e8 CGImageSourceCreateImageAtIndex + 276
6 SDL2_image 0x105960830 0x10595c000 + 18480
7 SDL2_image 0x10596069c IMG_Load + 120
8 _img_sdl2.cpython-310-darwin.so 0x1056416c4 __pyx_pw_4kivy_4core_5image_9_img_sdl2_5load_from_filename + 288
However, with img_pil, the application made it slightly farther into the initialization process, and the Kivy log was:
[INFO ] [Logger ] Record log in /Users/cipriani_pro2023/.kivy/logs/kivy_24-03-29_16.txt
[INFO ] [Kivy ] v2.1.0
[INFO ] [Kivy ] Installed at "/Users/cipriani_pro2023/pyenv-factoryflash/lib/python3.10/site-packages/kivy/__init__.py"
[INFO ] [Python ] v3.10.14 (main, Mar 19 2024, 21:46:16) [Clang 15.0.0 (clang-1500.1.0.2.5)]
[INFO ] [Python ] Interpreter at "/Users/cipriani_pro2023/pyenv-factoryflash/bin/python3.10"
[INFO ] [Logger ] Purge log fired. Processing...
[INFO ] [Logger ] Purge finished!
[INFO ] [Factory ] 189 symbols loaded
[INFO ] [Image ] Providers: img_pil (img_imageio, img_tex, img_dds, img_sdl2, img_ffpyplayer ignored)
[INFO ] [Window ] Provider: sdl2
[INFO ] [GL ] Using the "OpenGL ES 2" graphics system
[INFO ] [GL ] Backend used <sdl2>
[INFO ] [GL ] OpenGL version <b'2.1 Metal - 83.1'>
[INFO ] [GL ] OpenGL vendor <b'Apple'>
[INFO ] [GL ] OpenGL renderer <b'Apple M2 Pro'>
[INFO ] [GL ] OpenGL parsed version: 2, 1
[INFO ] [GL ] Shading version <b'1.20'>
[INFO ] [GL ] Texture max size <16384>
[INFO ] [GL ] Texture max units <16>
[INFO ] [Window ] auto add sdl2 input provider
Note that "auto add sdl2 input provider" is now displayed. The crash log for this one, though, was still at the same point in ImageIO:
0 ??? 0xbad4007 ???
1 ImageIO 0x190d0cd80 IIOReadPlugin::callInitialize() + 136
2 ImageIO 0x190d0ca94 IIO_Reader::initImageAtOffset(CGImagePlugin*, unsigned long, unsigned long, unsigned long) + 124
3 ImageIO 0x190d0a328 IIOImageSource::makeImagePlus(unsigned long, IIODictionary*) + 808
4 ImageIO 0x190d16618 IIOImageSource::createImageAtIndex(unsigned long, IIODictionary*) + 80
5 ImageIO 0x190d164e8 CGImageSourceCreateImageAtIndex + 276
6 SDL2_image 0x104d18830 0x104d14000 + 18480
7 SDL2_image 0x104d1869c IMG_Load + 120
8 _window_sdl2.cpython-310-darwin.so 0x1048d9bb8 __pyx_pw_4kivy_4core_6window_12_window_sdl2_18_WindowSDL2Storage_53set_window_icon + 240
It looks like now I'm stuck on the "sdl2" window provider (which still uses SDL2 internally, of course, for its image operations regardless of Kivy's image provider).
Is there perhaps an alternate window provider besides sdl2 that doesn't ultimately rely on something that relies on ImageIO?
The root of this issue seems to be pointing to some ImageIO incompatibility, I think. But I'm not sure why.
Does giving the terminal All File Access in Security change anything?
Does giving the terminal All File Access in Security change anything?
No, no change.
I don't know if this is interesting but I tried forcing Kivy (2.1.0, I'm having some build errors with 2.3.0 that are probably the topic of a new issue) to recompile on install with:
pip install --no-cache-dir --no-binary :all: kivy==2.1.0
But there was also no change in behavior.
I got it working!
/opt/homebrew/lib was in my DYLD_LIBRARY_PATH environment variable. Removing it solved the problem. So some other version of some library must have been getting loaded. I'm not sure which. Will investigate further on Monday.
I got it working!
/opt/homebrew/libwas in myDYLD_LIBRARY_PATHenvironment variable. Removing it solved the problem. So some other version of some library must have been getting loaded. I'm not sure which. Will investigate further on Monday.
Glad that worked! Over the years I've learned that brew-installing things and playing with DYLD_LIBRARY_PATH (and similar) can lead to build errors and failures, so I try to keep my brew installations as minimal as I can.
Let us know if you find out which is the offending library, and if we can do something on our side (via code or docs)!
This issue has been automatically closed because there has been no response to our request for more information from the original author. With only the information that is currently in the issue, we don't have the means to take action. Please reach out if you have or find the answers we need so that we can investigate further.