I have installed Tonfotos on my MX Linux (KDE) desktop. The installation seems to have worked properly in that it completed and there is a application icon. Whenever I run Tonfotos it starts and the folder scan progress bar gets to about 50%, 5 - 10 seconds, then it just disappears. There is no error message, no indication of a problem, it just vanishes. Any advise would be appreciated.

Gordo

    The log file has been sent by email.

    Thank you for all of the help you provided.

    Gordo

    24 days later

    Hi Andrey,

    just installed tonfotos on my old MacBook Air (Intel dual core i5 @ 1.3 GHz, 4 GB RAM, Elementary OS 5.1.7 Hera). I see the same behaviour. It doesn’t matter whether I try to scan a folder on the internal SSD (125 GB, 40 GB free, Photos folder ~ 6 GB) or an external USB SSD.

    After about 20 seconds tonfotos stops. RAM use never exceeds 50%, CPU use remains below 50 %, too.

    The log file in ~/Downloads shows the app’s activity but no error messages. All works well, then stops. And resumes when I restart the app. However it would take hundreds of restarts until the scan is complete.

    Kind regards,
    Christoph

      christoph based on what you describe, it seems that there is a crash inside of one of native libraries that I use in my app, something like access violation. Otherwise there would be some kind of error message at least.

      Based on the crash dump analysis on Windows, latest versions app only crash this way if memory chunk fails to allocate. However, that might not be the case here, as you indicate that memory is 50% free all the time.

      Another frequent reason for not working on Linux - some incompatibility with system libraries, though I doubt that is the case here, as app would just not start at all.

      Let me be 100% honest with you here. Unless this is some mainstream distro like Ubuntu, there is no chance I will be able to allocate resources for reproducing this issue in my lab and debug it. There are literally millions of different unique HW+OS combinations, so resources and effort spent for fixing issue on one of them will have zero effect on other users with different unique combination. So I just can’t afford it, I’m sorry. All I can do in situations like that is to say how sorry I am, assume that this is just another combination that my software does not support, and move on. And refund the customer of course.

      Every time I feel very bad that I can’t help, but indeed there is not much I can do apart from general advice like check the tire pressure, wipe the windshield and make sure you are not on the parking brake. Most of the time users have much more expertise in their system than I can offer, and once in a while they can find the solutions themselves. I guess this is the way. There will always be systems on which my app will not work, probably plenty of them. Not much I can do about it.

      Probably you saw this popular video where Linus Torvalds talks why it is a nightmare to make software for Linux, even for himself. If not, please check it out, it explains a lot:

      Andrey changed the title to (Linux) Tonfotos stops 5 - 10 seconds after launching. .
      12 days later

      Hi Andrey,

      your answer is very much appreciated. I understand you and Linus Torvalds completely. However, may I send you my syslog file just once, please? Maybe you can give me a hint how I can repair my system.

      Kind regards,
      Christoph

        christoph OK, good news. It could be the same issue that some other users has experienced. On some systems there could be similar error, and program would write into console following line:

        ***MEMORY-ERROR***: tonfotos[45666]: GSlice: assertion failed: sinfo->n_allocated > 0

        Funny enough, if you would use built-in debug logging mechanism of Tonfotos, that error would not show in it’s logs, as it originates from system library, not from the software itself.

        Good news is though this bug is not unique to Tonfotos and affects other applications too. And what is most interesting, there is already a workaround by setting environment variable, as discussed here:
        https://unix.stackexchange.com/questions/281523/tshark-memory-error-6265-gslice-assertion-failed-sinfo-n-allocate
        Just recently I got confirmation from one user, that he managed to fix this issue by setting this variable and now Tonfotos works fine on his system.

        There is chance that in your case this is the same issue, so I would ask you to play with the solution described by the link above and let me know about the results.

        Dear Andrey,

        SUCCESS! Thank you very much indeed! My situation was exactly as you described.

        This is what I did: I started the App from the command line:

        $ tonfotos

        It worked for a minute or so, giving all its status messages. Those ended with

        ***MEMORY-ERROR***: tonfotos[32213]: GSlice: assertion failed: sinfo->n_allocated > 0

        After issuing

        $ export G_SLICE=always-malloc
        $ tonfotos

        all worked flawlesssly.

        To make the change permanent I added the environment variable definition to /etc/environment simply by appending G_SLICE=always-malloc to that file. After restarting the computer and tonfotos (now via the GUI) all is fine and tonfotos is just now indexing thousands of photos from my external SSD.

        Kind regards,
        Christoph

        PS: My system: Linux Elementary OS 5.1.7 Hera (based on Ubuntu 18.04 LTS).

          christoph
          Brilliant! This solved it for me on my new Deb workstation - all set and flawless now, thank you for sharing.

          -Cheers!

            5 months later

            InsulinAddict I will summarise here step-by-step instruction for others, who are not that fluent with command-line. First, type in the terminal following line:

            sudo nano /etc/environment

            It will first ask you for your password so it can edit system file, and then open an editor, you need to add line G_SLICE=always-malloc to the file, press “Control+S” to save and “Control+X” to exit.

            source /etc/environment
            echo $G_SLICE

            First line will force newly edit file to be executed, and last line will show contents of variable after that. If everything went well, it will out always-malloc. For this option to take system-wide effect, you need to restart your computer.

            That should do the trick and make GSlice: assertion failed: sinfo->n_allocated > 0 problem go away.

            Write a Reply...