Skip to content

run crashes on Linux if run outside of main thread #70

@alexhroom

Description

@alexhroom

On Linux (including IDAaaS), attempting to run the following script will produce a segfault:

from concurrent.futures import ThreadPoolExecutor

import RATapi as RAT

executor = ThreadPoolExecutor()
future = executor.submit(RAT.examples.DSPC_standard_layers)
project, results = future.result()

This is an issue because RasCAL-2 needs long-running code (e.g. RAT.run()) to run outside the main loop, as the main loop is used for handling and updating the GUI itself. It seems to run successfully on Windows (@DrPaulSharp managed to run it okay). If anyone else would like to run the script on whatever devices they have to hand that'd be useful!

Various observations:

  • This happens for any of the standard_layers or custom_XY examples but NOT the custom_layers examples which run successfully.
  • On DSPC_standard_layers it happens no matter what procedure is chosen.
  • From where it crashes, it seems that we enter the C++ code before it breaks; if using a non-calculate procedure, the Running [procedure] message is produced before it segfaults.

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