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

meshfill plot broekn with bg=0 #804

Closed
doutriaux1 opened this issue Oct 14, 2014 · 17 comments
Closed

meshfill plot broekn with bg=0 #804

doutriaux1 opened this issue Oct 14, 2014 · 17 comments
Assignees
Milestone

Comments

@doutriaux1
Copy link
Contributor

@doutriaux1 doutriaux1 commented Oct 14, 2014

the following script creates two different png depending if we use bg = True or not

bg=True leads to the correct output in bg mode, and incorrect in non bg mode

See attached pngs first is good and second is bad

import cdms2,vcs

bg=True

f=cdms2.open("data_portrait.nc")
s=f("variable_3")       
M=f("variable_115")

x=vcs.init()        
y=vcs.init()
x.scriptrun("mesh_bug.json")
x.setcolormap("bl_rd_12")
m=x.getmeshfill("portrait")
x.plot(s,M,m,bg=bg)
x.png("mesh_%i" % bg)
y.plot(s,M,m,bg=not bg)
y.png("mesh_%i" % (not bg))

now interestingly enough turning the bg to False leads to a core dump following this output:

radeon: Failed to allocate a buffer:
radeon:    size      : 1 bytes
radeon:    alignment : 1 bytes
radeon:    domains   : 2
radeon: Failed to allocate a buffer:
radeon:    size      : 1 bytes
radeon:    alignment : 1 bytes
radeon:    domains   : 2
Segmentation fault (core dumped)

mesh_1
mesh_0

@aashish24
Copy link
Contributor

@aashish24 aashish24 commented Oct 14, 2014

@doutriaux1 what machine is this? Is this remote or local?

@doutriaux1
Copy link
Contributor Author

@doutriaux1 doutriaux1 commented Oct 14, 2014

data and json and script can be found at:
https://github.com/doutriaux1/VTKLearning/tree/master/uvcdat_bugs

@dlonie I will need your help on this one I think.

@doutriaux1
Copy link
Contributor Author

@doutriaux1 doutriaux1 commented Oct 14, 2014

it is on my local ubuntu. Confirmed by other users (@durack1) on RH6

@allisonvacanti
Copy link
Contributor

@allisonvacanti allisonvacanti commented Oct 15, 2014

Do you both have the same graphics card? The radeon errors make me wonder if this is hardware related...

@aashish24
Copy link
Contributor

@aashish24 aashish24 commented Oct 15, 2014

what driver you are using @doutriaux1 We should be able to re-produce this bug if it is not hardware specific. @dlonie can you try the script and the data?

@allisonvacanti
Copy link
Contributor

@allisonvacanti allisonvacanti commented Oct 15, 2014

Sure. It'll be a bit before I can get to it, but sometime today.

@durack1
Copy link
Member

@durack1 durack1 commented Oct 15, 2014

I don't think this has anything to do with hardware, as it happens both on a real and virtual machine..

@allisonvacanti
Copy link
Contributor

@allisonvacanti allisonvacanti commented Oct 15, 2014

Yep, it's not hardware, I can reproduce this on my nVidia system.

@doutriaux1
Copy link
Contributor Author

@doutriaux1 doutriaux1 commented Oct 15, 2014

@dlonie I don't think it's hardware related either happens on Ubunut/RH/Mac and a VM I would be really surprising if all these computers had the exact same graphic card (although I guess it is possible)

@durack1
Copy link
Member

@durack1 durack1 commented Oct 15, 2014

One of the concerning issues too, is that exporting to different formats yields completely different graphics.. So pngs seem to look fine, thought pdf and ps files have labels rotated differently and this difference is concerning..

@allisonvacanti
Copy link
Contributor

@allisonvacanti allisonvacanti commented Oct 15, 2014

That is a known issue unrelated to this one, see #503.

@durack1
Copy link
Member

@durack1 durack1 commented Oct 15, 2014

Yeah thanks @dlonie I was aware there was already an issue open on that.. Was just too lazy to link to it..

@allisonvacanti
Copy link
Contributor

@allisonvacanti allisonvacanti commented Oct 15, 2014

The problem seems to be triggered by the call to configureEvent() (since bg has no interactor, configureEvent never gets called). Still tracking down the specifics...

@allisonvacanti
Copy link
Contributor

@allisonvacanti allisonvacanti commented Oct 15, 2014

Removing the call to self.canvas.clear() in configureEvent (VTKPlots.py 173) fixes the issue. Is this call needed?

(note, I also had to add y.scriptrun("mesh_bug.json");y.setcolormap("bl_rd_12") to the test_bg.py script to get colors correct).

allisonvacanti pushed a commit that referenced this issue Oct 15, 2014
@doutriaux1
Copy link
Contributor Author

@doutriaux1 doutriaux1 commented Oct 15, 2014

let me look into this, I think if we don't do a clear then plots never get cleared in the GUI and they get drawn on top of each other.
The real question I guess is why do we get half a plot when calling clear.

@allisonvacanti
Copy link
Contributor

@allisonvacanti allisonvacanti commented Oct 15, 2014

You're right, the clear does need to be there for the GUI. I'm guessing that the configureEvent is being called at a bad time, possibly while in the middle of building up the scene.

@doutriaux1
Copy link
Contributor Author

@doutriaux1 doutriaux1 commented Nov 10, 2014

I think this has been fixed by #873

@doutriaux1 doutriaux1 closed this Nov 10, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

4 participants