mate-desktop / pluma

A powerful text editor for MATE
http://www.mate-desktop.org
GNU General Public License v2.0
154 stars 66 forks source link

long js file freezes pluma. #671

Open bindestriche opened 1 year ago

bindestriche commented 1 year ago

Expected behaviour

the file is displayed by pluma

Actual behaviour

pluma freezes

Steps to reproduce the behaviour

try to open rules.js (changed file-ending to txt to upload it here, error also occurs with file-ending txt) rules.txt

MATE general version

MATE 1.26.0

Package version

1.26.0-1ubuntu1

Linux Distribution

Ubuntu Mate Version 22.04.1 LTS (Jammy Jellyfish) 64-bit

Link to bugreport of your Distribution (requirement)

https://bugs.launchpad.net/ubuntu-mate/+bug/2002627

lukefromdc commented 1 year ago

A too-long file of seemingly ANY type will freeze Pluma as it tries to load all of it into RAM, this has been around w while. Note that this has been fixed in Gedit, in fact this (as well as Gedit having an "edit anyway" force open option when invalid characters are detected) are why I keep Gedit installed, for file Pluma chokes on. This means there should be commits to gedit for both of these that could be backported to Pluma, and would fix some real usablity issues

bindestriche commented 1 year ago

odd when I check the system monitor while trying to open the file - I still have 6GB of RAM free, only one CPU core is maxed out.

lukefromdc commented 1 year ago

I don't think its a matter of running out of RAM but rather a matter of mishandling loading large files

EvilrootNix commented 1 year ago

The same thing happened to me with a .json file, and I assumed it was due to the file being too large, until I opened a .SQL of the same size with pluma and it didn't freeze. Indeed, with a 1.3 mb .json file, puma pluma freezes up completely. It's not an inherited issue or GTK related since with gedit using MATE it doesn't occur.

https://github.com/mate-desktop/pluma/issues/673