Comments (5)
No worries. Thanks for the report. Valgrind is awesome for this kind of thing, keeps C honest until we wholesale move to Rust...
from libmseed.
Thanks. Is this on current master
branch or some other tagged release?
from libmseed.
Hey Chad, this is on the current master. I think the issue may have existed for at least a few months on libmseed v3. Unfortunately, I was tracking a problem with my codes, valgrind complained, so I just pulled the latest from the master hoping the problem would magically disappear. I didn't note my previous libmseed3 version. Sorry!
from libmseed.
Related. Apologies for a terrible bug report, this is from memory.
When:
ms3_readtracelist(
without UNPACKDATA
and then again with UNPACKDATA
I think I saw datasamples
alloc
'd twice, leaving a dangling pointer from the first call.... or maybe some other memory bug that valgrind should easily catch.
I meant to make a proper case report, and PR, but alas, time.
from libmseed.
I'm pretty certain that the lack of initialisation of fpos
on line 675 of fileutils.c
has been causing errors for me, and that initialising it to 0 fixes those issues.
For background, I'm wrapping libmseed in a Julia package, and I have several tests calling ms3_readtracelist
a total of I guess ~100 times. My tests were failing on certain machine and architecture combinations, with files not being read properly. (See e.g. https://github.com/anowacki/LibMseed.jl/runs/5971465915?check_suite_focus=true for error messages logged by libmseed amongst all the Julia stuff.) In short, calls to ms3_readtracelist
for data which had just been written by msr3_writemseed
and existing test data were returning a MS_NOTSEED
error, even though the files were valid miniSEED on disk, and other OS-architecture combinations were working.
Initialising fpos
to 0 as suggested by @bakerb845 fixes these problems for me (e.g., https://github.com/anowacki/LibMseed.jl/runs/5981051328?check_suite_focus=true), so I wonder if you might want to include this change in a future version of libmseed soon? I have submitted a PR to this effect (#80), but please do feel free to close that and deal with this as you see fit.
from libmseed.
Related Issues (20)
- SCNd64 issue with CRAN for Windows HOT 7
- New release? HOT 2
- HTTP Range header must support start of 0 for parsed ranges
- Print bit sets in most-significant bit first order, matching binary number representation
- Conform to miniSEED 3 specification and add tests HOT 1
- Store leap second list internally, loading a new list optionally
- Planned SIMD support HOT 12
- Writing miniSEED file with example script gives file in unknown format HOT 1
- Missing `extraheaders.h` in `develop` branch HOT 1
- `MS3Record.record` and const HOT 2
- Pointer to non-const object and pack facilities HOT 6
- Semantic versioning (API stability) HOT 2
- Insufficient buffer to generate SID from v2 record and bad error message
- Maximum record length validation when packing header HOT 3
- leap second file HOT 5
- Maximun number of sampels per record HOT 3
- Improve formatting of gap list printing
- Semantic versioning (again) HOT 2
- print crc on invalid parsing
- Missing man pages HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from libmseed.