On Fri, Dec 06, 2019 at 05:03:15PM +0100, Stacho Mudrak wrote:
> If it is lxR2P.c what fails (it is off-screen rendering to pixmap - for
> large renderings) then it should be quite easy to disable it. Could you
> please somebody try to comment out following line (lxGLC.cxx:1938)?
> 
> this->m_OSC->m_r2p = R2PCreate(w, h);
> 
> then recompile loch and try whether it can start?

Yes.  I've applied slightly more nuanced version of that (which tries
to create the context, but on failure doesn't exit) and uploaded a
new debian package to unstable.  This obviously isn't a perfect fix,
but it beats loch being unusable, and if it was working for anyone
before it should still with off-screen rendering.

I've attached the patch I applied.

Cheers,
    Olly
Description: Allow loch to start without offscreen glXContext
 The call to glXCreateContext() always seems to fail.  in current sid.
 Upstream are investigating, but this is only used to render off-screen images,
 so it's better to let loch run than to give up.
Author: Olly Betts <o...@survex.com>
Bug: https://github.com/therion/therion/issues/158
Forwarded: no
Last-Update: 2019-12-06

--- a/loch/lxR2P.c
+++ b/loch/lxR2P.c
@@ -48,7 +48,9 @@
    r2pc->ctx = glXCreateContext( r2pc->dpy, r2pc->visinfo, NULL, False );
    if (!r2pc->ctx) {
       printf("Error: glXCreateContext failed\n");
+#if 0
       exit(-1);
+#endif
    }
    
 }
@@ -74,6 +76,10 @@
   if (c) {
     c->dpy = XOpenDisplay(NULL);
     R2Pmake_context(c);
+    if (!c->ctx) {
+      free(c);
+      return NULL;
+    }
     R2Pmake_pixmap(c, (unsigned int) width, (unsigned int) height);
   }
 	return c;
_______________________________________________
Therion mailing list
Therion@speleo.sk
https://mailman.speleo.sk/listinfo/therion

Reply via email to