On 14/03/2019 06:16, Anthony J. Bentley wrote:
Stuart Henderson writes:
One thing I noticed
when running it for a quick test though, if I use "-d OGL" I immediately get
a crash, do you see that too?

$ magic -d OGL
X Error of failed request:  BadValue (integer parameter out of range for oper
ation)
   Major opcode of failed request:  155 (GLX)
   Minor opcode of failed request:  3 (X_GLXCreateContext)
   Value in failed request:  0x0
   Serial number of failed request:  1127
   Current serial number in output stream:  1144

I see the same, including with software rendering (LIBGL_ALWAYS_SOFTWARE=1).


Well, I have to admit: I use Magic since -uh, 1998?- a very long time and I was not aware of GLX rendering! Ok, I know, man pages are always good readings...

So, I've tracked it down; it seems that the problem has to do with direct rendering; applying the following trivial patch:

Index: graphics/grTOGL1.c
--- graphics/grTOGL1.c.orig
+++ graphics/grTOGL1.c
@@ -303,7 +303,7 @@ GrTOGLInit ()
/* TRUE = Direct rendering, FALSE = Indirect rendering */
     /* (note that direct rendering may not be able to deal with pixmaps) */
-    grXcontext = glXCreateContext(grXdpy, grVisualInfo, NULL, GL_FALSE);
+    grXcontext = glXCreateContext(grXdpy, grVisualInfo, NULL, GL_TRUE);
/* Basic GL parameters */

you should be able to get the OpenGL window. Unfortunately, this is not enough; the GUI is barely usable: moving the box, its previous image is left behind, instead to be erased and redrawn on each move or reshape operation. So this is a no-go for the distribution version (8.1 branch).

We could simply disable the OpenGL rendering, as suggested by Stuart, but after having seen how much better the rendering is, I would consider this a significant limitation, particularly for medium to complex layouts.

The alternative is to switch to the development version (8.2 branch). There, the crash has gone and the GUI is pretty usable, provided that we enable the cairo off-screen rendering (otherwise the toolbar buttons are blank or contain random trash bits).

Please note that both GUI misbehaviours have been reported by the author in an old email thread [1], even if the topic was the usage of Magic on OS-X.

In a first time, I wasn't keen to switch to 8.2, because I tried to follow the development branch a couple of years ago and the code was very unstable. But from the website I see that

"As of revision 25, the Cairo graphics interface code is complete and the code base is reasonably stable"

so maybe we could try with the most recent release.

Anthony, you aren't against the use of this "beta" code, are you?

One thing I'm still not able to use is the 3d feature: if you launch the command "specialopen wind3d" when an existing layout is open, some garbage appears in the existing window; if you try the same command when no layout is loaded, the program segfaults. I'll report this upstream soon.

Please find attached a tarball for 8.2.100 release, lightly tested on amd64.

Let me know what you prefer to do.

[1] http://opencircuitdesign.com/pipermail/magic-dev/2012/000583.html

--
Alessandro DE LAURENZIS
[mailto:[email protected]]
Web: http://www.atlantide.t28.net
LinkedIn: https://www.linkedin.com/in/delaurenzis/

Attachment: magic.tar.gz
Description: application/gzip

Reply via email to