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

cdms2 seg fault on some weird types #1857

Closed
doutriaux1 opened this issue Feb 24, 2016 · 2 comments
Closed

cdms2 seg fault on some weird types #1857

doutriaux1 opened this issue Feb 24, 2016 · 2 comments

Comments

@doutriaux1
Copy link
Contributor

in the uvcmetrics code they have an attribute (temporary) that is some python class, cdms2 seg fault when creating the file attribute

@painter1
Copy link
Contributor

The attribute is :filetable. The segfault occurs when you write an object which has that attribute - cdms2 can write only its own objects, or strings or numpy objects.
The solution is to replace the filetable attribute with an id, filetable.id() which is already defined (if cdms2 barfs on this, make a string out of it, there's already a method for that). Keep a global dictionary so that we can recover the filetable from its id. There dictionary can be built where basic_filetable() is built. There are a bunch of places where we would have to replace a :filetable reference with a dictionary lookup.

@doutriaux1
Copy link
Contributor Author

@painter1 that's the solution forthe metrics package but I would like a more general solution at the cdms2 level in case somebody else try to do something similar.

dnadeau4 added a commit that referenced this issue Apr 6, 2016
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

3 participants