直到最近,我才遇到问题,但是 glfwinit()
总是需要20秒才能执行。我已经看到了其他与驾驶员问题有关的stackoverflows和github问题 - 但是我没有与人们谈论的设备相同的设备,并且与设备和驱动程序(完全更新),我确实有这个问题,直到我才遇到这个问题现在。
RB_CORE_INFO("Creating window {0} ({1}, {2})", props.title, props.width, props.height); // log macro - for example, will print at 10:30:00
if (!gGlfwInitialized)
{
RB_CORE_TRACE("Initializing GLFW"); // prints at 10:30:00
const int success = glfwInit(); // takes 20 seconds
RB_CORE_ASSERT(success, "Could not initialize GLFW")
RB_CORE_TRACE("GLFW Initialized"); // prints at 10:30:20
glfwSetErrorCallback(GlfwErrorCallback);
gGlfwInitialized = true;
}
RB_CORE_TRACE("Creating glfw window");
mWindow = glfwCreateWindow(static_cast<int>(props.width), static_cast<int>(props.height), mData.title.c_str(),
nullptr, nullptr);
我的代码片段,尽管我很积极,但问题不是我的代码。无论我的问题是GLFW还是Windows 11,我都不确定,但是我会生气地试图弄清楚它。我在网上发现的其他工作和原因似乎并不是我的案例,据我至少可以弄清楚。
任何帮助将不胜感激。
作为参考,我运行Windows 11,完全更新,所有驱动程序都已更新。 RTX 3080 GPU和Ryzen 5900X CPU。有些人指责Corsair键盘,尽管我有一个Ducky键盘,但似乎也不是原因。
注意:自从几天前我刚开始遇到这个问题以来,我已经重新启动了很多次。
编辑:
似乎问题与 this 和 this 但是,这些指向硬件ID中带有VID_262的设备驱动程序。但是,由于我对该特定的VID_262没有任何东西,因此我不确定从哪里开始寻找。使用devcon.exe i生成此列表,但是即使在一个一个设备上插入每个设备后,我也找不到问题。在此编辑之后,我尚未尝试在另一台设备上运行它。
I never had an issue with this until recently, but glfwInit()
always takes 20 seconds to execute. I have seen the other stackoverflows and github issues pertaining to driver issues - but I do not have the same devices as the ones people talk about, and with the devices and drivers (fully updated) I do have, I have never had this issue until now.
RB_CORE_INFO("Creating window {0} ({1}, {2})", props.title, props.width, props.height); // log macro - for example, will print at 10:30:00
if (!gGlfwInitialized)
{
RB_CORE_TRACE("Initializing GLFW"); // prints at 10:30:00
const int success = glfwInit(); // takes 20 seconds
RB_CORE_ASSERT(success, "Could not initialize GLFW")
RB_CORE_TRACE("GLFW Initialized"); // prints at 10:30:20
glfwSetErrorCallback(GlfwErrorCallback);
gGlfwInitialized = true;
}
RB_CORE_TRACE("Creating glfw window");
mWindow = glfwCreateWindow(static_cast<int>(props.width), static_cast<int>(props.height), mData.title.c_str(),
nullptr, nullptr);
A snippet of my code, though I'm quite positive the issue is not my code. Whether my issue is glfw or windows 11 I am not sure, but I'm going mad trying to figure it out. Other work arounds and causes I've found online do not seem to be my case, as far as I can figure at least.
Any help is greatly appreciated.
For reference, I run Windows 11, fully updated and all drivers updated. RTX 3080 gpu and a Ryzen 5900x cpu. Some people have blamed Corsair keyboards, though I have a Ducky keyboard and it doesn't seem to be the cause either.
Note: I've rebooted many times since I first started having this issue a couple days ago.
Edit:
It does seem the issue is related to this and this however these point to a device driver with VID_262 in the hardware ID. But as I do not have any with that particular VID_262 I'm not sure where to start looking. Using DevCon.exe I generated this list but even after unplugging every device one by one, I can't find the issue. As of this edit, I've not yet been able to try running this on another device.
发布评论
评论(1)
因此,事实证明VCPKG是邪恶的。我开始遇到更多问题 - 是IMGUI首次编译的,但是当我使用新框架功能时会给我阅读访问违规行为。然后,它变成了链接错误和一堆真正使我感到困惑的事情。即使我是通过预制从我自己的文件夹中获取所有库,但Visual Studio似乎已经感到困惑,并试图将我生成的LIB文件与我在VCPKG上安装的LIB文件联系起来。
关闭VCPKG已解决了我的链接错误,现在使Glfw Init非常快。我想我应该完全卸载VCPKG,以便为使用GLFW之类的其他游戏或应用程序解决问题。
长话短说,VCPKG是我系统的噩梦。
So it turns out VCPKG is evil. I started having more issues - being that ImGui first compiled, but would give me read access violations when I used their NewFrame function. Then it turned into linking errors and a whole bunch of things that really started to confuse me. Even though I'm taking all my libraries from my own folder via premake, it seems Visual Studio has gotten confused and was trying to link both my generated lib files with lib files I had installed on vcpkg.
Turning off vcpkg has fixed both my linking errors and now makes glfw init very fast. I guess I should just uninstall vcpkg completely so it fixes the problem for other games or applications that use things like glfw.
Long story short, VCPKG is a nightmare on my system.