Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Examples continue to run long after exit on Mac #1022

Open
swiftcoder opened this issue Aug 22, 2018 · 5 comments
Open

Examples continue to run long after exit on Mac #1022

swiftcoder opened this issue Aug 22, 2018 · 5 comments

Comments

@swiftcoder
Copy link
Contributor

The triangle example hangs for a long time (10-20 seconds) after one presses the close button on Mac (Mojave developer beta 7, using MoltenVK via vulkansdk-macos-1.1.82.1).

The Teapot example exposes something much more interesting - it isn't hanging per se, because the teapot continues to animate after the close event is processed. If you add a println! as the very last statement in main, you can see that the program exits the main loop entirely, but continues to render and animate for 10 seconds or so.

I'm not entirely sure where to start debugging this. It seems as thought the program is only actually displaying 1 frame each time it should display 2, and after the program ends it proceeds to play back all the missing frames that have been queued up. I can't really tell if that's a Vulkano issue, a MoltenVK issue, or an issue in the sample code?

@swiftcoder
Copy link
Contributor Author

As an additional data point, the same samples run fine on Windows/NVidia (as expected), which tends to point to a MoltenVK-specific issue, or some sort difference in the way MoltenVK handles frame submit.

@swiftcoder
Copy link
Contributor Author

swiftcoder commented Aug 28, 2018

The workaround is fine, albeit likely negatively impacting performance, but are we sure this is a MoltenVK bug, and not an issue between Vulkano and varying interpretations of the spec?

KhronosGroup/MoltenVK#146 does look very similar to this.

@rukai
Copy link
Member

rukai commented Aug 28, 2018

Yeah, someone needs to either:

  • Create a c++ repro of the frames stacking up.
  • Or find a bug in vulkano causing frames stacking up.

@Keshi
Copy link

Keshi commented Jan 1, 2019

I'm encountering a similar problem.. exiting from triangle simply causes it to hang forever without closing the window. I'm not sure if it is the same problem, but it seems to be waiting on a fence?

__psynch_cvwait 0x00007fff744d47de _pthread_cond_wait 0x00007fff7458e593 std::__1::condition_variable::wait(std::__1::unique_lock<std::__1::mutex>&) 0x00007fff71a6dbda MVKSemaphoreImpl::wait(unsigned long long, bool) 0x000000010aa50fab mvkWaitForFences(unsigned int, VkFence_T* const*, unsigned int, unsigned long long) 0x000000010aa52535 vk_sys::DevicePointers::WaitForFences::h7d322add3c6fead8 lib.rs:2699 _$LT$vulkano..sync..fence..Fence$LT$D$GT$$GT$::wait::h350985ab537a39e9 fence.rs:169 _$LT$vulkano..sync..future..fence_signal..FenceSignalFuture$LT$F$GT$$u20$as$u20$core..ops..drop..Drop$GT$::drop::he6685a66dd3b6a1b fence_signal.rs:437 core::ptr::drop_in_place::h4beede58f3032683 0x0000000109d6af85 core::ptr::drop_in_place::h3a781f07896bb430 0x0000000109d6a5b7 triangle::main::hde1c3b6b40d1ae79 triangle.rs:450 std::rt::lang_start::_$u7b$$u7b$closure$u7d$$u7d$::hfc2dfc814f5233ba 0x0000000109d3f9a2 std::panicking::try::do_call::ha38138adc359e978 0x0000000109ec6d98 std::panicking::try::do_call::ha38138adc359e978 0x0000000109ec6d8c __rust_maybe_catch_panic 0x0000000109ed307f std::rt::lang_start_internal::hb574fbed1955c3b8 0x0000000109ebf99d std::rt::lang_start_internal::hb574fbed1955c3b8 0x0000000109ebf96a std::rt::lang_start_internal::hb574fbed1955c3b8 0x0000000109ebf96a std::rt::lang_start::h83fec2f34e76bd75 0x0000000109d3f982 main 0x0000000109c69eb2 start 0x00007fff74397ed9

@Rua
Copy link
Contributor

Rua commented Dec 28, 2022

Is this still an issue?

@Rua Rua added the type: bug label Aug 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants