Comments (8)
I won't be able to reproduce this under WSL2 as I don't have access to a windows machine, but I can try to reproduce it under Linux and / or macOS – I'll need an example dataset that causes the failure, though.
from convertbng.
Just as a matter of interest, are you using the (slower!) ctypes
functions for a reason? Switching to
from convertbng.cutil import convert_bng
causes the test to pass on my machine.
from convertbng.
No prob! I'm going to leave this open for now as there's clearly something wrong with my ctypes
code.
from convertbng.
To follow up, I reproduced the dev environment (including Python 3.8.5) on a native on-metal Ubuntu-18.04 machine, and I still get the same Segfault using ConvertBNG 0.6.25, so doesn't appear related to WSL2 specifically. Note that the CPUs for both machines were i7 based.
I then switched to Python 3.6.9, which was already on the machine and installed everything in a venv again - in contrast, this worked fine. After switching back to Python 3.8.5 and experimenting, I can see that it is specifically fast repeated calls that seems to trigger it (or makes more likely).
Here is a minimum working example that consistently fails:
from convertbng.util import convert_bng
lots_of_conversions = [convert_bng([-1.89983], [52.48142]) for x in range(10000)]
I had to relax the library versions to get everything installed in Python 3.6.9 - the key difference in terms of requirements for convert_bng was that the numpy version (numpy==1.19.5 for Python 3.6.9 and numpy==1.21.2 for Python 3.8.5). However, doing a minimum install of numpy and convert_bng in Python 3.8.5 still segfaulted for both versions of numpy.
Hence, I'm guessing there's an issue in the latest convert_bng wheels for python 3.8?
Happy to provide more info if needed - thank you.
from convertbng.
Well, I can trigger a segfault with that data…
from convertbng.
Perfect, your suggested change also makes everything work fine again on my side for both the test and the processing scripts!
No reason at all - in fact speed in this application isn't too important, more just the library functionality. It just hadn't occurred to me to try, thank you for the suggestion!
from convertbng.
Great, I imagine this issue won't affect too many users anyway, as it's only likely to occur when making a lot of repeated smaller calls, rather than larger batches.
Thank you for your time looking at this earlier - it's much appreciated!
from convertbng.
Hi, I can confirm the intermittent segfaults on a completely different setup (native x86_64 Arch Linux, Python 3.10.9).
Just like joshuanunn, switching to cutil
fixed this - but it was a real head scratcher until then!
from convertbng.
Related Issues (12)
- Load fails on Windows 10 x64 HOT 5
- pip install fails on Fedora with Python 3.9 HOT 6
- Error installing on Mac with python 3.9 HOT 9
- pip install fails on Python 3.9.7 (Sep 16 2021) Windows 10 HOT 5
- Ubuntu 16.04 64bit: trap invalid opcode ... in liblonlat_bng-783571af.so HOT 9
- Python 3.7 binary wheel for PyPI HOT 5
- pip install convertbng fails on Python 3.11 HOT 1
- Minor documentation typo HOT 2
- Ubuntu 18.04 64bit: Illegal instruction (core dumped) HOT 24
- Windows 10 64 bits installation trouble HOT 4
- Instructions for installation on FreeBSD please HOT 3
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 convertbng.