Repository navigation
Fix VM crashes, dropped event arguments and other bugs found while typing the VM - #39
Merged
Merged
Conversation
shareSoundToTarget read target.sprite before checking that the target exists, postSpriteInfo called the target before its null check, and handleExtensionButtonPress called a callback that may not be registered.
startHats upper-cased the caller's match field object, so a caller that reused it saw its values change, and it threw when a value was not a string, such as a number broadcast from compiled code.
…ERIPHERAL_REQUEST_ERROR The VM dropped the asset progress detail and the peripheral error data, and re-emitted the single extension field object as two arguments, the second always undefined.
vm.setTurboMode emitted TURBO_MODE_ON and TURBO_MODE_OFF only on the VM, so runtime listeners missed them. Runtime.setTurboMode now owns the change like setFramerate and setInterpolation, and the VM forwards it.
The Rotur extension and the GUI read runtime.projectName, but nothing set it. The title lives in the GUI rather than in project.json, so the GUI now passes it in with vm.setProjectName.
…rite When the requested name was taken, the sprite got a numbered name but blocks that referred to it were updated to the requested name, which is another sprite's.
A monitor with no position is placed by the GUI when it first shows. setStageSize added the offset to its null x and y, which pinned it to the offset itself.
Toolbox entries without a block definition put undefined into the list, which every caller had to skip. The toolbox fixture loses those nulls, and the wrong return type JSDoc is gone.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacked on #37. Found while writing exact TypeScript declarations for the VM (MistWarp/types#1). Each fix comes with a test that fails without it.
shareSoundToTargetresolves when there is no target,postSpriteInforeturns early with no target, andhandleExtensionButtonPressskips a missing callback.startHatsno longer upper-cases its caller's match-fields object in place, and accepts match values that aren't strings.ASSET_PROGRESSpasses its detail,EXTENSION_FIELD_ADDEDits one object (it used to arrive as(object, undefined)), andPERIPHERAL_REQUEST_ERRORits data. The GUI listeners inloader.jsxandconnection-modal.jsxeither read the extra arguments or ignore them.runtime.setTurboMode, so runtime listeners hear it, as with frame rate and interpolation. The VM still emits once per change.runtime.projectNamewas read by the GUI and the Rotur extension but never set.vm.setProjectName(name)now sets it, defaulting to''. The GUI needs to call it when the title changes; that follow-up is coming.renameSpritepoints block references at the deduplicated name.setStageSizeno longer moves monitors that have no position yet.getBlocksJSONleaves out entries without JSON.Checks:
develop(2127/2143), and performance is atdevelop's level.There is no visible change.