Skip to content

fix: Provide stub R 4.2 device callbacks #187

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 25, 2025
Merged

Conversation

trevorld
Copy link
Contributor

@trevorld trevorld commented Mar 8, 2025

  • As recommended by Paul Murrell I adapted the stubs from grDevices/src/devPS.c
  • These stubs quietly do nothing (without even a warning) but their existence seems to prevent R from segfaulting if a user tries to use these new features (even though dev.capabilities() correctly signals that {svglite} doesn't support these features (yet)

closes #185

* As recommended by Paul Murrell I adapted the stubs from
  `grDevices/src/devPS.c`
* These stubs quietly do nothing (without even a warning)
  but their existence seems to prevent R from segfaulting
  if a user tries to use these new features (even though
  `dev.capabilities()` correctly signals that {svglite}
  doesn't support these features (yet)

closes #185
@trevorld
Copy link
Contributor Author

trevorld commented Mar 8, 2025

I didn't test all of these but I did double check that @teunbrand's minimal, reproducible {svglite} segfault example no longer segfaults with the addition of these stubs: #174 (comment)

@trevorld
Copy link
Contributor Author

trevorld commented Mar 9, 2025

I speculate that it might be better to throw a message, warning, or error rather than quietly do nothing...

@thomasp85 thomasp85 merged commit 5ec4750 into r-lib:main Apr 25, 2025
13 checks passed
@trevorld trevorld deleted the issue185 branch April 25, 2025 14:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Provide (possibly stub) R 4.2 device callbacks (so as to stop R freezes/crashes)
2 participants