<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Access violation when call SetPixelFormat in Graphics</title>
    <link>https://community.intel.com/t5/Graphics/Access-violation-when-call-SetPixelFormat/m-p/1754760#M152712</link>
    <description>&lt;LI-CODE lang="cpp"&gt;static void InitPixelFormat(HDC hDC)
{
	PIXELFORMATDESCRIPTOR pixelFormatDescriptor{};
	pixelFormatDescriptor.nSize      = sizeof(PIXELFORMATDESCRIPTOR);
	pixelFormatDescriptor.nVersion   = 1;
	pixelFormatDescriptor.dwFlags    = PFD_DRAW_TO_WINDOW | PFD_SUPPORT_OPENGL | PFD_DOUBLEBUFFER;
	pixelFormatDescriptor.iPixelType = PFD_TYPE_RGBA;
	pixelFormatDescriptor.cColorBits = 24;
	pixelFormatDescriptor.iLayerType = PFD_MAIN_PLANE;

	int pixelFormat = ::ChoosePixelFormat(hDC, &amp;amp;pixelFormatDescriptor);
	ThrowIfFailed(pixelFormat != 0);

	BOOL result = ::SetPixelFormat(hDC, pixelFormat, &amp;amp;pixelFormatDescriptor);
	ThrowIfFailed(result != FALSE);
}

static void CreateWindowAndSetPixelFormat()
{
	HWND hWindow = MyCreateWindow(1, 1);

	HDC hDC = ::GetDC(hWindow);
	ThrowIfFailed(hDC != NULL);

	InitPixelFormat(hDC);

	::ReleaseDC    (hWindow, hDC);
	::DestroyWindow(hWindow);
}

int main(void)
{
	std::thread thread(CreateWindowAndSetPixelFormat);
	thread.join();

	CreateWindowAndSetPixelFormat();    // 0xC0000005 (Access violation) in igxelpicd64.dll when call SetPixelFormat

	return 0;
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When call SetPixelFormat after the thread that called SetPixelFormat has terminated,&lt;BR /&gt;an exception (0xC0000005, Access violation) occurs in igxelpicd64.dll.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Isn't this a driver bug?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I have attached some files.&lt;/SPAN&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;SPAN&gt;SSUScanInfo.txt .. Intel System Support Utility output.&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;SetPixelFormatTest .. Visual Studio Solution (Reproduction environment)&lt;/LI&gt;&lt;/UL&gt;</description>
    <pubDate>Fri, 24 Jul 2026 03:07:45 GMT</pubDate>
    <dc:creator>Yuya_Fukazawa_bn7</dc:creator>
    <dc:date>2026-07-24T03:07:45Z</dc:date>
    <item>
      <title>Access violation when call SetPixelFormat</title>
      <link>https://community.intel.com/t5/Graphics/Access-violation-when-call-SetPixelFormat/m-p/1754760#M152712</link>
      <description>&lt;LI-CODE lang="cpp"&gt;static void InitPixelFormat(HDC hDC)
{
	PIXELFORMATDESCRIPTOR pixelFormatDescriptor{};
	pixelFormatDescriptor.nSize      = sizeof(PIXELFORMATDESCRIPTOR);
	pixelFormatDescriptor.nVersion   = 1;
	pixelFormatDescriptor.dwFlags    = PFD_DRAW_TO_WINDOW | PFD_SUPPORT_OPENGL | PFD_DOUBLEBUFFER;
	pixelFormatDescriptor.iPixelType = PFD_TYPE_RGBA;
	pixelFormatDescriptor.cColorBits = 24;
	pixelFormatDescriptor.iLayerType = PFD_MAIN_PLANE;

	int pixelFormat = ::ChoosePixelFormat(hDC, &amp;amp;pixelFormatDescriptor);
	ThrowIfFailed(pixelFormat != 0);

	BOOL result = ::SetPixelFormat(hDC, pixelFormat, &amp;amp;pixelFormatDescriptor);
	ThrowIfFailed(result != FALSE);
}

static void CreateWindowAndSetPixelFormat()
{
	HWND hWindow = MyCreateWindow(1, 1);

	HDC hDC = ::GetDC(hWindow);
	ThrowIfFailed(hDC != NULL);

	InitPixelFormat(hDC);

	::ReleaseDC    (hWindow, hDC);
	::DestroyWindow(hWindow);
}

int main(void)
{
	std::thread thread(CreateWindowAndSetPixelFormat);
	thread.join();

	CreateWindowAndSetPixelFormat();    // 0xC0000005 (Access violation) in igxelpicd64.dll when call SetPixelFormat

	return 0;
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When call SetPixelFormat after the thread that called SetPixelFormat has terminated,&lt;BR /&gt;an exception (0xC0000005, Access violation) occurs in igxelpicd64.dll.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Isn't this a driver bug?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I have attached some files.&lt;/SPAN&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;SPAN&gt;SSUScanInfo.txt .. Intel System Support Utility output.&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;SetPixelFormatTest .. Visual Studio Solution (Reproduction environment)&lt;/LI&gt;&lt;/UL&gt;</description>
      <pubDate>Fri, 24 Jul 2026 03:07:45 GMT</pubDate>
      <guid>https://community.intel.com/t5/Graphics/Access-violation-when-call-SetPixelFormat/m-p/1754760#M152712</guid>
      <dc:creator>Yuya_Fukazawa_bn7</dc:creator>
      <dc:date>2026-07-24T03:07:45Z</dc:date>
    </item>
  </channel>
</rss>

