Giter VIP home page Giter VIP logo

Comments (15)

vinnnyr avatar vinnnyr commented on May 29, 2024

is it segfaulting? can you provide a bit more detail on the nature of the crash? I ask because I think I saw something similar.

from fields2cover.

jfulem avatar jfulem commented on May 29, 2024

It's pretty hard because it dies really silently. For example, when I was debugging it just to hover the mouse over the points list, the process simply exited.

from fields2cover.

Gonzalo-Mier avatar Gonzalo-Mier commented on May 29, 2024

Thanks for noticing it @jfulem.
I'm working on it. I've also noticed on the Python interface that I cannot concatenate some operations because it crash, so it's needed to do it step by step.
I'll come later with a solution or more tests (and a headache).

from fields2cover.

jfulem avatar jfulem commented on May 29, 2024

@Gonzalo-Mier, perfect. Thank you.

from fields2cover.

Gonzalo-Mier avatar Gonzalo-Mier commented on May 29, 2024

@jfulem I haven't been able to reproduce the error. I would like to ask you which GDAL and SWIG version are you using?
According to SWIG docs, version 4.1.0 solves some memory leaks on Python. You could try to improve the swig version, and check if this error still happens. Unfortunately, a few python tests fail on that version. I'll continue trying to fix it.

On the other hand, are you able to create a test on a Docker that replicates this issue? On the add_gdal_version_support branch I've update the Dockerfile to be able to modify the GDAL version at the beginning.

from fields2cover.

jfulem avatar jfulem commented on May 29, 2024

I used swing 4.0.2 and GDAL 3.4.3. I can make the test on a Docker, yes.

from fields2cover.

Gonzalo-Mier avatar Gonzalo-Mier commented on May 29, 2024

I wasn't able to replicate this issue: https://github.com/Fields2Cover/Fields2Cover/blob/fix_issue_47/tests/python/types/Path_test.py#L211-L212

I also created a docker with the same versions of your system and it works well. @jfulem, could you try to run the python tests of the branch fix_issue_47 to see if the test covers this issue correctly?

from fields2cover.

jfulem avatar jfulem commented on May 29, 2024

I will try this evening. My path contains approx. 6500 points.

from fields2cover.

Gonzalo-Mier avatar Gonzalo-Mier commented on May 29, 2024

I've updated the path on the test and it seems to also work without failure. Now it contains 173554 points. I don't know if we are missing something. Thanks for taking the time.

from fields2cover.

jfulem avatar jfulem commented on May 29, 2024

@Gonzalo-Mier, I checked the test. It looks like it's working fine. I will test it in my project using F2C for initial harvesters' path planning. But the test works fine.

from fields2cover.

Gonzalo-Mier avatar Gonzalo-Mier commented on May 29, 2024

@jfulem were you able to test it? Should I close this issue?

from fields2cover.

jfulem avatar jfulem commented on May 29, 2024

I was able to test it and it is still causing the issues. I'm trying to replicate it in the test. The problem is that I have an object which reads the field and creates the paths and the points. Then accessing X and Y from the created points from another python object basically crashes. To avoid the crash I have to do something like this:

states = list(path.states)
self.points = [item.point for item in states]
xp = [p.getX() for p in self.points] # to avoid crash
yp = [p.getY() for p in self.points] # to avoid crash

Then I can retrieve the points list in another class/object and I can iterate through the points there.

from fields2cover.

Gonzalo-Mier avatar Gonzalo-Mier commented on May 29, 2024

Hi @jfulem,
Please, try to make a unit test. I'm not able to debug it with this information. Thanks for your time

from fields2cover.

jfulem avatar jfulem commented on May 29, 2024

@Gonzalo-Mier , I tried to mimic our structure to reproduce the issue: https://github.com/jfulem/Fields2Cover/tree/fix_issue_47
But it looks like it's working just fine in the tests. So, I think the issue is somewhere else and you can probably close this issue.

from fields2cover.

Gonzalo-Mier avatar Gonzalo-Mier commented on May 29, 2024

I'll close it then. Please, feel free to re-open this issue if you find it again.

from fields2cover.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.