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

Bug in obspy.mseed.write(.., encoding=0) for small ASCII strings #31

Closed
trac2github opened this issue Sep 9, 2012 · 5 comments
Closed

Comments

@trac2github
Copy link

Working ...
{{{
from obspy.core import read, Trace, Stream, UTCDateTime
import numpy as np

data = np.fromstring("very big string with at least 17 chars", dtype='|S1')
tr = Trace(data=data)
tr.write("muh.mseed", format='MSEED', encoding=0, reclen=256)
}}}

Won't work:
{{{
data = np.fromstring("small string", dtype='|S1')
tr = Trace(data=data)
tr.write("muh.mseed", format='MSEED', encoding=0, reclen=256)
}}}

@trac2github
Copy link
Author

[barsch] The tests above are working on a win32 box (vista) without problems.

@trac2github
Copy link
Author

[krischer] Not working on 64bit OSX. But there is a different error message:

python(17624,0x7fff71022be0) malloc: *** error for object 0x10132beb0: pointer being freed was not allocated

@trac2github
Copy link
Author

[krischer](In [882]) - Libmseed does not seem to determine the size of an ascii char correctly. Implemented workaround (closes #31). I do not know why error only occured with small ASCII strings.

@trac2github
Copy link
Author

[krischer](In [884]) The commit yesterday didn't really fix #31. Implemented different workaround but I think valgrind will complain.

@trac2github
Copy link
Author

[krischer](In [905]) - Created some test files for obspy.mseed using libmseed directly. Still need to add files in different byte orders.

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

No branches or pull requests

1 participant