Subject: Image inverted when displayed via x2go

From: Toby Darling <[email-masked]>
Date: Tue, 9 Feb 2016 16:47:34 +0000

Package: x2goclient
Version: 4.0.1.4

My users have an application[1] that when run under x2go inverts the 
image it is displaying. There is a comparative screen shot 
e2boxer-inverted.png at 
https://drive.google.com/folderview?id=0B-6ks0UHchgjTUpxSkRwd1FLa2s&usp=sharing 

The window on the left is through x2go and on the right is native.
(I've added the red boxes and text to clarify what appears to be random 
splodges.)

We've reproduced this discrepancy on Scientific Linux 6.7, MacOS 10.6 
and MacOS 10.9. When run natively, the image is displayed correctly.

x2goserver is version 4.0.1.19 running on Scientific Linux 6.7

[1] EMAN2 from 
http://ncmi.bcm.tmc.edu/ncmi/software/software_details?selected_software=counter_222

The downloadable EMAN2 gzip file contains all the software required to 
run e2boxer.py - the program that exhibits this problem, no build or 
config is necessary. The sample input file 
Falcon_2016_02_02-09_10_45_cor.mrc is at the same link as the screen 
shot. Once EMAN2 is unpacked run:

#-- 8< --#

#!/bin/bash

EMAN2DIR=<inst_dir>/EMAN2

export EMAN2DIR
export PATH=$EMAN2DIR/bin:$PATH
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$EMAN2DIR/lib
export PYTHONPATH=$PYTHONPATH:$EMAN2DIR/lib

echo "******************"
which e2boxer.py
echo "******************"

e2boxer.py Falcon_2016_02_02-09_10_45_cor.mrc

#-- 8< --#

Many thanks for the awesome work you do keeping this software going!

Cheers
Toby
-- 
Toby Darling, Scientific Computing (2N249)
MRC Laboratory of Molecular Biology
Francis Crick Avenue
Cambridge Biomedical Campus
Cambridge CB2 0QH
Phone 01223 267070

---

From: Stefan Baur <[email-masked]>
Date: Wed, 10 Feb 2016 17:45:06 +0100

Am 09.02.2016 um 17:47 schrieb Toby Darling:

> Toby Darling, Scientific Computing (2N249) MRC Laboratory of
> Molecular Biology Francis Crick Avenue Cambridge Biomedical Campus

Toby,

are you aware that X2Go has several compression settings for images,
and some of them are "lossy", i.e. they may show artifacts where in
reality there is nothing, or show nothing where in reality there is a
minuscule spot?

If you're using images displayed through X2Go for clinical purposes
(deciding whether a certain patient requires a surgery etc.), you
should absolutely make sure that you're using a lossless compression
or no compression at all, or else you might be seeing things that
aren't actually there, or missing things that are there.
(This isn't specific to X2Go - it's something to keep in mind with all
remote desktop/remote application solutions.)

For your actual bug report, it would be helpful to know if the
"flipped image" (it's not color-inverted, it's mirrored along the X
axis) issue only occurs with one, or with all available algorithms.

<shameless plug>
X2Go also has a commercial side, where various companies - including
my own - offer support contracts with guaranteed response times as
well as consultancy and paid-for development work if someone wants to
see a bug fixed or a new feature added in a certain time frame.

What makes my company special is, IMHO:
1) I'm the current X2Go Project/Community Coordinator, so the
   development lead and the developers tend to listen to me.
2) As far as I know, we are the only company providing X2Go support
   that isn't a one-man-show.
3) We sub-contract other developers from the X2Go community on demand,
   so you only have one person you need to talk to - me - and you will
   only receive one invoice, even if the task involved several freelance
   or part-time X2Go developers.

Our hourly rate for consultancy work and fixing issues outside of a
support contract is 110 EUR.
With a support contract, you get guaranteed response times (starting at
400 EUR/month for 24h response time during business hours in the
CET/CEST time zone from Monday to Friday, German holidays excluded)
and lower hourly rates if you buy a certain amount of hours in advance.
</shameless plug>

Kind Regards,
Stefan

- -- 
BAUR-ITCS UG (haftungsbeschränkt)
Geschäftsführer: Stefan Baur
Eichenäckerweg 10, 89081 Ulm | Registergericht Ulm, HRB 724364
Fon/Fax 0731 40 34 66-36/-35 | USt-IdNr.: DE268653243

---

From: Toby Darling <[email-masked]>
Date: Thu, 11 Feb 2016 15:20:12 +0000

Hi Stefan

Many thanks for your reply.

> If you're using images displayed through X2Go for clinical purposes

No worries on that score, it's just [not so] simple biology.

> axis) issue only occurs with one, or with all available algorithms.

You are correct that the image inversion is is along the x-axis. The 
colour/shading is correct.

I've not been able to fix the inversion having tried with 16m, 16m-png, 
16m-rdp, 16m-tight, 8-tight, 8 and 8-png (I hope that's enough for a 
representative sample)

What I have now found is that an earlier version of the software (EMAN2 
2.0) *does* get displayed correctly through x2go. I've narrowed this 
further to version 2.07 is OK when displayed via x2go, while version 2.1 
exhibits the inversion.

Cheers
Toby

---

From: Mike Gabriel <[email-masked]>
Date: Thu, 11 Feb 2016 21:43:26 +0000

Hi Toby,

On  Do 11 Feb 2016 16:20:12 CET, Toby Darling wrote:

> I've not been able to fix the inversion having tried with 16m,  
> 16m-png, 16m-rdp, 16m-tight, 8-tight, 8 and 8-png (I hope that's  
> enough for a representative sample)
>
> What I have now found is that an earlier version of the software  
> (EMAN2 2.0) *does* get displayed correctly through x2go. I've  
> narrowed this further to version 2.07 is OK when displayed via x2go,  
> while version 2.1 exhibits the inversion.
>

Is the source code of the referenced software online? Is it free  
software? If yes, there is a chance we can look at changes in that  
software.

Also, does the software dynamically link in shared libraries? Or has  
it been built statically?

I guess that there is a flaw in nx-libs that gets triggered by your  
application. If we could generate diffs of the different EMAN2 2.0  
versions, we might be able to track down the cause for the mirroring  
effect.

Mike
-- 

DAS-NETZWERKTEAM
mike gabriel, herweg 7, 24357 fleckeby
fon: +49 (1520) 1976 148

GnuPG Key ID 0x25771B31
mail: [email-masked], http://das-netzwerkteam.de

freeBusy:
https://mail.das-netzwerkteam.de/mailxchange/kronolith/fb.php?u=m.gabriel%40das-netzwerkteam.de

---

From: Toby Darling <[email-masked]>
Date: Fri, 12 Feb 2016 08:21:49 +0000

Hi Mike

>> (EMAN2 2.0) *does* get displayed correctly through x2go. I've narrowed
>> this further to version 2.07 is OK when displayed via x2go, while
>> version 2.1 exhibits the inversion.
>>

Fortunately, it is.

2.1 : http://ncmi.bcm.edu/ncmi/software/counter_222/software_129
2.07: http://ncmi.bcm.edu/ncmi/software/counter_222/software_122

> Also, does the software dynamically link in shared libraries? Or has it
> been built statically?

It's all python code and it ships with its own python 2.7.x

> versions, we might be able to track down the cause for the mirroring

I did have a look, unfortunately, my python-fu is weak. I do notice that 
the python version went from 2.7.2 -> 2.7.3.

Cheers
Toby