Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
9b917c2
chore: Changesets for changes introduced after 1.0.0 but prior to cha…
Benjamin-Dobell Sep 13, 2025
5ebf454
feat: ResolveNodePathMap utility type.
Benjamin-Dobell Jun 3, 2025
a359d04
feat: Types Node direct child APIs
Benjamin-Dobell Jun 3, 2025
0f173d3
fix: Ensure resource types are (re)generated when a scene saves
Benjamin-Dobell Jun 3, 2025
0c57517
feat: UserTypeDescriptor resource type safety
Benjamin-Dobell Jun 3, 2025
18a6ff5
feat: Ensure codegen files are type checked.
Benjamin-Dobell Jun 3, 2025
957d5ca
feat: Improved support for statically typed optional nodes
Benjamin-Dobell Jun 4, 2025
f13ba87
chore: Fix indentation
Benjamin-Dobell Jun 4, 2025
7626e73
fix: get_tree() will not return null, it'll error instead
Benjamin-Dobell Jun 6, 2025
fd177b9
fix: Duplicate Generating in codegen titles
Benjamin-Dobell Jun 6, 2025
05647ac
fix: Critical bug fixes (for crashes) that may occur due to the
Benjamin-Dobell Jun 30, 2025
e35d35e
fix: Duplicate PackedByteArray to_array_buffer() registration
Benjamin-Dobell Jun 30, 2025
143980a
fix: Variant constructor failure on first bound Variant class.
Benjamin-Dobell Jul 3, 2025
9c69889
fix: Another missing Isolate::Scope
Benjamin-Dobell Jul 6, 2025
e7a6713
fix: NodePathMap should permit undefined/optional children
Benjamin-Dobell Jul 11, 2025
c01c0d4
fix: TStringNameCache v8::String reference loss
Benjamin-Dobell Jul 30, 2025
8394f98
fix: Added missing PROPERTY_USAGE_SCRIPT_VARIABLE flag
Benjamin-Dobell Jul 30, 2025
8664bf2
fix: @ExportObject(Node). Was only working for sub-classes.
Benjamin-Dobell Jul 31, 2025
abd0137
fix: JSWorker transfer crash
Benjamin-Dobell Aug 2, 2025
a14dfe0
feat: Expose Variant utility typeof() as godot_typeof().
Benjamin-Dobell Aug 2, 2025
3bd9856
fix: GDictionary keys() return type
Benjamin-Dobell Aug 2, 2025
453da8e
feat: Improved GObject types
Benjamin-Dobell Aug 2, 2025
39a01db
fix: Ensure the GAny union type includes null
Benjamin-Dobell Aug 2, 2025
3369ccd
fix: Bind script instance during default prop evaluation
Benjamin-Dobell Aug 5, 2025
2461614
feat: Constructor params and GDScript compatible 'new'
Benjamin-Dobell Aug 5, 2025
4ae63a9
feat: Worker postMessage support for structured clone and transfer.
Benjamin-Dobell Aug 8, 2025
7372ba3
fix: Don't allow codegen failures to output malformed types
Benjamin-Dobell Aug 13, 2025
047f35a
fix: Invalid codegen for certain types (function literals in particular)
Benjamin-Dobell Aug 14, 2025
36c2a9c
feat: Safer TC39 Stage 3 decorators.
Benjamin-Dobell Aug 9, 2025
e03e7c4
fix: Ensure usercode triggered from ::get/::set does not crash the pr…
Benjamin-Dobell Aug 13, 2025
8d21b32
feat: Global/Local equality operators for JSC, QJS, and web
Benjamin-Dobell Aug 15, 2025
88f8145
fix: Non-V8 builds
Benjamin-Dobell Aug 15, 2025
6770b97
fix: Enum codegen (and godot.lib.api iteration)
Benjamin-Dobell Aug 21, 2025
9ea9ea1
fix: Improved codegen formatting
Benjamin-Dobell Aug 21, 2025
5e0104e
fix: Don't leak temporary default properties object
Benjamin-Dobell Aug 21, 2025
4ac8479
fix: Threading / Godot address reuse crash.
Benjamin-Dobell Aug 21, 2025
e427909
fix: Resource duplicate() return type
Benjamin-Dobell Aug 22, 2025
80db70d
fix: Make Variant constants Readonly<> so they can't be accidentally …
Benjamin-Dobell Aug 26, 2025
d933753
feat: Typesafe EditorUndoRedoManager API types
Benjamin-Dobell Aug 26, 2025
ad96db5
feat: GArray tuple support.
Benjamin-Dobell Aug 27, 2025
e0641c8
feat: Godot 4.5 support
Benjamin-Dobell Aug 27, 2025
f04f30e
ci: Build for multiple Godot engine versions
Benjamin-Dobell Sep 12, 2025
762de54
fix: Don't crash on GodotJS native class mismatch.
Benjamin-Dobell Aug 27, 2025
95cf6b6
fix: Don't crash when script binding fails
Benjamin-Dobell Aug 31, 2025
d3b1ca7
feat: Native object now guaranteed bound during JS initializaation.
Benjamin-Dobell Aug 31, 2025
aebbea4
fix: GDictionary absent values are returned as null, not undefined
Benjamin-Dobell Aug 31, 2025
3bb0f5e
feat: Godot String methods now exposed as static methods on String
Benjamin-Dobell Sep 2, 2025
f9f53dd
feat: Dynamic dispatch types e.g., call_deferred is now typesafe.
Benjamin-Dobell Sep 3, 2025
1ed2957
feat: Codegen GArray/GDictionary generic params from hint strings
Benjamin-Dobell Sep 11, 2025
66e85b2
fix: Ensure GDScript singleton class accessors/modifiers are `static`.
Benjamin-Dobell Sep 13, 2025
28929a8
feat: GodotJS 1.1.0
Benjamin-Dobell Sep 12, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix: Don't crash when script binding fails
  • Loading branch information
Benjamin-Dobell committed Sep 16, 2025
commit 95cf6b6e5847323859b52c1bc7e98a308e146b4c
5 changes: 5 additions & 0 deletions .changeset/sabromin-tsantsa-afterdeck.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@godot-js/editor": patch
---

**Fix:** Don't crash when script binding fails.
13 changes: 9 additions & 4 deletions weaver/jsb_script_instance.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,16 @@ GodotJSScriptInstanceBase::ScriptCallProfilingScope::~ScriptCallProfilingScope()

GodotJSScriptInstanceBase::~GodotJSScriptInstanceBase()
{
jsb_check(script_.is_valid() && owner_ && script_->get_language());
jsb_check(owner_);

const GodotJSScriptLanguage* lang = (GodotJSScriptLanguage*) script_->get_language();
MutexLock lock(lang->mutex_);
script_->instances_.erase(owner_);
// When script binding fails due to an invalid script, we delete the invalid script instance.
if (script_.is_valid())
{
jsb_check(script_->get_language());
const GodotJSScriptLanguage* lang = (GodotJSScriptLanguage*) script_->get_language();
MutexLock lock(lang->mutex_);
script_->instances_.erase(owner_);
}
}

jsb::ScriptClassInfoPtr GodotJSScriptInstance::get_script_class() const
Expand Down