Skip to content

Fix wither boss bug#1125

Open
Pb22j wants to merge 2 commits intosmartcmd:mainfrom
Pb22j:FixWitherBossBug
Open

Fix wither boss bug#1125
Pb22j wants to merge 2 commits intosmartcmd:mainfrom
Pb22j:FixWitherBossBug

Conversation

@Pb22j
Copy link

@Pb22j Pb22j commented Mar 11, 2026

Description

This pullRequest resolves a read access violation crashing the game that occurs when respawning the Wither boss in the End after kill the dragoon.

Changes

Previous Behavior

When respawning the Wither boss in the End, the game would crash with a read access violation exception if a MultiEntityMobPart received damage.

Root Cause

In MultiEntityMobPart.cpp at line 36, the code calls parentMob.lock()->hurt(...). When respawning the Wither in this specific scenario, parentMob.lock() returns a nullptr, causing a crash when the code attempts to immediately dereference it.

New Behavior

The game no longer crashes when respawning the Wither boss in the End. The damage event is handled safely even if the parent mob pointer is momentarily invalid.

Fix Implementation

Added a if statement to check for the std::shared_ptr returned by parentMob.lock() in MultiEntityMobPart::hurt() if will give Exception it will avoid that with return false

AI Use Disclosure

No using for AI

Related Issues

لقطة شاشة 2026-03-11 014718

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.

[Bug] Crash while respawning wither boss in the end

1 participant