WilloIzCitron / ArchiveDustry-Java

Blue Archive Soundtracks and Cosmetics in Mindustry
MIT License
36 stars 3 forks source link

Crash on picking up structure #3

Closed Clockwork21 closed 1 month ago

Clockwork21 commented 1 month ago

Describe the bug Game crashes when picking up "Reinforced Container" on Erekir campaign.

To Reproduce Steps to reproduce the behavior:

  1. Place down a reinforced container
  2. Move above it and press the "pickup cargo" key (default "[" )
  3. Game crashes

Expected behavior Picking up the structure

Desktop (please complete the following information):

Additional context Game also crashes when placing the structure down (default "]" ). It can also be assumed that this issue also applies to any structure.

Clockwork21 commented 1 month ago

Here's the crash report too:

java.lang.NullPointerException: Cannot read field "type" because "e.unit" is null at bluearchive.units.UnitSound.lambda$init$0(UnitSound.java:25) at arc.Events.fire(Events.java:53) at arc.Events.fire(Events.java:43) at mindustry.gen.PayloadUnit.dropBlock(PayloadUnit.java:544) at mindustry.gen.PayloadUnit.tryDropPayload(PayloadUnit.java:731) at mindustry.gen.PayloadUnit.dropLastPayload(PayloadUnit.java:558) at mindustry.input.InputHandler.payloadDropped(InputHandler.java:455) at mindustry.gen.Call.payloadDropped(Call.java:886) at mindustry.input.InputHandler.requestDropPayload(InputHandler.java:447) at mindustry.gen.Call.requestDropPayload(Call.java:1011) at mindustry.input.InputHandler.tryDropPayload(InputHandler.java:757) at mindustry.input.DesktopInput.updateMovement(DesktopInput.java:791) at mindustry.input.DesktopInput.update(DesktopInput.java:300) at mindustry.core.Control.update(Control.java:639) at arc.ApplicationCore.update(ApplicationCore.java:37) at mindustry.ClientLauncher.update(ClientLauncher.java:237) at arc.backend.sdl.SdlApplication.listen(SdlApplication.java:204) at arc.backend.sdl.SdlApplication.loop(SdlApplication.java:192) at arc.backend.sdl.SdlApplication.(SdlApplication.java:54) at mindustry.desktop.DesktopLauncher.main(DesktopLauncher.java:39)

WilloIzCitron commented 1 month ago

Oh that is problem of Unit sound.java, I will be fix that

WilloIzCitron commented 1 month ago

image this code from v1.1, and commit e85967 was fixed this issue, stay tune for v1.2