H-uru / korman

Blender plugin for creating ages for Cyan Worlds' proprietary Plasma engine and its open source variant, CyanWorlds.com Engine.
GNU General Public License v3.0
35 stars 17 forks source link

Camera regions triggering client crash #423

Open DoobesURU opened 2 months ago

DoobesURU commented 2 months ago

Not sure if this is due to a larger imported Age like the city/Ae'gura (where I'm finding this crash happens quite a bit; many things are needlessly duplicated too), but I've been getting this error when entering certain camera regions:

UruLive.1.918 - 5b7f39f - Internal.Release
OS: Windows 10 Home Edition Professional (Build 19045)
CPU: AMD FX(tm)-4300 Quad-Core Processor            
RAM: 16384 MiB

Stack Trace:
Level 00: plClient!plVirtualCam1::StartTransition (File: plVirtualCamNeu.cpp:1870)
Level 01: plClient!plVirtualCam1::PushCamera (File: plVirtualCamNeu.cpp:1590)
Level 02: plClient!plVirtualCam1::MsgReceive (File: plVirtualCamNeu.cpp:1334)
Level 03: plClient!plDispatch::IMsgDispatch (File: plDispatch.cpp:370)
Level 04: plClient!plDispatch::MsgSend (File: plDispatch.cpp:501)
Level 05: plClient!plClient::IUpdate (File: plClient.cpp:1618)
Level 06: plClient!plClient::MainLoop (File: plClient.cpp:1529)
Level 07: plClient!WinMain (File: winmain.cpp:1308)
Level 08: plClient!__scrt_common_main_seh (File: exe_common.inl:288)
Level 09: KERNEL32!BaseThreadInitThunk
dpogue commented 2 months ago

It looks like this might be caused by a CameraModifier without a brain (which presumably korman should not export).

The crashing line in Plasma is when it accesses the brain here: https://github.com/H-uru/Plasma/blob/d7363e6367de6365861ee4a46cfa66f559e4f287/Sources/Plasma/FeatureLib/pfCamera/plVirtualCamNeu.cpp#L1870

DoobesURU commented 2 months ago

Digging into the PRPs, I found that a handful of cameras had two brains instead of no brain. It appears to happen with similarly-named cameras (eg DefaultCam, DefaultCam.001, DefaultCam.002, etc). The camera objects with the extra numbers at the end receive two brains: "DefaultCam.001" and "DefaultCam_001".

So my guess is it's a blip in a renaming scheme for objects with decimals?

EDIT: Nevermind. Seems that's normal for follow cameras. I'll keep digging.

EDIT 2: It appears one of the camera brains has a null plKey in the <brain> portion of the PRC; specifically, the one with the decimal and not the underscore. So, follow cameras with the decimals after the name, or any cameras that require two entries, are "half brain-dead". 😛

EDIT 3: Both camera modifiers are missing the <transforms> as well.