Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork320
Open
Description
Hello.
There is a big problem with macOS Ventura 13.1.
I've made the simplest app for macOS 64-bit - one Form, one Button. It executes a very simple python script.
Everything works fine, but after closing the chart window, the application crashes with a message in a PAServer:objc_disposeClassPair: class 'FMXWindow' still has subclasses, including 'NSKVONotifying_FMXWindow’!
In larger projects, the effect is stranger. What can be done to solve this problem?
P.S. It is also interesting that after running the script, the application icon changes to the Matplotlib icon.
unit MainUnit;interfaceuses PythonEngine, System.Classes, FMX.Forms, FMX.Controls, FMX.Controls.Presentation, FMX.StdCtrls, FMX.Types;type TFormMain = class(TForm) ButtonRun: TButton; procedure FormCreate(Sender: TObject); procedure ButtonRunClick(Sender: TObject); private py: TPythonEngine; end;var FormMain: TFormMain;implementation{$R *.fmx}procedure TFormMain.FormCreate(Sender: TObject);begin // Create python engine py := TPythonEngine.Create(Self); py.UseLastKnownVersion := True; py.FatalAbort := False; py.FatalMsgDlg := False; // Load DLL py.LoadDll;end;procedure TFormMain.ButtonRunClick(Sender: TObject);begin // Simple script, that uses matplotlib and Py-QT5 var s: ANSIString := 'import matplotlib.pyplot as plt'#10 + 'plt.plot([1.6, 2.7])'#10 + 'plt.show()'; py.ExecString(s);end;end.
Metadata
Metadata
Assignees
Labels
No labels