Fix crash in LoadPacks RPC call#2484
Conversation
There was a problem hiding this comment.
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_loadedPackscollection before reloading packs to avoid retaining danglingRtePackage*pointers. - Clear the global RTE model in the
LoadPacksRPC 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.
Test Results 3 files 21 suites 18m 11s ⏱️ 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 Report✅ All modified and coverable lines are covered by tests. 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
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
Fixes
Changes
Note: pack registry is not cleared, only new and modified packs get loaded
Checklist