Loaded Evolution found gjs repeat calls from ding.js overloaded memory froze 21.04

Bug #1954478 reported by George
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
evolution (Ubuntu)
New
Undecided
Unassigned

Bug Description

ubuntu20041:/<email address hidden>$ ding.js

Kept incrementing blocks of memory using gjs. I would include a JPG of the system monitor showing gjs at 2.8GB of memory usage before the operating system stopped working.
In the file listed below I did edit the file so my computer is now running smoothly and the gjs is no longer showing in the system monitor as the highest use of memory.

*#!/usr/bin/env gjs

/* DING: Desktop Icons New Generation for GNOME Shell
 *
 * Copyright (C) 2019 Sergio Costas (<email address hidden>)
 * Based on code original (C) Carlos Soriano
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, version 3 of the License.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program. If not, see <http://www.gnu.org/licenses/>.
 */

* imports.gi.versions.Gtk = '3.0';
* const Gtk = imports.gi.Gtk;
* const Gio = imports.gi.Gio;
* const GLib = imports.gi.GLib;

*let desktops = [];
*let lastCommand = null;
*let codePath = '.';
*let errorFound = false;
*let asDesktop = false;
*let primaryIndex = 0;

*for(let arg of ARGV) {
    if (lastCommand == null) {
        switch(arg) {
        case '-E':
            // run it as a true desktop (transparent window and so on)
            asDesktop = true;
            break;
        case '-P':
        case '-D':
        case '-M':
            lastCommand = arg;
            break;
        default:
            print(`Parameter ${arg} not recognized. Aborting.`);
            errorFound = true;
            break;
        }
        continue;
    }
    if (errorFound) {
        break;
    }
    switch(lastCommand) {
    case '-P':
        codePath = arg;
        break;
    case '-D':
        let data = arg.split(":");
        desktops.push({x:parseInt(data[0]), y:parseInt(data[1]), width:parseInt(data[2]), * height:parseInt(data[3]), zoom:parseFloat(data[4])});
        break;
    case '-M':
        primaryIndex = parseInt(arg);
        break;
    }
    lastCommand = null;
}

*if (desktops.length == 0) {
    /* if no desktop list is provided, like when launching the program in stand-alone mode,
     * configure a 1280x720 desktop
     */
    desktops.push({x:0, y:0, width: 1280, height: 720, zoom: 1});
}

// this allows to import files from the current folder

imports.searchPath.unshift(codePath);

*const Prefs = imports.preferences;

*const DesktopManager = imports.desktopManager;

*if (!errorFound) {
    Gtk.init(null);
    Prefs.init(codePath);
    var desktopManager = new DesktopManager.DesktopManager(desktops, codePath, asDesktop, * primaryIndex);
    Gtk.main();
    // return value
    0;
} else {
    // return value
    1;
}

Revision history for this message
George (george.tucker2016) wrote :
Daniel Manrique (roadmr)
affects: canonical-identity-provider → evolution (Ubuntu)
Revision history for this message
Sergio Costas (rastersoft-gmail) wrote :

Can you put the specific changes that you did to the code?

Revision history for this message
George (george.tucker2016) wrote : Re: [Bug 1954478] Re: Loaded Evolution found gjs repeat calls from ding.js overloaded memory froze 21.04

Hi Sergio;

I just run chown then ran chmod 777 so I
could edited the entire code *# out of the
ding.js. I am a very inexperienced
programmer. I studied C, C++, J++, Python
2 and 3 but I never built a file for a
program. I did desktop support for 20
years: Macintosh, PC -DOS, Windows form
2.0 to current windows 10, NTFS, OS/2,
Unix using SMIT, Linux, UBUNTU but I would
need many hour of troubleshooting to find
what the problem is with the current
Ding.js and why it constantly repeats the
call to run GJS in an infinite loop. The
program can still call ding.js but nothing
will run .

Cheers
George Tucker Retired

-----Original Message-----
From: Sergio Costas
<email address hidden>
Reply-To: Bug 1954478
<email address hidden>
To: <email address hidden>
Subject: [Bug 1954478] Re: Loaded
Evolution found gjs repeat calls from
ding.js overloaded memory froze 21.04
Date: Fri, 10 Dec 2021 21:07:52 -0000

Can you put the specific changes that you
did to the code?

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.