o3de / o3de-multiplayersample

Multiplayer sample project for the Open 3D Engine
https://o3de.org
Other
84 stars 61 forks source link

Linux: Exiting GameLauncher and ServerLauncher causes asserts to be printed to the Terminal #323

Closed LB-ArturZieba closed 1 year ago

LB-ArturZieba commented 1 year ago

Describe the bug Exiting GameLauncher and ServerLauncher causes asserts to be printed to the Terminal they were launched from (Linux).

ServerLauncher asserts: Assert#1 File:

/data/workspace/o3de/Code/Framework/AzCore/./AzCore/std/containers/vector.h

Condition:

(140650960039040) 'AZStd::vector::const_reference AZStd::vector<AZStd::intrusive_ptr<AZ::Vulkan::CommandQueue>>::operator[](AZStd::vector::size_type) const [T = AZStd::intrusive_ptr<AZ::Vulkan::CommandQueue>, Allocator = AZStd::allocator]'
AZStd::vector<>::at - position is out of range

Line: 547


Assert#2 File:

/data/workspace/o3de/Gems/Atom/RHI/Code/Source/RHI/Object.cpp

Condition:

(140650960039040) 'void AZ::RHI::Object::add_ref() const'
m_useCount is negative

Line: 34


Assert#3 File:

/data/workspace/o3de/Code/Framework/AzCore/./AzCore/std/smart_ptr/intrusive_ptr.h

Condition:

(140650960039040) 'T *AZStd::intrusive_ptr<AZ::Vulkan::BufferPool>::operator->() const [T = AZ::Vulkan::BufferPool]'
You can't dereference a null pointer

Line: 189


GameLauncher assert: File:

/data/workspace/o3de/Gems/Atom/RHI/Vulkan/Code/Source/RHI/Vulkan.h

Condition:

(140240341694016) 'void AZ::Vulkan::AssertSuccess(VkResult)'
ASSERT: Vulkan API method failed: Device lost

Line: 96


Full assert logs are attached in the Video and full assert logs section.

It should be noted that this issue only occurred on Linux.

Steps to reproduce

  1. Follow steps listed here: https://github.com/o3de/o3de-multiplayersample/blob/stabilization/2305/README_LINUX.md to setup MultiplayerSample.
  2. Launch ServerLauncher and GameLauncher as described here: https://github.com/o3de/o3de-multiplayersample/blob/development/README_LINUX.md#step-4-setup-client-and-server.
  3. In the GameLauncher press Esc and click Quit in the menu.
  4. Look to the Terminals used to launch ServerLauncher and GameLauncher.

Expected behavior No asserts are printed to the Terminals.

Actual behavior Asserts are printed to the Terminals.

Video and full assert logs

https://user-images.githubusercontent.com/86952082/230320956-8113cad3-1609-43ac-9545-3d4dd110de4e.mp4

AssertLogs.txt

Found in Branch o3de-multiplayersample: Stabilization/2305 (4cee1b11a04ecbedacadb7dd977f11c8adce0d12) o3de-multiplayersample-assets: Stabilization/2305 (6739f1027152e68f67be361d77df2296dbf4e800) o3de: Stabilization/2305 Installer (4/6/2023)

Desktop

lmbr-pip commented 1 year ago

Split into issues per assert

LB-ArturZieba commented 1 year ago

I have split this issue into separate ones per unique asserts as requested, they can be viewed here:

Closing the issue.