Git Product home page Git Product logo

Comments (6)

mathuin avatar mathuin commented on July 17, 2024

https://gist.github.com/mathuin/8d346a04016cc3082637

This is a standalone test case which demonstrates the problem without bothering with my project's internals. :-)

Jack.

from gdal.

mathuin avatar mathuin commented on July 17, 2024

I ran the test case with CPL_DEBUG set to ON, which showed me that the error I was receiving was "user terminated". This error is thrown in several places in gdal-1.11.0/alg/gdalproximity.cpp, all related to the progress function.

    if( !pfnProgress( 0.0, "", pProgressArg ) )
    {
        CPLError( CE_Failure, CPLE_UserInterrupt, "User terminated" );
        CPLFree(panTargetValues);
        return CE_Failure;
    }

and here:

        if( !pfnProgress( 0.5 * (iLine+1) / (double) nYSize,
                          "", pProgressArg ) )
        {
            CPLError( CE_Failure, CPLE_UserInterrupt, "User terminated" );
            eErr = CE_Failure;
        }

and here:

        if( !pfnProgress( 0.5 + 0.5 * (nYSize-iLine) / (double) nYSize,
                          "", pProgressArg ) )
        {
            CPLError( CE_Failure, CPLE_UserInterrupt, "User terminated" );
            eErr = CE_Failure;
        }

I am not yet sure which of these three sections of code is throwing the error.

Also, I get the error when I use gdal.DummyProgress and when I use nil for the relevant argument in the example. Don't know if that helps.

from gdal.

mathuin avatar mathuin commented on July 17, 2024

Okay, the error is occurring in the first section of code. It happens when I use nil, DummyProgress, TermProgress, or ScaledProgress.

from gdal.

martende avatar martende commented on July 17, 2024

actually callbacks are fully not working :(

from gdal.

martende avatar martende commented on July 17, 2024

Now your gist works

from gdal.

mathuin avatar mathuin commented on July 17, 2024

Awesome! Thanks so much!

Jack.

from gdal.

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.