Skip to content

Bug Report: QGIS crashes/relaunches repeatedly when enabling SCP on Apple Silicon Mac #449

Open

Description

@namratapatil9813

Summary
QGIS crashes with EXC_BAD_ACCESS (SIGSEGV) immediately when the Semi-Automatic Classification Plugin is enabled/ticked in the Plugin Manager, causing QGIS to enter a repeated crash-and-relaunch loop (multiple QGIS windows opening in succession). This is fully reproducible across multiple clean installs.

Environment

  • macOS version: 26.5.2 (build 25F84)
  • Hardware: Mac14,2 (Apple Silicon / ARM64)
  • QGIS version: 3.44.12-Solothurn (code revision 32c5dba7)
  • Qt version: 5.15.18
  • Python version: 3.12.11
  • SCP version tried: both the current "master" release (8.0) and an earlier 7.x release — same crash on both

Steps to Reproduce

  1. Fresh install of QGIS 3.44.12 on Apple Silicon Mac (also reproduced after a full reinstall with a fresh profile)
  2. Install Semi-Automatic Classification Plugin via Plugin Manager (also reproduced via "Install from ZIP" with an older release)
  3. Correctly install all required Python dependencies (numpy 1.26.4, scipy 1.13.1, matplotlib 3.9.2, Pillow, pyparsing, cycler, kiwisolver, contourpy, fonttools, packaging, remotior_sensus) matched to QGIS's bundled Python 3.12 environment — confirmed all import successfully standalone
  4. Tick the checkbox to enable Semi-Automatic Classification Plugin in Plugins → Manage and Install Plugins → Installed
  5. QGIS immediately crashes and begins repeatedly relaunching itself (multiple windows open in succession)

Expected Behavior
Plugin should load and its dock/toolbar should appear without crashing QGIS.

Actual Behavior

Immediate segmentation fault, followed by a crash-relaunch loop requiring force-quitting QGIS via Activity Monitor / Force Quit multiple times to stop.

Crash Report Details (from macOS Console → Crash Reports)

Exception Type:        EXC_BAD_ACCESS (SIGSEGV)
Exception Subtype:     KERN_INVALID_ADDRESS at 0x0000000000000008
Termination Reason:    Namespace SIGNAL, Code 11, Segmentation fault: 11
Triggered by Thread:   0, Dispatch Queue: com.apple.main-thread

Relevant frames from the crashed thread (Thread 0), from most recent call:

PyDict_GetItemWithError
_PyEval_BuiltinsFromGlobals
PyEval_EvalCode
QgsPythonUtilsImpl::runStringUnsafe(QString const&, bool)
QgsPythonUtilsImpl::runString(QString const&, QString, bool)
QgisApp::loadPythonSupport()
QgisApp::QgisApp(QSplashScreen*, QFlags<QgisApp::AppOption>, QString const&, QString const&, QWidget*, QFlags<Qt::WindowType>)
main

Binary images loaded at crash time include:

libqgis_app.3.44.6.dylib
libqgis_gui.3.44.6.dylib
libqgis_native.3.44.6.dylib
libQt5Widgets.5.15.dylib / libQt5Gui.5.15.dylib / libQt5Core.5.15.dylib

Troubleshooting Already Attempted (all unsuccessful, same crash persists)

  • Full reinstall of QGIS (fresh app + fresh profile, deleted ~/Library/Preferences/org.qgis.qgis3.plist)
  • Cleared all __pycache__ folders in the profile's python directory
  • Manually installed matching dependency versions via pip._internal targeting QGIS's bundled Python, using --no-deps, then --upgrade --force-reinstall to ensure a fully consistent dependency set (no version conflicts reported)
  • Verified numpy, scipy, matplotlib, PIL, remotior_sensus all import successfully when run manually in the QGIS Python Console
  • Tried an older SCP release (~1-2 years old) via "Install from ZIP" — identical crash
  • Installed QPIP (Python dependency manager plugin) and used it to install the missing remotior-sensus dependency it flagged — identical crash persists even with QPIP-managed dependencies

Additional Notes

  • The crash occurs specifically inside QgsPythonUtilsImpl::runStringUnsafe, suggesting the fault is in how a Python string is being evaluated during plugin startup, rather than a missing/mismatched compiled library (since dependency versions have been verified independently working).
  • Happy to provide the full crash report (.ips file) or test further build/config combinations if that would help debug this.

Attachments

  • Full crash report (.ips) — available on request
  • Screenshot of red error dialogs seen prior to the crash-loop starting (module errors for scipy/matplotlib/PIL/pyparsing/cycler/remotior_sensus, all resolved before this crash occurred)

Activity

  1. semiautomaticgit commented on Aug 2, 2026

    @semiautomaticgit
    Owner

    Hello @namratapatil9813 ,

    thank you for reporting this, however please note that the only mantained version of SCP is version 9 for QGIS 4.

    SCP version tried: both the current "master" release (8.0) and an earlier 7.x release — same crash on both
    The fact that both version 7 and 8 crashed, and this kind of issue was never reported before, could suggest that this issue is specific of your configuration (maybe a combination of macOS version , QGIS, Python, or Qt versions).

    I can suggest to install QGIS 4 and try the new version 9 of SCP following this guide https://semiautomaticclassificationmanual.readthedocs.io/en/latest/installation_mac.html

  2. lpmol commented on Aug 26, 2026

    @lpmol

    Description

    I am experiencing an issue with the Semi-Automatic Classification Plugin (SCP) on an Apple Silicon Mac (M1), which seems similar to the behavior reported in issue #449.

    Initially, I was using QGIS 3.44.13 LTR. After installing SCP, the plugin could not load because the remotior_sensus Python module was missing.

    I installed the required dependency using QPIP, which detected the requirement remotior-sensus >= 0.4.4. After installing it and restarting QGIS, activating SCP caused QGIS to repeatedly launch multiple QGIS windows/processes.

    During this behavior, QGIS also displayed an error similar to:

    /--multiprocessing-fork is not a valid or recognized data source

    After closing all the additional QGIS windows, QGIS could be opened normally again, but SCP was automatically disabled because it had previously crashed QGIS.

    Testing with QGIS 4.2.1

    Since SCP 9 is intended for QGIS 4, I installed QGIS 4.2.1 alongside my existing QGIS 3.44.13 installation.

    To avoid conflicts with the previous installation, I created a completely new QGIS user profile (QGIS4_Diplomado). In this profile, neither SCP nor QPIP was initially installed.

    I then installed:

    • QGIS 4.2.1
    • SCP 9.0.4
    • Remotior Sensus 0.7.6
    • macOS Tahoe 26.6.2
    • Apple MacBook Air M1

    SCP 9.0.4 installed successfully. However, its panel/menu did not appear correctly and QGIS displayed:

    Semi-Automatic Classification Plugin: Error. Python library not found

    It also displayed:

    Semi-Automatic Classification Plugin: You are using the simplified interface. To change the interface go to SCP > Settings and uncheck Simplified interface

    However, no SCP menu or SCP panel was available in the QGIS interface.

    When SCP was disabled/enabled, QGIS again started launching multiple QGIS windows. Interestingly, the additional QGIS instances appeared using my older QGIS profile rather than the new QGIS4_Diplomado profile.

    Python / Remotior Sensus checks

    From the QGIS 4.2.1 Python console:

    import sys
    print(sys.executable)

    Output:

    /Applications/QGIS-final-4_2_1.app/Contents/MacOS/QGIS-final-4_2_1
    

    And:

    print(sys.exec_prefix)

    Output:

    /Applications/QGIS-final-4_2_1.app/Contents/Frameworks/
    

    Remotior Sensus is installed and can be imported successfully:

    import remotior_sensus
    print(remotior_sensus.__version__)

    Output:

    0.7.6
    

    I also checked whether the Python executable paths apparently expected by SCP exist:

    import os
    
    print(os.path.exists(
        "/Applications/QGIS-final-4_2_1.app/Contents/Frameworks/bin/python3"
    ))
    print(os.path.exists(
        "/Applications/QGIS-final-4_2_1.app/Contents/Resources/bin/python3"
    ))

    Output:

    False
    False
    

    QGIS log

    The QGIS Python warning log includes:

    ResourceWarning: unclosed running multiprocessing pool
    <multiprocessing.pool.Pool state=RUN pool_size=2>
    

    and:

    UserWarning: resource_tracker: process died unexpectedly, relaunching.
    Some resources might leak.
    

    The traceback points to the initialization of SemiAutomaticClassificationPlugin and Python's multiprocessing module.

    Current behavior

    At this point:

    • remotior_sensus 0.7.6 is installed and imports successfully.
    • SCP 9.0.4 installs successfully in QGIS 4.2.1.
    • SCP reports Python library not found.
    • The SCP menu/panel does not become available.
    • Activating/deactivating SCP can trigger multiple QGIS instances/windows.
    • The spawned QGIS instances may open using a different/older QGIS profile.
    • The QGIS log reports problems involving multiprocessing.pool and resource_tracker.

    This seems related to #449, but I wanted to report that the issue also occurs with QGIS 4.2.1 + SCP 9.0.4 + Remotior Sensus 0.7.6 on an Apple M1 Mac.

    Is there currently a recommended workaround for SCP 9.0.4 on Apple Silicon/macOS, particularly regarding the Python executable path and multiprocessing behavior?

    Thank you.

  3. semiautomaticgit commented on Aug 27, 2026

    @semiautomaticgit
    Owner

    Hello @lpmol , thank you for reporting the issue.
    Considering that you have issues with both version 8 and 9 of the SCP, I suspect it is something related to the installation of QGIS or plugin installation. Unfortunately, I don't have experience in solving installation issues on macOS.

    I suggest to uninstall every QGIS and Python version on the system, then install QGIS 4 (without Remotior Sensus library), then install the SCP which should automatically download and install Remotior Sensus in the plugin directory.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions