A call to wglDeleteContext after a call to glewInit seems not to clean up the resources properly any more.
The following code snippet compiled for a 32 bit platform leads to a crash (caused by running out of memory) very quickly.
for (int i = 0; i < 10; ++i)
{
std::vector<HGLRC> hglrcs;
for (int j = 0; j < 100; ++j)
{
HGLRC hglrc = wglCreateContext(hdc);
if (hglrc != NULL)
{
wglMakeCurrent(hdc, hglrc);
hglrcs.push_back(hglrc);
}
}
// No memory leak if you do not call glewInit!
glewInit();
for (auto hglrc : hglrcs)
{
wglMakeCurrent(0, 0);
wglDeleteContext(hglrc);
}}
Reproducible on Windows 10 64 bit systems
with Radeon Pro Software for Enterprise drivers starting with version 18.Q3 and a
FirePro W2100 graphics adapter.
Previous driver versions do not have the issue.
Did anyone run into the same problem?
Thanks in advance
Hi mksrksh, thanks for your report. Could you please provide a minimal code that can reproduce this problem, that would be very helpful for our investigation.
Hi dorisyan,
thank you for your quick reply.
I think the code snippet I've provided in my question is already a minimal one.
Making it run is very easy. All your developers have to do is to perform the following steps:
Please do not hesitate to contact me if you have any further questions.
Regards
Thanks! I will give you feedback if there is any progress.
Hi dorisyan,
any progress on this topic? Were you able to reproduce the leak?
Please let me know if you need more information.
Thanks
Hi mksrksh, I have run it, but I can't reproduce this problem on my device. Could you tell me which card you are using can reproduce it?
Hi dorisyan,
please see my original post:
Reproducible on Windows 10 64 bit systems
with Radeon Pro Software for Enterprise drivers starting with version 18.Q3 and a
FirePro W2100 graphics adapter.
Previous driver versions do not have the issue.
Thanks, I got it. It may take some time to borrow a FirePro W2100, I will give you feedback later.
Hi dorisyan,
did you manage to borrow a FirePro W2100 and can confirm the resource leaking?
Please let me know if you need more information.
Thanks
Hi mksrksh, yes, I have already got this card, as it didn't work on my current platform, it seems that I need to take some time to set up a platform for it. Thanks for your patience!
Thanks for your info! I will investigate it as soon as possible.
Hi dorisyan,
the recent driver 19.Q2.1 seems to have the issue, too.
Did you manage to build up a similar system or to ask the corresponding team to confirm the issue as you intended?
Thanks
Hi mksrksh , It would be better if you can provide your project's zip file here. (I hope the app code could be the same)