Filelist packageOf crashes when using assetExtensions
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 2.3k
- Forks
- 641
- Avg merge
- 12h 4m
- Merged PRs (30d)
- 57
Description
I am experimenting with extensions / resources / asset editors
I noticed that adding the following to pxtarget.json crashes
"mathBlocks": true,
"loopsBlocks": true,
"logicBlocks": true,
"variablesBlocks": true,
"textBlocks": true,
"functionBlocks": true,
"listsBlocks": true ,
"onStartUnDeletable": false,
"assetExtensions": "foo" << I added this
},

This is because assetExtensions create a new editor with a null ksPkg


It looks like half of the time the world copes when ksPkg is null, and the other half of the time it explodes.
From my sleuthing this seems to be the offender:

Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the crash with the shown pxtarget.json runtime configuration and assetExtensions enabled. Trace the Filelist packageOf path where the asset editor receives a null ksPkg, then verify that the same configuration no longer crashes and that normal package handling still works.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100