Skip to content

AddOn Manager quit working after trying to run older macro #382

@wyzarddoc72

Description

@wyzarddoc72

Problem description

After copying a old macro to the .local/FreeCad/1.1/macro folder everytime I start FreeCad 1.10 rc3 Addon Manager opens window but freezes. See below for macro

from PySide2 import QtWidgets, QtCore
import FreeCADGui as Gui

class WinSplitter(QtCore.QObject):

    class SplitWindow(QtWidgets.QMainWindow):
    
        def __init__(self, wid, res, title):
            super(WinSplitter.SplitWindow, self).__init__()
            self.wid = wid
            self.res = res
            self.setCentralWidget(self.wid)
            self.setWindowTitle(title)
            self.show()
    
        def closeEvent(self, ev):
            self.res.layout().addWidget(self.wid)
            return super(WinSplitter.SplitWindow, self).closeEvent(ev)

    def __new__(cls):
        if not hasattr(Gui.getMainWindow(), 'winsplitter'):
            return super().__new__(cls)
        else:
            return None

    def __init__(self):
        super(WinSplitter, self).__init__()
        Gui.getMainWindow().centralWidget().findChild(QtWidgets.QTabBar).tabBarDoubleClicked.connect(self.onTBDC)
        setattr(Gui.getMainWindow(), 'winsplitter', self)
        self.splitwin = []

    def onTBDC(self, idx):
        if idx >= 0:
            sw = Gui.getMainWindow().centralWidget().subWindowList()[idx]
            self.splitwin.append(WinSplitter.SplitWindow(sw.widget(), sw, sw.windowTitle()))

WinSplitter()

Workbench affected?

Other (specify in description)

Steps to reproduce

Add above old "macro" to Linux .local/FreeCad/1.1/macro folder then Start FreeCad run from the macro tab the above macro in Freecad then open the Addon Manager the manager window opens but freezes. In addition once this freeze takes place every time I open FreeCad the frozen Addon Manager doesn't work. This macro came from an old YouTube video 7 years old.

Expected behavior

Expected behavior is to create a split window For FreeCad one window for drawing the other for updating spreadsheet.

Actual behavior

When I click on tool tab Addon Manager and Measure are both greyed out. Tried screen Shot but doesn't show dropdown on tools

Development version About Info (in Safe Mode)

In Safe mode problem still exists 
OS: Ubuntu 24.04.4 LTS (X-Cinnamon/cinnamon/xcb)
Architecture: x86_64
Version: 1.1.0rc3.20260223 (Git shallow) AppImage
Build date: 2026/02/23 23:43:19
Build type: Release
Branch: (HEAD detached at adf7760)
Hash: adf77600e2526bf02804524f0d1991ab1c534abe
Python 3.11.14, Qt 6.8.3, Coin 4.0.3, Vtk 9.3.1, boost 1_86, Eigen3 3.4.0, PySide 6.8.3
shiboken 6.8.3, xerces-c 3.3.0, IfcOpenShell 0.8.4, OCC 7.8.1
Locale: English/United States (en_US)
Navigation Style/Orbit Style/Rotation Mode: Blender/Rounded Arcball/Window center
Stylesheet/Theme/QtStyle: FreeCAD.qss/FreeCAD Light/
Logical DPI/Physical DPI/Pixel Ratio: 96/96.0757/1

Last known good version (optional)

FreeCad 1.1rc3 before running above macro. I think I need to completely clear the saved parameters that FreeCad uses to start up How do I do that on LinuxMint?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions