I have put the relevant files in this zip archive on my .Mac account:
MoveByBoneCrashes.zip (12 KB)
Crash Procedure
The crash occurs both in Anime Studio Pro and Moho 5.3.
- Open Anime Studio Pro
- Load test.anme
- Embed the .lua script in the box layer
- Go to any frame other than zero
- Select the bone layer
- Go to another frame
- crash...
The test.anme file has three layers: a bone layer, and two child vector layers, circle and box.
The crash only appears when using MoveByBone.lua and MoveByBoneModded-1.lua, not with MoveByBoneModded-2.lua
If I comment out this piece of code (in lines 70 - 82, as done in MoveByBoneModded-2.lua) the crash does not occur:
Code: Select all
-- moho:SetSelLayer(parent)
-- local skel = moho:Skeleton()
-- local angle = { x = 0, y = 0, z = 0 }
-- if ( bone.x >= 0 ) then
-- angle.x = skel:Bone(bone.x).fAngle - bAng.x
-- end
-- if ( bone.y >= 0 ) then
-- angle.y = skel:Bone(bone.y).fAngle - bAng.y
-- end
-- if ( bone.z >= 0 ) then
-- angle.z = skel:Bone(bone.z).fAngle - bAng.z
-- end
-- moho:SetSelLayer(layer)
Code: Select all
moho:SetSelLayer(parent)
-- local skel = moho:Skeleton()
-- local angle = { x = 0, y = 0, z = 0 }
-- if ( bone.x >= 0 ) then
-- angle.x = skel:Bone(bone.x).fAngle - bAng.x
-- end
-- if ( bone.y >= 0 ) then
-- angle.y = skel:Bone(bone.y).fAngle - bAng.y
-- end
-- if ( bone.z >= 0 ) then
-- angle.z = skel:Bone(bone.z).fAngle - bAng.z
-- end
moho:SetSelLayer(layer)
I have also included the crash report with the zip archive.