Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

imshow lets OS X ui hang #64

Closed
GoogleCodeExporter opened this issue Sep 1, 2015 · 14 comments
Closed

imshow lets OS X ui hang #64

GoogleCodeExporter opened this issue Sep 1, 2015 · 14 comments

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
1. run the sample script http://code.google.com/p/visvis/wiki/example_overview 
(after replacing the imgae file name)
2. The entire(!) OS X user interface hangs indefinitely 

Looking a bit deeper into it, one finds that commenting out the line 21/22 
fixes the problem (but no image)



What version of the product are you using? On what operating system?
Version is 1.7

Please provide any additional information below.
Environment is OS X, Python 2.7.3 64bits, Qt 4.7.4, PySide 1.1.0 on Darwin 
10.8.2

Original issue reported on code.google.com by christop...@gmail.com on 14 Dec 2012 at 4:38

@GoogleCodeExporter
Copy link
Author

Did you mean line 41/42? Please quote the line as well, because I can hardly 
image you mean "line1 = vv.plot(x, y, ms='.', mw=4, lw=2)".


Original comment by almar.klein@gmail.com on 14 Dec 2012 at 7:07

@GoogleCodeExporter
Copy link
Author

sorry, my mistake. I wanted to say lines 15/16:

  texture2d = vv.imshow(im)
  texture2d.interpolate = True # if False the pixels are visible when zooming in

actually the second line never gets called...

Original comment by christop...@gmail.com on 15 Dec 2012 at 2:26

@GoogleCodeExporter
Copy link
Author

I suspected it was the 3D volume being rendered in software. But it's the 2D 
texture? Strange ... 

So if you comment these two lines the example works fine, and you see a volume 
too?

Can you try running just:

  vv.imshow(vv.imread('lena.png'))


Original comment by almar.klein@gmail.com on 15 Dec 2012 at 3:05

@GoogleCodeExporter
Copy link
Author

Yes, when I comment those lines the entire program works fine and I get the
3D rendered pot and the lines that were supposed to go on top of the 2D
texture. Everything works interactive.


the mouse pointer moving) I have to hard shut down.

Original comment by christop...@gmail.com on 16 Dec 2012 at 7:07

@GoogleCodeExporter
Copy link
Author

I think some lines did not make it when you send your previous comment.

Original comment by almar.klein@gmail.com on 16 Dec 2012 at 11:02

@GoogleCodeExporter
Copy link
Author

Can you print "im.shape" for me, just to be sure?

Original comment by almar.klein@gmail.com on 16 Dec 2012 at 11:04

@GoogleCodeExporter
Copy link
Author

In [2]: import visvis

In [3]: im=visvis.imread('/Users/christoph/Desktop/China/P1090293.jpg')

In [4]: im.shape
Out[4]: (3072, 2304, 3)

In [5]: 

Original comment by christop...@gmail.com on 17 Dec 2012 at 11:35

@GoogleCodeExporter
Copy link
Author

It's still a bit unclear to me ...
Is this the image on which your system hangs? And does it also hang on the Lena 
image?
(vv.imread('lena.png') should just work, because the image comes with visvis.)

Original comment by almar.klein@gmail.com on 18 Dec 2012 at 8:30

@GoogleCodeExporter
Copy link
Author

sorry, i was installing from pip and did not look for the examples and 
resources folder. That's why I used the code from the web site and my own 
image. 

Running examples/overview.py gives the same hang.


Original comment by christop...@gmail.com on 18 Dec 2012 at 4:58

@GoogleCodeExporter
Copy link
Author

Did you say you have to reboot when it happens? This makes testing a bit 
awkward. I'll throw some ideas at you. If you feel like testing them, that 
would be great. If not, no hard feelings.

You say your whole interface hangs, this smells like a shader program running 
for a long time. This would be weird though, as the shader for 2D textures is 
not nearly as performance intensive as that for the 3D texture.

Could you try with the shading turned off:
import visvis as vv
im = vv.imread('lena.png')
t = vv.imshow(im)
t.shader._program._usable = False  # Turns shader off
app = vv.use()
app.Run()

Run this as a script. Not line by line, otherwise the line following imshow 
won't have a chance to execute. 



Original comment by almar.klein@gmail.com on 19 Dec 2012 at 10:17

@GoogleCodeExporter
Copy link
Author

As you said, I am not very keen on doing a lot of experiments. Hard shutdowns 
are nothing nice. Anyway, if I get bored at some point, I will try what you 
propose. Yet I find it weird that a library that is part of the OS can make the 
entire interface hang... maybe I should file a ticket with apple...

but I like your vvmovie package (which is what I wanted, when I installed your 
library in the first place). Nice work.
Cheers,
Christoph

Original comment by christop...@gmail.com on 20 Dec 2012 at 5:00

@GoogleCodeExporter
Copy link
Author

Note that the vvmovie part will probably be moved to imageio 
(imageio.readthedocs.org) at some point.

Original comment by almar.klein@gmail.com on 20 Dec 2012 at 10:55

@GoogleCodeExporter
Copy link
Author

I am now running visvis 1.8 on Python 2.7.3 64bits, Qt 4.8.4, PyQt4 (API v2) 
4.9.4 on Darwin. It seems like things have been fixed (somehow...) thanks for 
the nice package.

Original comment by christop...@gmail.com on 16 May 2013 at 10:17

@GoogleCodeExporter
Copy link
Author

Great! Marking as fixed.

Original comment by almar.klein@gmail.com on 17 May 2013 at 7:29

  • Changed state: Fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant