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
Comments
[barsch] The tests above are working on a win32 box (vista) without problems. |
[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 |
[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. |
[krischer](In [884]) The commit yesterday didn't really fix #31. Implemented different workaround but I think valgrind will complain. |
[krischer](In [905]) - Created some test files for obspy.mseed using libmseed directly. Still need to add files in different byte orders.
|
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)
}}}
The text was updated successfully, but these errors were encountered: