You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
implying that the call to RegisterClassExA() is failing. A few lines above, the class name is generated based on the return value from QueryPerformanceCounter():
let class_name = CString::new(format!("nih-event-loop-{ticks}"))
.expect("Where did these null bytes come from?");
Since Rust tests are run in parallel by default, I believe the issue is that two threads are attempting to create a class at the same time, resulting in the same class name being generated and therefore and the call to RegisterClassExA() failing in one of the threads. That would also explain why we only see the error occasionally: most of the time, the two threads happen to get different values from QueryPerformanceCounter().
Assuming that is the case, I think this could be fixed by changing how the class name is generated, for instance by including the thread ID.
The text was updated successfully, but these errors were encountered:
Hello! We've been using nih-plug in some of our tests, and we've noticed sporadic failures due to this assertion failing:
nih-plug/src/event_loop/windows.rs
Line 86 in ffe9b61
implying that the call to
RegisterClassExA()
is failing. A few lines above, the class name is generated based on the return value fromQueryPerformanceCounter()
:nih-plug/src/event_loop/windows.rs
Lines 70 to 75 in ffe9b61
Since Rust tests are run in parallel by default, I believe the issue is that two threads are attempting to create a class at the same time, resulting in the same class name being generated and therefore and the call to
RegisterClassExA()
failing in one of the threads. That would also explain why we only see the error occasionally: most of the time, the two threads happen to get different values fromQueryPerformanceCounter()
.Assuming that is the case, I think this could be fixed by changing how the class name is generated, for instance by including the thread ID.
The text was updated successfully, but these errors were encountered: