★ wanayoo — archive 1999 https://github.com/Overv/VulkanTutorial/issues/15Nouvelle recherche | Portail wanayoo
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

Full system freeze #15

Closed
paulhilbert opened this issue Jul 28, 2016 · 13 comments
Closed

Full system freeze #15

paulhilbert opened this issue Jul 28, 2016 · 13 comments

Comments

@paulhilbert
Copy link

@paulhilbert paulhilbert commented Jul 28, 2016

The swap_chain_creation.cpp as well as my own implementation following your tutorial up to this point reliably freezes my machine if I interact in any way with the window (moving, resizing, closing etc.). Additionally I get a "validation layer: vkDeviceWaitIdle: returned VK_ERROR_DEVICE_LOST, indicating that the logical device has been lost" error when terminating the application.

Note that SashaWillems basic triangle example works fine.

@Overv
Copy link
Owner

@Overv Overv commented Jul 28, 2016

Which platform and hardware are you using?

@paulhilbert
Copy link
Author

@paulhilbert paulhilbert commented Jul 29, 2016

Linux (Arch Linux) 4.6.4, ph-device is nvidia gtx 780, driver 367.35.
I thought it was related to my window manager instantly resizing the window after startup since it is a tiling wm (i3), but that wasn't the case. If I manage to find some time for it this weekend I will look into the differences to the aforementioned tutorial by SashaWillems.

@kubasz
Copy link

@kubasz kubasz commented Aug 13, 2016

I've had exactly the same problem (Arch Linux linux-ck 4.6.6-1, NV GTX 960 2GB 367.35) and managed to resolve it by adding fences and waiting for the graphics command buffer to execute before scheduling presentation (just like in Sasha Willem's example code triangle.cpp line 353)

@Overv
Copy link
Owner

@Overv Overv commented Aug 13, 2016

@kubasz It's odd that something like that is required, because vkQueuePresentKHR already waits on the semaphore that is signaled when the command buffer finishes execution. It seems that his code duplicates the work. I'll ask him about it.

@ghost
Copy link

@ghost ghost commented Aug 14, 2016

Hi guys, I've just got everything up to the basic triangle working under Antergos (Arch) and its all working fine.

Moving the window around is a little choppy, but that might be due to the code throwing everything at the GPU with no let up? Window close responds correctly etc.

@Overv
Copy link
Owner

@Overv Overv commented Aug 14, 2016

@leestripp Is that without any modifications to synchronisation?

@ghost
Copy link

@ghost ghost commented Aug 15, 2016

Yes, no modifications.

@ghost
Copy link

@ghost ghost commented Aug 15, 2016

Added a sleep_for in the mainLoop. Now the window moves nice and smooth. Hope that helps.

void lsVulkan::mainLoop()
{
    cout << "lsVulkan::mainLoop() called" << endl;
    while( !glfwWindowShouldClose(window) )
    {
        glfwPollEvents();
        // TODO: Add ESC support
        drawFrame();
        this_thread::sleep_for( chrono::milliseconds(1) );
    }
    vkDeviceWaitIdle( device );
}
@AkBKukU
Copy link

@AkBKukU AkBKukU commented Aug 23, 2016

I have finished the the "Rendering and presentation" section of the tutorial and have also encountered the validation layer: vkDeviceWaitIdle: returned VK_ERROR_DEVICE_LOST, indicating that the logical device has been lost message. However I have tried this on two different Ubuntu systems and only one of them gave the error.

No error System:
Ubuntu 15.10
Nvidia GTX 680
Driver 367.35

Has Error System:
Ubuntu 16.04
Nvidia GTX 860M
Driver 370.23

On the system with the error I rolled back to the 367.35 driver and then the error went away. So it may be a driver problem.

Looking at the supported features on gpu info for the 680 vs. 960, 780, & 860M doesn't give any correlation between features and problems.

I put my implementation of the code up here: https://github.com/AkBKukU/VKTriangle

@rlofc
Copy link

@rlofc rlofc commented Oct 16, 2016

I've just experienced the same full system freeze on window resize/move/etc with nvidia 370.28-1 under Arch.
Adding fences as @kubasz suggested resolved this for me.

@Overv
Copy link
Owner

@Overv Overv commented Oct 17, 2016

@rlofc Can you try the following code? https://gist.github.com/Overv/2d2c1e0fe0ff270c56f7773aa5cd93f0 It relies on the same shaders as the code for the end of "Rendering and presentation"

@rlofc
Copy link

@rlofc rlofc commented Oct 17, 2016

Same issue.
Interestingly I'm also using a tiling wm (dwm). Intuitively I would say this is related.

@Overv
Copy link
Owner

@Overv Overv commented May 25, 2017

Can you check if the latest code still has this issue? I've changed the way synchronization works in drawFrame.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
5 participants
You can’t perform that action at this time.