Skip to content

poser_mpfit: Skip disabled lighthouses to prevent matrix assertion fa…#360

Merged
bl4ckb0ne merged 1 commit intocollabora:masterfrom
C-CX:fix_poser_mpfit_disable_lh
May 8, 2026
Merged

poser_mpfit: Skip disabled lighthouses to prevent matrix assertion fa…#360
bl4ckb0ne merged 1 commit intocollabora:masterfrom
C-CX:fix_poser_mpfit_disable_lh

Conversation

@C-CX
Copy link
Copy Markdown
Contributor

@C-CX C-CX commented May 5, 2026

This fixes a crash when disabled lighthouses are used:

Assertion failed in cn_matrix.h:234: cn_matrix_idx: (unsigned)row < (unsigned)mat->rows

Root cause:
Disabled lighthouses were still processed in global scene solving, leading to invalid matrix operations.

Changes:
Added checks for ctx->bsd[lh].disable in:

  • construct_input_from_scene
  • handle_results
  • solve_global_scene

Skipping disabled lighthouses prevents the crash and keeps the solver stable.

Copy link
Copy Markdown
Collaborator

@bl4ckb0ne bl4ckb0ne left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@bl4ckb0ne bl4ckb0ne merged commit b41840d into collabora:master May 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants