cancel
Showing results for 
Search instead for 
Did you mean: 

OpenGL & Vulkan

mksrksh
Adept II

Regression in the current Pro Driver (Windows 10)

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

0 Likes
13 Replies
dorisyan
Staff

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.

0 Likes
mksrksh
Adept II

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:

  1. Create a new Visual Studio project of type "Windows Desktop Application"
  2. Copy paste the snippet after the call of window creation (CreateWindow)
  3. Link the project against the glew library.

Please do not hesitate to contact me if you have any further questions.

Regards

0 Likes

Thanks! I will give you feedback if there is any progress.

0 Likes

Hi dorisyan‌,

any progress on this topic? Were you able to reproduce the leak?

Please let me know if you need more information.

Thanks

0 Likes

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?

0 Likes

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.

0 Likes

Thanks, I got it. It may take some time to borrow a FirePro W2100, I will give you feedback later.

0 Likes

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

0 Likes

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!

0 Likes

Hi dorisyan‌,

just an update:

Recently released Driver 19.Q2 seems to be also affected by the issue.

0 Likes
dorisyan
Staff

Thanks for your info! I will investigate it as soon as possible.

0 Likes

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

0 Likes

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)

0 Likes