Page MenuHome

Duplicating window results in graphics corruption in UI
Closed, ResolvedPublic

Description

Duplicates: T24880 T24512 T24203 T24049 T23905 T22604 T21829 T19968 T20210 T21131 T20865

Steps to reproduce:
1) Open blender
2) Duplicate window
3) Close original window
4) Create another duplicate window from the remaining window

I have attached a screenshot of what the corruption looks like.

Event Timeline

Please specify operating system and graphics card, as mentioned on the bug submission page.

system specs:

Windows 7 Ultimate x64
Blender 2.50 Alpha 0 x64
ATI Radeon 3870 512 MB
4GB RAM

For anyone who wants to debug this: there was a similar problem on Linux. The problem was that the OpenGL context was associated with the first window, and got lost when closing it. Most likely the same thing happens on Windows, though I couldn't figure out from just looking at the code how to solve it.

Closed Duplicate
[#20865] Text on all new windows created are missing.
https://projects.blender.org/tracker/index.php?func=detail&aid=20865&group_id=9&atid=498

Closed a duplicate bug, which happens on opening a file:
http://projects.blender.org/tracker/?func=detail&atid=498&aid=21131&group_id=9

Should this happen regardless of graphics card? I cannot reproduce the issue.

My specs:
Ubuntu 9.04 x64 (kernel 2.6.28-17 generic) with latest NVIDA drivers
NVIDIA GeForce 9600M GS

I can't tell if this is reproducible with any gfx card, but as of build 27081 it's still easily reproducible on my machine.
Perhaps it's a Windows specific problem?

Closed duplicate report:
http://projects.blender.org/tracker/index.php?func=detail&aid=20210&group_id=9&atid=498

And yes, this is dependent on the graphics driver and only happens on Windows as far as I know, someone can try to tweak how OpenGL contexts are used there.

Idk if this is helpfull but when i run a opengl debugg on the first window I get

wglSwapBuffers(0xb6011d4f)
----->wglGetPixelFormat(0xb6011d4f)=13
----->wglGetPixelFormat(0xb6011d4f)=13 =true

then

Function wglGetPixelFormat is being called on a thread that does not have the main context
Function wglGetPixelFormat is being called on a thread that does not have the main context
Function wglGetPixelFormat is being called on a thread that does not have the main context
Function wglGetPixelFormat is being called on a thread that does not have the main context
Function wglGetPixelFormat is being called on a thread that does not have the main context
Function wglGetPixelFormat is being called on a thread that does not have the main context
Function wglGetPixelFormat is being called on a thread that does not have the main context
Function wglGetPixelFormat is being called on a thread that does not have the main context
Function wglGetPixelFormat is being called on a thread that does not have the main context
Function wglGetPixelFormat is being called on a thread that does not have the main context





Idk if this is helpfull but when i run a opengl debugg on the first window I get

wglSwapBuffers(0xb6011d4f)
----->wglGetPixelFormat(0xb6011d4f)=13
----->wglGetPixelFormat(0xb6011d4f)=13 =true

then

Function wglGetPixelFormat is being called on a thread that does not have the main context
Function wglGetPixelFormat is being called on a thread that does not have the main context
Function wglGetPixelFormat is being called on a thread that does not have the main context
Function wglGetPixelFormat is being called on a thread that does not have the main context
Function wglGetPixelFormat is being called on a thread that does not have the main context
Function wglGetPixelFormat is being called on a thread that does not have the main context
Function wglGetPixelFormat is being called on a thread that does not have the main context
Function wglGetPixelFormat is being called on a thread that does not have the main context
Function wglGetPixelFormat is being called on a thread that does not have the main context
Function wglGetPixelFormat is being called on a thread that does not have the main context





Closed duplicate report:
http://projects.blender.org/tracker/?func=detail&atid=125&aid=19968&group_id=9

Closed duplicate report (with Intel on WinXP) :
http://projects.blender.org/tracker/index.php?func=detail&aid=21829&group_id=9&atid=498

I don't get the error message Hans pasted, but instead, I have:

GL ERROR - Function glBindTexture(GL_TEXTURE_2D,1) generated error GL_INVALID_OPERATION

Hi,

Seems like a duplicate ? or something relate to this ?
http://projects.blender.org/tracker/index.php?func=detail&aid=22604&group_id=9&atid=498

- Diego

Indeed another duplicate, closed that one as well.

I can to confirm this, too.

Blender 2.5 alpha 2 64bit
Windows 7 Professional 64bit
ATI Radeon HD 4650 1GB
Driver version 8.14.10.0761, the latest version available as of now

The effect is exactly identical, there's no point in attaching a new screenshot. Blender starts fine and opens new windows without problems, but acts up when I open a previously saved file.

Is there anything I can do to aid debugging?

Confirming in behalf of Gillian here http://www.kino3d.com/forum/viewtopic.php?p=91055#91055

- open the attached blend by double-clickin on the file (see 04_milano_centrale2.zip)
- it shows as attached 04.jpeg (this if it is not opened by blender itself)
- if one opens this file from within bleneder non problem

---blender ---
* blender version: 2.5 alpha 2
* build: graphic all r'30403'

---platform ---
* operating system: Windows
* bitness: 32

--- hardware ---
* RAM: 4 GB
* Graphic card: nvidia
* Motherboard: intel quad core

--- optional ---
* screenshot: http://www.pasteall.org/pic/4634, also attached (see 04.jpg)
* blend file: attached 04_milano_centrale2.zip
* backtrace: --

----------------------------------------------------------
this is how I discoered this bug report

<jesterKing> mindrones: is that from startup?
<jesterKing> mindrones: if not, then it is probably duplicated window
<jesterKing> mindrones: for duplicated windows -> remove mainwindow, there's still troubles with that on windows
<jesterKing> mindrones: haven't found fix for that yet

<jesterKing> mindrones: does the .blend have multiple windows?
<jesterKing> neXyon: it's opengl context switching trouble
<jesterKing> neXyon: but I haven't found where it happens yet - code looks sane

<jesterKing> mindrones: ok, so when loading the UI when opening .blend I see another window is opened
<jesterKing> mindrones: I think this is another window that was duplicated from the first window, then the first window got closed and this was saved

<jesterKing> mindrones: opengl context gets somehow corrupted, but it is not clear how and where this happens
<jesterKing> mindrones: I notice that when I save again, the filesize drops from 1.5MB to 0.5MB
<jesterKing> mindrones: anyway, the way to fix is: open once without loading the UI
<jesterKing> mindrones: recreate the layout there was (but don't duplicate window and destroy main window)
<jesterKing> mindrones: then save
<jesterKing> mindrones: https://projects.blender.org/tracker/?func=detail&aid=19997&group_id=9&atid=498

Moving the report to our todo on the wiki. This and other opengl related issues on Windows will be moved there for aspiring developers to choose from.

http://wiki.blender.org/index.php/Dev:2.5/Source/Development/Todo/Install-OS/OpenGL#UI_corruption

i also have this bug when i close the main window and a console window is open and pull a new one out of it.

blender: r31807
system: windows 7 pro 64bit
GPU: NVIDIA GTX470 (258.96)

Closed duplicate https://projects.blender.org/tracker/index.php?func=detail&aid=23905&group_id=9&atid=498

Closed duplicate https://projects.blender.org/tracker/index.php?func=detail&aid=24049&group_id=9&atid=498

Closed duplicate: https://projects.blender.org/tracker/index.php?func=detail&aid=24203&group_id=9&atid=498

Closed duplicate: https://projects.blender.org/tracker/index.php?func=detail&aid=24512&group_id=9&atid=498

Closed duplicate https://projects.blender.org/tracker/index.php?func=detail&aid=24880&group_id=9&atid=498

Reopening so I can close in a moment, fix found!

Ok, fixed and committed in r34641. Yay.

Nathan Letwory (jesterking) changed the task status from Unknown Status to Resolved.Feb 4 2011, 2:34 PM