← Back to Pull requests

Sensors: continue without global illumination when the engine has no VCT (backport #4199) #4204

Merged
mergify[bot] merged 1 files (14 lines) on Nov 13, 2026 08:44 UTC
View on GitHub
mergify[bot] mergify[bot] commented on Nov 13, 2026 00:26 UTC
Author

🦟 Bug fix

Summary

The Sensors system crashes the server when a world enables VCT global illumination and the server render engine is not ogre2.

  • SensorsPrivate::WaitForInit calls scene->CreateGlobalIlluminationVct() and uses the result without checking it.

  • Only Ogre2Scene implements it. BaseScene logs "GlobalIlluminationVct not supported by: <engine>" and returns null for every other engine.

  • So <global_illumination type="vct"> in the Sensors plugin, together with another engine, segfaults in the rendering thread.
  • With this PR the system prints one warning that names the engine, turns global illumination off and continues. Nothing changes on ogre2.

    To reproduce: run a world with VCT enabled on a server render engine other than ogre2, for example

    gz sim -s -r --render-engine-server <engine> examples/worlds/global_illumination.sdf
    

  • I hit this with the Filament render engine of gazebosim/gz-rendering#1420. Before: the server segfaults. After: it warns once and the camera publishes.

  • I have not run it with ogre. It gets the same null pointer from BaseScene, so I expect the same crash there.
  • Tests:

  • These pass on ogre2 with the change: INTEGRATION_camera_sensor_global_illumination (so VCT is still on with ogre2), INTEGRATION_sensors_system, INTEGRATION_camera_sensor_background, INTEGRATION_reset_sensors, INTEGRATION_sensors_system_update_rate. I did not run the rest of the suite locally.

  • No test is added. It would need a second render engine without VCT in the test environment.
  • Backport Policy


  • This is safe to backport to the following versions:

  • - [x] Jetty
    - [x] Ionic
    - [x] Harmonic
    - [ ] Fortress
  • This should not be backported

  • I am not sure

  • Other (fill in yourself)
  • The same unchecked call is in gz-sim10, gz-sim9 and gz-sim8. I have not built those branches with the change.

    Checklist


  • Signed all commits for DCO

  • Added a screen capture or video to the PR description that demonstrates the fix (as needed)

  • Added tests

  • Updated documentation (as needed)

  • Updated migration guide (as needed)

  • Consider updating Python bindings (if the library has them)

  • codecheck passed (See contributing)

  • All tests passed (See test coverage)

  • Updated Bazel files (if adding new files). Created an issue otherwise.

  • While waiting for a review on your PR, please help review another open pull request to support the maintainers

  • Was GenAI used to generate this PR? If so, make sure to add "Assisted-by" to your commits. (See this policy for more info.)
  • Assisted-by: Claude Opus 5.5

    Note to maintainers: Remember to use Squash-Merge and edit the commit message to match the pull request summary while retaining Signed-off-by and Generated-by messages.

    🤖 Generated with Claude Code

    https://claude.ai/code/session_01ME1hnMnA45pNAYU7LAASSV
    <hr>This is an automatic backport of pull request #4199 done by Mergify.

    Diff: 14 lines (+14 / -0) across 1 files Reviewer: ahcorde Review duration: 498m
    All Vouch review confidence checks passed
    Residual risk 0.10 = Change Risk (0.19) × (1 − Review Confidence (0.48)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.19 · 14 lines diff across 1 files
    0.19
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.00 · 1 substantive comment(s)
    0.00
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    48%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Shallow Review Depth shallow_review_depth
    0.350
    Diff Size diff_size
    0.162
    Real PR Conversation Timeline
    2 items
    ahcorde ahcorde approved these changes on Nov 13, 2026 00:28 UTC
    Approved Reviewer

    Approved these changes.

    Reviewers
    Assignees
    mergify[bot] mergify[bot]
    Labels
    risk: low confidence: 48.5% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 19.2% (LOW) · Higher = larger blast radius
    19.2%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 48.5% · Lower = rushed or shallow review
    48.5%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 9.9% · Safe to merge
    9.9%