Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tute can't work. May be recurse? #3

Open
xintrea opened this issue Mar 14, 2018 · 1 comment
Open

Tute can't work. May be recurse? #3

xintrea opened this issue Mar 14, 2018 · 1 comment

Comments

@xintrea
Copy link
Contributor

xintrea commented Mar 14, 2018

Hi!

I try compile and running Tute (commit 593844e).

Tute normal compile.

But first error if run tute:

WalkHistory::clear()
QML debugging is enabled. Only use this in a safe environment.
Start Tute v.  0.  0.  1
Set main program file to  "./tute"
---------------
Critical error!
---------------
"Can't set permissions to file \"/home/xi/.config/tute/mode.ini\""

I create empty file /home/xi/.config/tute/mode.ini, and run again:

$ ./tute
WalkHistory::clear()
QML debugging is enabled. Only use this in a safe environment.
Start Tute v.  0.  0.  1
Set main program file to  "./tute"
Segmentation fault

I try run in debug mode, and see very long called stack with repeat functions call.

How to run tute?

@trailblazing trailblazing transferred this issue from trailblazing/mytetra_webengine Nov 5, 2019
@trailblazing
Copy link
Owner

Hi Xintrea,

Sorry for haven't notice the issue because of the migrating from mytetra_webengine to tute.

I haven't spend much time on how to deploy and initial the application :(.

The resource file:

https://github.com/beimprovised/tute/blob/master/resource/standardconfig/any/mode.ini

That is to say, during the application's initialization, if the program can not find a file named "mode.ini" under the directory "/home/$USER/.config/tute/", it should recover the file from the resource.

And you might find the code in the file:

https://github.com/beimprovised/tute/blob/master/src/libraries/global_parameters.cpp at line number: 389 (commit "cb3e9ebd (HEAD -> tuple, origin/tuple) fix root_path operations"),

The lambda function definition:


auto permanent_root_info_to_app_data_path_system = 
        [&](QString target_root) -> bool {

......

        auto t = mode_full_name_in_app_data_path_system();
        if (!QFile(t).exists()) {
            if (!DiskHelper::qt_resource_recover(std::make_shared<QFileInfo>(t)))
                critical_error(QString("Unhandled error encountered when force copy file \"") + ":/resource/standardconfig/" + target_os() + "/" + _mode_filename + "\" to \"" + t + "\"");
        }

......

That shows that I just check the existence of the file and try to recover it.

The content of "mode.ini":

[General]
application_mode=Portable
rootdir=.

The keyword "Portable" means I always prefer to put all user data at somewhere special -- for synchronizing remotely. Another alternative keyword should be "Standard" and I never use it.

Sorry again for the inconvenience.
Good luck.

E.Y.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants