dagoma3d / CuraByDagoma

Cura by Dagoma was originally forked from Legacy Cura. It is a UI to generate gcodes from 3d objects.
14 stars 8 forks source link

run cura.py error on MacOS 13.4, Terminating app due to uncaught exception 'NSInvalidArgumentException', #135

Open LowPower-Center opened 11 months ago

LowPower-Center commented 11 months ago

[env] intel chips MacOS 13.4 Python3.9 + Pycharm

[problems]

after install all python packages, I run cura.py, and got this error as following:

13:57:31: Debug: Adding duplicate image handler for 'Windows bitmap file'
13:57:31: Debug: Adding duplicate animation handler for '1' type
13:57:31: Debug: Adding duplicate animation handler for '2' type
2023-07-17 13:57:51.502 python[36055:2087907] -[NSTextLayer NS_setView:]: unrecognized selector sent to instance 0x6000000d8030
2023-07-17 13:57:51.504 python[36055:2087907] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[NSTextLayer NS_setView:]: unrecognized selector sent to instance 0x6000000d8030'
*** First throw call stack:
(
    0   CoreFoundation                      0x00007ff8089c418a __exceptionPreprocess + 242
    1   libobjc.A.dylib                     0x00007ff8084ea42b objc_exception_throw + 48
    2   CoreFoundation                      0x00007ff808a5ffef -[NSObject(NSObject) __retain_OA] + 0
    3   CoreFoundation                      0x00007ff80892f797 ___forwarding___ + 1392
    4   CoreFoundation                      0x00007ff80892f198 _CF_forwarding_prep_0 + 120
    5   AppKit                              0x00007ff80b9fbf0f -[NSView setLayer:] + 391
    6   AppKit                              0x00007ff80c30b7c9 -[NSView _createLayerAndInitialize] + 203
        ...
        ...
        ...
    91  Python3                             0x00000001031e175a Py_RunMain + 1866
    92  Python3                             0x00000001031e1c0a Py_Main + 378
    93  Python3                             0x00000001031e1c5b Py_BytesMain + 43
    94  dyld                                0x00007ff80851741f start + 1903
)
libc++abi: terminating due to uncaught exception of type NSException

I tried to check what caused this problem, and I found this may caused by this function, line "super(ConfigWizard, self).init(parent, -1, _("Configuration wizard"))".

class ConfigWizard(Wizard):
    def __init__(self, parent = None, firstTime = True):

        super(ConfigWizard, self).__init__(parent, -1, _("Configuration wizard"))
        self.parent = parent
        if firstTime:
            profile.putPreference('xml_file', 'tongyi.xml')
        frameicon = wx.Icon(resources.getPathForImage('cura.ico'), wx.BITMAP_TYPE_ICO)
        self.SetIcon(frameicon)
        self.Bind(wx.adv.EVT_WIZARD_PAGE_CHANGED, self.OnPageChanged)
        self.Bind(wx.adv.EVT_WIZARD_FINISHED, self.OnPageFinished)
        self.configurationPage = ConfigurationPage(self, firstTime)
        #self.FitToPage(self.configurationPage)
        self.GetPageAreaSizer().Add(self.configurationPage)
        self.RunWizard(self.configurationPage)
        self.Destroy()

But I have no ideas about how to fix this problem

0r31 commented 7 months ago

I don't understand what you wnat to achieve. No details enough. Lack of many information about system, python install,...