Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(595)

Issue 2217043: Trying to fix bug crash when eglCreateWindowSurface is called and CreateDevic...

Can't Edit
Can't Publish+Mail
Start Review
Created:
15 years, 7 months ago by apatrick1
Modified:
15 years, 7 months ago
Reviewers:
dgkoch
CC:
angleproject-review_googlegroups.com
Base URL:
http://angleproject.googlecode.com/svn/trunk/
Visibility:
Public.

Description

Trying to fix bug crash when eglCreateWindowSurface (or any other code that causes createDevice to be invoked) is called and CreateDevice reports DEVICELOST or NOTAVAILABLE. This was a Windows XP service pack 3 box. 0x10002545 [libegl.dll - display.cpp:340] egl::Display::createDevice() 0x10002912 [libegl.dll - display.cpp:468] egl::Display::getDevice() 0x01d6a80f [chrome.dll - gpu_info_collector_win.cc:29] gpu_info_collector::CollectGraphicsInfo(GPUInfo *) 0x01d68eca [chrome.dll - gpu_thread.cc:104] GpuThread::OnEstablishChannel(int) Previously createDevice only checked for out of memory and the ASSERT(SUCCEEDED(result)) has no effect in release builds. I simulated the failure in a debugger and discovered a second place where a null dereference would occur in this case. I don't think this crash is technically correct but it prevents crashes.

Patch Set 1 #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+592 lines, -589 lines) Patch
M src/libEGL/Display.cpp View 1 chunk +587 lines, -589 lines 2 comments Download
M src/libEGL/Surface.cpp View 1 chunk +5 lines, -0 lines 0 comments Download

Messages

Total messages: 2
apatrick1
Another one for you Daniel. Thanks, Al
15 years, 7 months ago (2010-09-16 22:12:37 UTC) #1
dgkoch
15 years, 7 months ago (2010-09-17 20:09:34 UTC) #2
looks good other than the couple comments

http://codereview.appspot.com/2217043/diff/1/src/libEGL/Display.cpp
File src/libEGL/Display.cpp (right):

http://codereview.appspot.com/2217043/diff/1/src/libEGL/Display.cpp#newcode325
src/libEGL/Display.cpp:325: }
you might also want to put an explicit check for D3DERR_DEVICELOST up here as
well, since there is not point in trying to create the other type of device it
the device is really lost.

http://codereview.appspot.com/2217043/diff/1/src/libEGL/Display.cpp#newcode331
src/libEGL/Display.cpp:331: if (FAILED(result))
this seems reasonable.   Perhaps we should also put an assert in here based on
the old conditions (to help tracking issues down in debug builds?).
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b