WineHQ
Bug Tracking Database – Bug 11436

 Bugzilla

 

Last modified: 2023-07-19 17:31:24 UTC  

Pepakura viewer: err:wgl:X11DRV_wglShareLists Could not share display lists, context already created !

Bug 11436 - Pepakura viewer: err:wgl:X11DRV_wglShareLists Could not share display lists, context already created !
Pepakura viewer: err:wgl:X11DRV_wglShareLists Could not share display lists, ...
Status: CLOSED FIXED
AppDB: Show Apps affected by this bug
Product: Wine
Classification: Unclassified
Component: winex11.drv
0.9.54.
x86 Linux
: P2 normal
: ---
Assigned To: Mr. Bugs
http://www.tamasoft.co.jp/pepakura-en...
: download, patch
: 12062 25419 33407 (view as bug list)
Depends on:
Blocks:
  Show dependency tree
 
Reported: 2008-02-01 20:13 UTC by Fábio Capela
Modified: 2023-07-19 17:31 UTC (History)
18 users (show)

See Also:
Regression SHA1:
Fixed by SHA1: 28233dd3bc4963e6205d33aedb665bfdb995c9c6
Distribution: ---
Staged patchset: https://github.com/wine-staging/wine-staging/tree/master/patches/winex11-wglShareLists


Attachments
Trace until the error. (16.15 KB, text/plain)
2008-02-01 20:13 UTC, Fábio Capela
Details
Small hack that solves the error message and part of the graphical corruption (620 bytes, patch)
2008-02-01 20:52 UTC, Fábio Capela
Details | Diff
New hack that should not break anything else (3.36 KB, patch)
2008-04-12 04:27 UTC, Fábio Capela
Details | Diff
console output when trying to run pepakuka viewer 3 (81.60 KB, text/plain)
2011-05-19 16:50 UTC, Olof Nord
Details
Console log (9.89 KB, text/plain)
2011-08-10 19:19 UTC, Martin Neumann
Details
Endless Space/Unity Wine patch (1.92 KB, patch)
2014-07-23 17:29 UTC, Yanis Lukes
Details | Diff
Same as "Endless Space/Unity Wine patch", but with registry key activation (4.00 KB, patch)
2014-08-23 14:16 UTC, Yanis Lukes
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Fábio Capela 2008-02-01 20:13:15 UTC
Created attachment 10567 [details]
Trace until the error.

I'm trying to run the Pepakura viewer, but it's giving an strange error on startup (error: no error) and is having some graphical glitches, as well as being extremely slow.

The grafical glitches are a flickering 3D model and no textures on the 2D model.

The bug seems to be the same one affecting Pepakura Designer 2.

The console shows an error with X11DRV_wglShareLists (err:wgl:X11DRV_wglShareLists Could not share display lists, context already created !). I've attached a wgl trace up to the moment the error dialog appears. Seems like the workaround to handle the different way to share OpenGL contexts in Windows and Linux can't handle this specific software.

The software is freeware and can be downloaded from http://www.tamasoft.co.jp/pepakura-en/download/viewer.html
Comment 1 Roderick Colenbrander 2008-02-01 20:33:14 UTC
I need to check out this app when I have time but it could be an app which we can't support on Wine :(

The problem is that GLX and WGL work slighthly differently regarding the sharing of 'display lists'. In case of GLX you share display lists at context creation time but in case of WGL you can do this at a later stage. Most apps don't do that but it appears yours does...
Comment 2 Fábio Capela 2008-02-01 20:52:23 UTC
Created attachment 10568 [details]
Small hack that solves the error message and part of the graphical corruption

I've made an experiment, inverting the arguments to X11DRV_wglShareLists, and it gets rid of the error message and restores the texture to the 2D view, although the problems in the 3D view persists.

Seems like this specific app creates its contexts in a different order than the one Wine expects.
Comment 3 Austin English 2008-02-04 14:12:01 UTC
Confirming in wine 0.9.54, kubuntu feisty.
Comment 4 Louis Lenders 2008-03-16 12:11:33 UTC
Gametap is also affected by this bug. The hack/patch seems to resolve the issue for gametap as well
Comment 5 Fábio Capela 2008-04-12 04:27:45 UTC
Created attachment 12081 [details]
New hack that should not break anything else

Another hack. This one first tries to share the context in the original order; if it can't because the destination context is already created, it inverts the original context with the destination and try again.
Might not be the optimal solution, but it should work without breaking anything.
Comment 6 Roderick Colenbrander 2008-05-01 12:10:29 UTC
*** Bug 12062 has been marked as a duplicate of this bug. ***
Comment 7 Austin English 2008-12-10 04:06:05 UTC
Still present in git.
Comment 8 Austin English 2009-01-18 09:47:52 UTC
Removing deprecated CVS/GIT version tag. Please retest in current git. If the bug is still present in today's wine, but was not present in some earlier version of wine, please update version field to earliest known version of wine that had the bug. Thanks!
Comment 9 Niko Sandschneider 2009-05-18 19:36:06 UTC
Bug still there in wine 1.1.21
Comment 10 Austin English 2010-10-01 08:47:07 UTC
Still in wine-1.3.3-417-g536fc57
Comment 11 Olof Nord 2011-05-19 16:50:16 UTC
Created attachment 34780 [details]
console output when trying to run pepakuka viewer 3

console output when trying to run pepakuka viewer 3, using wine 1.3.20 and ubuntu 11.04.
Comment 12 Martin Neumann 2011-08-10 19:19:01 UTC
Created attachment 35912 [details]
Console log
Comment 13 joaopa 2012-11-12 05:58:19 UTC
Still a bug in current wine?
Comment 14 Jerome Leclanche 2013-08-25 02:26:08 UTC
I believe it is.
Comment 15 NSLW 2013-08-30 20:19:04 UTC
Still issue in Wine 1.7.1
I tested on SolidWorks Explorer 2010.
Comment 16 Yanis Lukes 2014-07-23 17:27:34 UTC
Unity Editor has a force OpenGL rendering mode, removing DirectX as the default renderer.

To enable, the "-force-opengl" argument must follow the executable, the default would be "-force-d3d9".

This mode crashes Unity.

A player of Endless Space, which was created using Unity, created a patch to fix this bug/issue. It works, although some inner windows of Unity have their frames delayed. That is showing previous frame until some action is done. This was also an issue in Direct3D mode, but only for NVIDIA cards.
Comment 17 Yanis Lukes 2014-07-23 17:29:18 UTC
Created attachment 49085 [details]
Endless Space/Unity Wine patch

Note I am not the developer of the patch, so can't help explaining what was changed and why.
Comment 18 Yanis Lukes 2014-07-23 17:32:18 UTC
This is still an issue on Wine 1.7.22 32bit WINEARCH
Operating system - Ubuntu Desktop 14.04 (64bit)
Graphics card - NVIDIA Geforce 9600GT
NVIDIA binary driver 337.25
Comment 19 Béla Gyebrószki 2014-08-01 15:18:13 UTC
I tested Pepakura Viewer v3.05a in wine-1.7.23-33-gc654b7b.

The application starts with an error message:
'Error: invalid operation'

and terminal shows:
>fixme:dib:dibdrv_wglShareLists not supported yet

Despite of the error message, the app is started and the 2 demo objects can be opened without issues.

The hackish patch from comment #17 didn't make it any better, the error message remained on startup.

On the other hand, the patch in comment #17 fixes bug #25420 and bug #25419 for me. In addition there's a bug when you run Blender 2.7.x under Wine where some fonts are unreadable (http://forum.winehq.org/viewtopic.php?f=8&t=23200).
The patch fixes this problem too.
Could a Wine developer review this patch in case it would be acceptable?

setup_pepakura_viewer305a_en.exe
md5sum: b8287756e36c1aa790aab787fa8cf583
Comment 20 Yanis Lukes 2014-08-02 09:43:57 UTC
Since the patch has resolved other issues, this is the source of the patch Endless Space/Unity Wine patch - http://forums.amplitude-studios.com/showthread.php?4459-Question-Linux-version&p=138130&viewfull=1#post138130
Comment 21 Matteo Bruni 2014-08-04 16:27:38 UTC
(In reply to Béla Gyebrószki from comment #19)
> On the other hand, the patch in comment #17 fixes bug #25420 and bug #25419
> for me. In addition there's a bug when you run Blender 2.7.x under Wine
> where some fonts are unreadable
> (http://forum.winehq.org/viewtopic.php?f=8&t=23200).
> The patch fixes this problem too.
> Could a Wine developer review this patch in case it would be acceptable?

That patch looks to be essentially equivalent to mine from bug 33407 comment 6. I think my comment there still stands.
Comment 22 Yanis Lukes 2014-08-04 19:16:19 UTC
So can we add the patch and have it override the default behavior when a certain Registry key is assigned?

Because right now we have to use a different Wine version for running such OpenGL apps.
Comment 23 Doctor Jellyface 2014-08-13 16:00:07 UTC
It is possible to use the patch from comment #17 without recompiling wine.

You have to replace the $WINEPREFIX/windows/system32/winex11.drv file with this (https://www.dropbox.com/s/cnoietzphwqi2si/winex11.drv) file. DLL overrides are not needed.

However, the file comes from a self-compiled patched wine, which is several releases old, and it would be a good idea to recompile every version.

Also, the patch used is a hack, and although it solves some things, it breaks others. For ex. in Unity the rendering of the GUI is delayed (lagged) and makes Unity a pain to use. Also, some buttons are have slight (but visible) render errors.

As Yanis Lukes mentioned, the best thing to do would probably ship a patched and non-patched version of winex11.drv, with a registry key with the file preference, until this bug becomes officially fixed.
Comment 24 Yanis Lukes 2014-08-13 16:08:06 UTC
"the best thing to do would probably ship a patched and non-patched version of winex11.drv, with a registry key with the file preference"

That is not what I am recommending. I am recommending that the code posted in available patches to be ran by Wine if a registry key is added to the wineprefix. This is a temporary solution to OpenGL apps who have problems or crashes due to "wglShareLists" implementation.
Comment 25 Yanis Lukes 2014-08-23 14:16:51 UTC
Created attachment 49402 [details]
Same as "Endless Space/Unity Wine patch", but with registry key activation

So I have created a patch that is the same as the previous "Endless Space/Unity Wine patch", but is activated with a boolean registry key, "UseWGLShareListsHack" under "X11 Drivers" like in UsefulRegistryKeys. Use the following command to add the key(default WINEPREFIX if unspecified):

./wine reg add "HKCU\Software\Wine\X11 Driver" /v UseWGLShareListsHack /t REG_SZ /d Y

This patch should have no effect on default Wine behavior. This is a temporary solution for some applications regarding this issue, so that this patch should not be applied to every new version of Wine.

@Matteo Bruni,

Actually there is one significant change between the patches, after the script determines that "'dest' context is current.\n", your patch does "return false". For Unity3D it makes the patch to not work, so my posted patch has it commented out.
Comment 26 Bruno Jesus 2016-04-23 21:37:22 UTC
*** Bug 33407 has been marked as a duplicate of this bug. ***
Comment 27 Béla Gyebrószki 2020-06-12 16:03:00 UTC
*** Bug 25419 has been marked as a duplicate of this bug. ***
Comment 28 Michael Curran 2020-12-20 23:14:55 UTC
I'm seeing this error on a different title but the staged patchset doesn't seem to match any of the patches attached to this bug report. Is there any chance of getting one of the more advanced patches moved into staging?
Comment 29 Zeb Figura 2020-12-20 23:25:59 UTC
(In reply to Michael Curran from comment #28)
> I'm seeing this error on a different title but the staged patchset doesn't
> seem to match any of the patches attached to this bug report. Is there any
> chance of getting one of the more advanced patches moved into staging?

Is the current wine-staging patch set insufficient to fix this bug?
Comment 30 Michael Curran 2020-12-21 00:05:31 UTC
It isn't, I'm just getting the error message:

err:wgl:glxdrv_wglShareLists Recreating OpenGL context to share display lists, although the context has been current!

instead of:

err:wgl:glxdrv_wglShareLists Could not share display lists, one of the contexts has been current already !

which is consistent with the Staging changeset but not the patches.

I'm trying to run The Immortals of Terra, which doesn't look to be in WineDB.
Comment 31 Michael Curran 2020-12-21 02:17:16 UTC
I'm going to have to backtrack some, digging into it a bit further, it does look like it is getting a bit further using wine-staging. I'm thinking that the application is accessing the wrong context immediately after the the new code in Staging kicks in.
Comment 32 jpleonard12 2021-10-06 16:41:57 UTC
A similar error is present when SolidWorks 2008 crashes. This application worked great up until Wine v5.21, but now always crashes when a 3D part is opened.

0118:fixme:dib:dibdrv_wglShareLists not supported yet
Comment 34 Alexandre Julliard 2023-04-14 19:49:20 UTC
Closing bugs fixed in 8.6.
Comment 35 Michael Stefaniuc 2023-07-19 17:31:24 UTC
Removing the 8.0.x milestone from bug fixes included in 8.0.2.


Privacy Policy
If you have a privacy inquiry regarding this site, please write to [email protected]

Hosted By CodeWeavers