beeware / beeware/toga

Segmentation fault on iOS CI testbed

Open
#4,526 0 comments 0 reactions 0 assignees View on GitHub
bug iOS
Dominant language
Python
Stars
5.4k
Forks
827
Avg merge
15h 39m
Merged PRs (30d)
40

Description

### Describe the bug

We've recently been seeing CI failures on iOS (e.g., [this CI run](https://github.com/beeware/toga/actions/runs/28325192446/job/83914007077?pr=4506)). The problem manifests as a segfault in the iOS simulator just after an error in the `tests/widgets/test_webview.py::test_evaluate_javascript` test.

### How to reproduce the bug

Difficult to reproduce; we're seeing it intermittently in CI - maybe 1 in 10 runs?

### Minimum example code

```shell
Run the testbed app in CI.
```

### Screenshots

_No response_

### Environment details

- Operating system and version: iOS 18.6
- Python version: 3.12
- Software versions:
- Briefcase: 0.4.5+
- Toga: 0.5.4+
- ...

### Logs

```
...
tests/widgets/test_webview.py::test_static_large_content
PASSED [ 91%]

tests/widgets/test_webview.py::test_user_agent
PASSED [ 91%]

tests/widgets/test_webview.py::test_evaluate_javascript
ERROR [ 91%]
Child process terminated with signal 15: Terminated

Test suite didn't report a result.
Saving log... started

Log saved to /Users/runner/work/toga/toga/testbed/logs/briefcase.2026_06_28-14_33_25.run.log

Saving log... done
Error: Process completed with exit code 200.
```

There's no additional context in the Briefcase log - it's a segfault.

### Additional context

* The problem test usually passes on a re-run
* The problem test uses the `flaky` decorator, so the problem could be related to cleanup (and maybe async cleanup of the widget as part of the flaky operation?)
* The next test to execute is another flaky webview test (`test_evaluate_javascript_no_handler`).

Contributor guide

Open the contributing guide

Research direction

Start with tests/widgets/test_webview.py::test_evaluate_javascript and the linked GitHub Actions run, then compare its behavior with test_evaluate_javascript_no_handler and the saved Briefcase log. Investigate the intermittent iOS simulator termination around flaky-test cleanup; done means the relevant iOS CI tests complete without a segmentation fault.

Written by the indexing model from the issue text.

Assessment

Tech stack
github-actions, ios, python
Domain
ci-cd, mobile, testing
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.