Coder Social home page Coder Social logo

Comments (4)

GhostNaN avatar GhostNaN commented on August 28, 2024

Can't say for sure, but it might not be a "could not find file" error we are dealing with. Frankly I should of just included the "ex" variable from the catch. Something like this:

       catch (filesystem::filesystem_error const& ex) {
            if (i == 3) {
                printf("Failed to find shaders folder!\n");
                throw std::runtime_error(ex.what());
                return;
            }
        }

Tell me what it spits out after including this code.

from recidia-audio-visualizer.

Lampomaniac avatar Lampomaniac commented on August 28, 2024

That left me with

what(): filesystem error: directory iterator cannot open directory: No such file or directory [/etc/recidia/shaders/]

and I fixed it by copying the shaders folder to there. Not sure why it only accepts that one path however. I made it print every path it checked and made sure they did actually exist.

image

Weird issue. But it works now, so thanks for your help!

Edit: Wait, I see what's happening. No matter if it's already found the shaders somewhere else, it will continue looking. If it doesn't find them at the last index, it will throw a runtime error no matter what.

from recidia-audio-visualizer.

GhostNaN avatar GhostNaN commented on August 28, 2024

OOOOOHHHHH.... I messed up bad, good work.
I fixed this with this commit: 4865ccc
I know it's a mess, but the solution was quite easy.

        catch (filesystem::filesystem_error const& ex) {
            continue;
        }
    }
    if (shaderFiles.size() == 0)
        throw std::runtime_error("Failed to find any shaders folder!");

If this fixed the problem please close the issue.
Thanks again.

from recidia-audio-visualizer.

Lampomaniac avatar Lampomaniac commented on August 28, 2024

That commit fixed it! :)

from recidia-audio-visualizer.

Related Issues (3)

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.