cancel
Showing results for 
Search instead for 
Did you mean: 

OpenGL & Vulkan

mksrksh
Adept II
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 Kudos
Reply
13 Replies
dorisyan
Staff
Staff

Re: Regression in the current Pro Driver (Windows 10)

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 Kudos
Reply
mksrksh
Adept II
Adept II

Re: Regression in the current Pro Driver (Windows 10)

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 Kudos
Reply
dorisyan
Staff
Staff

Re: Regression in the current Pro Driver (Windows 10)

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

0 Kudos
Reply
mksrksh
Adept II
Adept II

Re: Regression in the current Pro Driver (Windows 10)

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 Kudos
Reply
dorisyan
Staff
Staff

Re: Regression in the current Pro Driver (Windows 10)

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 Kudos
Reply
mksrksh
Adept II
Adept II

Re: Regression in the current Pro Driver (Windows 10)

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 Kudos
Reply
dorisyan
Staff
Staff

Re: Regression in the current Pro Driver (Windows 10)

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

0 Kudos
Reply
mksrksh
Adept II
Adept II

Re: Regression in the current Pro Driver (Windows 10)

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 Kudos
Reply
dorisyan
Staff
Staff

Re: Regression in the current Pro Driver (Windows 10)

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 Kudos
Reply