Skip to content

import numpy asynchronously causes EXC_BAD_ACCESS  #85

Description

@LeoneBacciu

Hello,
the package is amazing, but I encountered an error that makes it impossible to continue developing.
I am working on macOS with an Apple Silicon processor (M2).
The line import numpy as np always makes the code (and the whole flutter app) crashes with EXC_BAD_ACCESS, specifically, I tracked down the error to the line let result = PyRun_SimpleFileEx(file, appPath, 1) in SeriousPythonPlugin.swift.
The interesting thing is that if I use sync: true, the python code gets executed correctly without issues, but the flutter app hangs, so it's not a viable solution.
I've tried using Isolates, but either the method channel cannot be invoked, or the flutter UI hangs (if I use BackgroundIsolateBinaryMessenger.ensureInitialized).
Let me know if I can provide more info.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions