Skip to content

Fix crash in LoadPacks RPC call#2484

Merged
edriouk merged 2 commits into
mainfrom
fix/remove-pack-rpc-crash
May 21, 2026
Merged

Fix crash in LoadPacks RPC call#2484
edriouk merged 2 commits into
mainfrom
fix/remove-pack-rpc-crash

Conversation

@edriouk
Copy link
Copy Markdown
Contributor

@edriouk edriouk commented May 20, 2026

Fixes

Changes

  • clear RTE model and cached list of loaded packs
    Note: pack registry is not cleared, only new and modified packs get loaded

Checklist

  • 🤖 This change is covered by unit tests (if applicable).
  • 🤹 Manual testing has been performed (if necessary).
  • 🛡️ Security impacts have been considered (if relevant).
  • 📖 Documentation updates are complete (if required).
  • 🧠 Third-party dependencies and TPIP updated (if required).

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR addresses a crash in the LoadPacks RPC flow by resetting state that can otherwise retain stale pointers across RPC invocations, aligning with the goal of reloading packs without fully clearing the pack registry.

Changes:

  • Clear the cached m_loadedPacks collection before reloading packs to avoid retaining dangling RtePackage* pointers.
  • Clear the global RTE model in the LoadPacks RPC handler before reinitializing and loading packs.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
tools/projmgr/src/ProjMgrWorker.cpp Clears cached loaded pack pointers before reloading packs.
tools/projmgr/src/ProjMgrRpcServer.cpp Clears the global RTE model during LoadPacks RPC to ensure a clean reload.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread tools/projmgr/src/ProjMgrWorker.cpp Outdated
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 20, 2026

Test Results

    3 files     21 suites   18m 11s ⏱️
  464 tests   464 ✅ 0 💤 0 ❌
1 392 runs  1 392 ✅ 0 💤 0 ❌

Results for commit 40b336d.

♻️ This comment has been updated with latest results.

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@codecov
Copy link
Copy Markdown

codecov Bot commented May 20, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 65.23%. Comparing base (b0c395c) to head (40b336d).
⚠️ Report is 5 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2484   +/-   ##
=======================================
  Coverage   65.23%   65.23%           
=======================================
  Files         147      147           
  Lines       26659    26662    +3     
  Branches    16155    16157    +2     
=======================================
+ Hits        17390    17393    +3     
  Misses       7074     7074           
  Partials     2195     2195           
Flag Coverage Δ
projmgr-cov 87.92% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
tools/projmgr/src/ProjMgrRpcServer.cpp 85.51% <100.00%> (+0.02%) ⬆️
tools/projmgr/src/ProjMgrWorker.cpp 87.40% <100.00%> (+<0.01%) ⬆️

... and 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Copy Markdown
Member

@jkrech jkrech left a comment

Choose a reason for hiding this comment

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

LGTM

@edriouk edriouk merged commit bf004f1 into main May 21, 2026
33 checks passed
@edriouk edriouk deleted the fix/remove-pack-rpc-crash branch May 21, 2026 05:53
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.

3 participants