Viewing Last Log hangs if large
my latest log contained errors relating to a bind mount i added, this caused my log to be greater than 700mb. Clicking "view last log" hangs forever and i have to kill it. Is the entire log being read into memory, or is it being progressively read in with a fixed sliding memory window?
I confirmed this issue. My log is only 123mb and backintime already hang when trying to load it. Is there anyway we can help to fix this issue? It's annoying ... Thanks.
I'm not a python or Qt developer but taking a look at the QPlainTextEdit class which is being used by log viewer seems to indicate that setting the 'maximumBlockCount' properties of the instance being used will possibly turn it into a sliding winding log viewer implementation http://doc.qt.io/qt-5/qplaintextedit.html#details
In saying that, however the hanging could be also caused by the continued appending to the QPlainTextEdit instance, so the logic probably will also need to change to stop appended when the 'maximumBlockCount' hit and continue paging the data in when user scrolls hits a particular threshold
I confirm the same problem with BIT 1.1.12 Ubuntu 18.04 the full backup log was 98M but froze so I had to kill app.py. Viewing a home backup log was quick it was 950K.
Same problem with BIT 1.1.24 and Ubuntu 18.10 (log size about 4mb).
Same on Debian 9 64-bit, Back In Time v.1.1.12 main ui hangs forever with high cpu. tried launching it from the console and requested the logfile: the app hanged as usual but without stdout error messages so I attempted to close it with ctrl+c, resulting in the app being responsive again. don't know if this may be helpful. the application output follows
Version: 1.1.12
Back In Time comes with ABSOLUTELY NO WARRANTY. This is free software, and you are welcome to redistribute it under certain conditions; type `backintime --license' for details.
^CTraceback (most recent call last): File "/usr/share/backintime/qt4/app.py", line 904, in on_btn_log_view_clicked logviewdialog.LogViewDialog( self ).exec_() File "/usr/share/backintime/qt4/logviewdialog.py", line 115, in init self.update_profiles() File "/usr/share/backintime/qt4/logviewdialog.py", line 159, in update_profiles self.update_log() File "/usr/share/backintime/qt4/logviewdialog.py", line 187, in update_log self.txt_log_view.setPlainText(self.snapshots.get_take_snapshot_log(mode, self.get_selected_profile(), decode = self.decode) ) File "/usr/share/backintime/common/snapshots.py", line 398, in get_take_snapshot_log return self._filter_take_snapshot_log( data, mode, **kwargs ) File "/usr/share/backintime/common/snapshots.py", line 378, in _filter_take_snapshot_log log = log + line + '\n' KeyboardInterrupt ^[
I experienced the same issue in 1.1.12, so I used the ppa and got version 1.3.2. The problem seems to be fixed. I was able to view a huge log file with no difficulties.
That's great news, hopefully one of the devs may be able to attribute the fix to a particular change, and this issue can be closed
Closing in the hopes that this is resolved :)