Comments (2)
I found several problems in the SpecFile C library:
SfAllLabels
returns a non zero error status when parsing a#L
line in an empty scan. My workaround is to catch the generatedIndexError
and manually parsing the#L
line (splitting on double-spaces)SfData
causes aSegmentation Fault
when trying to retrieve data from an empty scan. My workaround is to look for a#C
line containing the stringaborted after 0 points
in the scan header. I'm not sure if this is a reliable safeguard, maybe it depends on the SPEC version used to write the file. An alternative method is to try to read a single data column withSfDataColumnByName
(which doesn't cause a segfault) before callingSfData
, but I suspect this would affect performance more than testing the scan header for a#C
line.
from silx.
SfData
doesn't directly cause the segmentation fault, but it doesn't seem to allocate memory for data_info
in case there are no data points. Accessing data_info[0]
caused the segfault. I fixed the bug in a cleaner way by checking <long>data_info != 0
before accessing the array.
from silx.
Related Issues (20)
- overriding the match ratio in opencl/sift/match.py HOT 1
- h5py_utils fork deprecation warning
- Building `silx` against development version of numpy HOT 2
- `noexcept clause is ignored` warning in Cython code HOT 3
- Add `Tiled` data sources to browse Bluesky runs HOT 8
- Warning in Cython compilation HOT 3
- [2.1.0] Debian build and how to skip ascent downloading ? HOT 4
- How can I copy the data in Raw view? HOT 2
- silx view - HDF5view - improve scroll area HOT 1
- silx.gui.dialog GroupDialog and DatasetDialog are missing an API to select an hdf5 entity
- Add a 'auto' imagej like option HOT 2
- silx view: Large 2D datasets are open HOT 2
- Documentation: Describe conda packaging
- [ExternalResources] Allow to set `_data_home`
- tests failures against Pytest 8.2.0 HOT 4
- Issue with DataViewer when removing views HOT 1
- addCurve advances color index even if color is provided HOT 3
- CI random failure in TestImageFileDialogInteraction.testClickOnBackToParentTool test
- Lineplot window doesn't open on Wayland HOT 1
- [2.1.0] pointer ‘peaks0’ may be used after ‘realloc’ [-Wuse-after-free] 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 silx.