BoomingTech / Piccolo

Piccolo (formerly Pilot) – mini game engine for games104
MIT License
5.79k stars 1.8k forks source link

Bug Report: Editor crash after reload current world #383

Closed CRAFTSTARCN closed 1 year ago

CRAFTSTARCN commented 1 year ago

Describe the bug | Bug描述 Very clear, run editor, get into game mode, switch back to editro mode, then reload current world, the editor will crash immediately

Steps to reproduce | 如何复现 Steps to reproduce the behavior:

  1. Open piccolo editor
  2. Click 'Menu->Reload Current Level'
  3. Crash

Expected behavior | 预期行为 The level should reloaded as written in the json file

Actual behavior | 实际行为 Editor crash

Screenshots/Logs | 截图/日志 In debug mod, console:

[info] [Piccolo::WorldManager::reloadCurrentLevel] reload current evel succeed
Exception: Exception 0xc0000005 encountered at address 0x7ff75e59153b: Access violation reading location 0x00000000

Call stack info: `VLI6MDKGNH2({2@GHB5W_N

DA ODYKA@_5 FVTUM5COU5D

It seems caused by clean up particle resource ` @UYSNU28UAX{GO`V2YX)N

Guess from the result of search everywhere, the rhi buffer object 'm_particle_storage_buffer' seems never allocated, buf access when delete buffer

VOW1JOYM0X}F1}X ~S9~SEA

Desktop | 桌面环境 CPU: Intel Core i7 12700H Memory: 32G Graphics Card: Nvidia Gefore RTX 3060 Laptop, Driver: 517.00 System: Windows 11

Additional context | 补充信息 Nothing

hanyangl5 commented 1 year ago

duplicate with #378