Skip to content

DataLab crashes (access violation) when a computation requested remotely fails #404

Open

Description

@PierreRaybaut

Describe the bug

When a computation requested through remote control fails, DataLab crashes with a native access violation (0xC0000005) instead of reporting the error. This happens with XML-RPC (calc) and with the Web API (POST /api/v1/calc). The client gets ConnectionRefusedError (XML-RPC) or ConnectionResetError (Web API).

The exception raised by the computation is caught by the qt_try_except decorator of BaseProcessor.run_feature, which calls qt_handle_error_message: the crash occurs in its QMessageBox.critical(...) call.

Windows fatal exception: access violation

Current thread 0x0001c72c (most recent call first):
  File "C:\Dev\Projets\SigimaX\sigimax\utils\qthelpers.py", line 359 in qt_handle_error_message
  File "C:\Dev\Projets\DataLab\datalab\utils\qthelpers.py", line 128 in method_wrapper
  File "C:\Dev\Projets\DataLab\datalab\gui\main.py", line 1879 in calc
  File "C:\Dev\Projets\DataLab\datalab\gui\main.py", line 131 in method_wrapper
  ...

To Reproduce

"""DataLab crashes when a computation requested remotely fails"""

import os

import numpy as np

if __name__ == "__main__":
    # Imported here: the DataLab process must not import the test helpers (pytest)
    from datalab.env import execenv
    from datalab.tests import datalab_in_background_context

    os.environ.setdefault("QT_QPA_PLATFORM", "offscreen")
    execenv.unattended = True
    with datalab_in_background_context() as proxy:
        proxy.add_signal("One point", np.array([0.0]), np.array([1.0]))
        proxy.select_objects([1], "signal")
        # The derivative of a one-point signal raises IndexError in Sigima
        proxy.calc("derivative")

Result:

  • the script fails with ConnectionRefusedError: [WinError 10061];
  • the DataLab process exits with code 3221225477 (0xC0000005);
  • ~/.DataLab_v1/.DataLab_faulthandler.log contains the traceback above.

The same crash occurs with the Web API, started with DATALAB_WEBAPI_ENABLED=1, when calling POST /api/v1/calc with {"name": "derivative"} on the same selection (checked on the branch of #402, which does not change this code path; the XML-RPC case was checked on both branches).

Expected behavior

DataLab keeps running, and the error is reported to the remote client: as an xmlrpc.client.Fault with XML-RPC, as an HTTP error with the Web API. A remote request should not open a modal message box.

Installation information

  • Python package (development checkout), develop branch at c800d5e
  • DataLab 1.3.0, Sigima 1.3.0, SigimaX 1.1.0, PlotPy 2.11.1, guidata 3.16.0, PyQt5 5.15.11 (Qt 5.15.2), FastAPI 0.136.0, uvicorn 0.45.0, Python 3.11.6, NumPy 2.4.4, Windows 10.0.26200

Additional context

Activity

  1. added this to the V1.4.0 milestone on Oct 20, 2026
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

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions