backintime icon indicating copy to clipboard operation
backintime copied to clipboard

crashes, when trying to diff

Open freder opened this issue 5 years ago • 7 comments

version 1.2.1

every time I do either of these, the program crashes:

  • view → snapshots → diff
  • view → snapshots → diff options → ok
5/3/20 8:57 PM	python	Traceback (most recent call last):
File "/usr/share/backintime/qt/snapshotsdialog.py", line 339, in btnDiffClicked
	path1 = self.parent.tmpCopy(path1, sid1)
File "/usr/share/backintime/qt/app.py", line 1266, in tmpCopy
	shutil.copytree(full_path, tmp_file)
File "/usr/lib/python3.8/shutil.py", line 554, in copytree
	return _copytree(entries=entries, src=src, dst=dst, symlinks=symlinks,
File "/usr/lib/python3.8/shutil.py", line 455, in _copytree
	os.makedirs(dst, exist_ok=dirs_exist_ok)
File "/usr/lib/python3.8/os.py", line 223, in makedirs
	mkdir(name, mode)
FileExistsError: [Errno 17] File exists: '/tmp/tmpkt7c6arq_20200503-191846-429/'

freder avatar May 03 '20 19:05 freder

For the record, I have the same consistent crash but a different error...

Traceback (most recent call last):
  File "/usr/share/backintime/qt/snapshotsdialog.py", line 76, in accept
    diffCmd = str(self.editCmd.text().toUtf8())
AttributeError: 'str' object has no attribute 'toUtf8'

frithrah avatar Oct 17 '21 17:10 frithrah

@freder There is a new forming maintaining team and we do review all issues. Is this problem still relevant for you or did you find a solution?

Tag: Feedback, Bug, Qt

buhtz avatar Sep 25 '22 11:09 buhtz

For the record, I have the same consistent crash but a different error...

Traceback (most recent call last):
  File "/usr/share/backintime/qt/snapshotsdialog.py", line 76, in accept
    diffCmd = str(self.editCmd.text().toUtf8())
AttributeError: 'str' object has no attribute 'toUtf8'

This is different from the opening report. Your problem (error about missing `toUtf8()) is fixed (via #1246) in the current upstream version. That version is not released yet.

buhtz avatar Sep 25 '22 12:09 buhtz

Possible duplicate of #1197?

emtiu avatar Oct 14 '22 11:10 emtiu

Dear @freder , can you report back please if you are still able to reproduce your problem with the latest version (1.3.3) of BIT?

buhtz avatar Mar 19 '23 08:03 buhtz

I've seen this, too in 1.3.4-dev. But again I can't reproduce it for sure.

But I do see a trail and need to further investigate the code.

https://github.com/bit-team/backintime/blob/72ced78a5ee3c7803e0cba16e11698af4d883535/qt/snapshotsdialog.py#L342-L347

There are two situations / variants of calls to tmpCopy(). But they are not exclusive to each other. It might happen in rare cases that tmpCopy() is called twice. But there is also high evidence that I'm wrong here. I travled Back In Time to version 1.2.1 (the Issue opener used) and had a look at line 339 which was reported in his traceback. This line number refers to the first call of tmpCopy() not the second.

buhtz avatar Jun 29 '23 08:06 buhtz

Frederic we are currently working (#1682) on the snapshots dialog and its compare feature. Can you somehow reproduce the problem with a newer version of BIT and can you provide us the steps to reproduce?

buhtz avatar Apr 17 '24 08:04 buhtz