Builder create_from_file throwing exception



Hi Everyone!
I am a GSoC 2020 student developer working with Inkscape this year for the feature command palette (that will help you to find operation you can perform).

I plan to use glade for UI designing. But Gtk::Builder::create_from_file(...) throws error basic_string::_M_construct null not valid

Files in question:
Glade file:
https://gitlab.com/rathod-sahaab/inkscape/-/blob/command-pallete/share/ui/command-palette-main.glade

CPP
https://gitlab.com/rathod-sahaab/inkscape/-/blob/command-pallete/src/ui/dialog/command-palette.cpp#L30

Code block in question (current code, a bit different from repo)

    {
        auto gladefile = get_filename_string(Inkscape::IO::Resource::UIS, "command-palette-main.glade");
        // TODO: fails
        try {
            _builder = Gtk::Builder::create_from_file(gladefile, "CPBase");
        } catch (const Glib::Error &ex) {
            std::cerr << ex.what() << ex.domain() << std::endl;
            g_warning("Glade file loading failed for command palette dialog");
            return;
        }
    }
The file is loaded found but the error basic_string::_M_construct null not valid
Pops up.
Please suggest a solution or what could be the problem, other than ditching glade(backup plan).

Thanks and regards,
Abhay



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]