This forum has been archived. All content is frozen. Please use KDE Discuss instead.

How to repair a corrupted tc file?

Tags: None
(comma "," separated)
ninob
Registered Member
Posts
46
Karma
0
OS

How to repair a corrupted tc file?

Sun Feb 16, 2020 12:32 pm
Hi forum!


At the time I use Tellico version 3.1.4 on OpenSuse 15.1 [KDE-Plasma 5.12.8 / KDE-Frameworks 5.55.0 / Qt 5.9.7]
Sometimes it cannot open the data, which it has generated /saved a few minutes before.
Tellico gives out a warning window with the text:
The file cannot be loaded - FILENAME.tc

This occurred In the last 12 months about 4 times. In this case, I must load the last file from backup and must hope I'll remember all the changes meanwhile made.

If I open the corrupted file through Konsole, I get
The file cannot be loaded - FILENAME.tc
qt.qpa.xcb: QXcbConnection: XCB error: 3 (BadWindow), sequence: 5749, resource id: 25167241, major code: 40 (TranslateCoords), minor code: 0


Is there a trick to repair this kind of tc corrupted data?
What does run bad there?

Thanks in advance for helps!!
ninob
Registered Member
Posts
46
Karma
0
OS
I've searched further about and I recovered with testdisk a file, I suppose, it is directly related with the corrupted tc file, named qt_temp.Hf5937
I opened it with Ark and I got a folder with a lot of images (CD and LP covers) and the file tellico.xml.
When I try to open or import this one with Tellico through the console, I get more or less the same error message as already reported
The File cannot be loaded - tellico.xml/n
qt.qpa.xcb: QXcbConnection: XCB error: 3 (BadWindow), sequence: 7099, resource id: 25169554, major code: 40 (TranslateCoords), minor code: 0
robbystephenson
KDE Developer
Posts
384
Karma
1
OS
ninob wrote:Sometimes it cannot open the data, which it has generated /saved a few minutes before.
Tellico gives out a warning window with the text:
The file cannot be loaded - FILENAME.tc

This occurred In the last 12 months about 4 times. In this case, I must load the last file from backup and must hope I'll remember all the changes meanwhile made.

Yikes, sorry that you've had that problem. So you're not sure what might be common in those few times that it happened? Do you save the images in the file itself? Is it a big file? My first thought is that the file takes a little while to write and it's getting interrupted too early perhaps.
ninob wrote:If I open the corrupted file through Konsole, I get
The file cannot be loaded - FILENAME.tc
qt.qpa.xcb: QXcbConnection: XCB error: 3 (BadWindow), sequence: 5749, resource id: 25167241, major code: 40 (TranslateCoords), minor code: 0


Is there a trick to repair this kind of tc corrupted data?

No trick really, it depends on what the corruption is. A .tc file is just a .zip file with a tellico.xml inside and any images that might be included. If you have that temporary file like you mentioned, and you pull out the tellico.xml file, you could send it to me directly (by email) and confirm what the problem might be. Like i said, it's probably that the file got truncated and didn't get completely written out. But I don't know why that would happen.
ninob
Registered Member
Posts
46
Karma
0
OS
Hello robbystephenson,

Thanks a lot for you contribute!

robbystephenson wrote:Do you save the images in the file itself?

Only at beginning, as the file became big, I begun to saved only the links to the images

robbystephenson wrote: Is it a big file? My first thought is that the file takes a little while to write and it's getting interrupted too early perhaps.

The file is now 4-5 MiB big. I thought the same too, while ...

robbystephenson wrote:So you're not sure what might be common in those few times that it happened?

Not really, but I suppose it is connected with changes in database structure (new fields or old fields in an another tab / sequence). Generally I save the tc file immediately after these changes. Sometimes I even close tellico after that. But it might happen, I do that a few later, after I put in a new record.
So, if your supposition - the save procedure get more time in reality as it seems - is correct, then I think, it is quite heavy to avoid data loss.

robbystephenson wrote:If you have that temporary file like you mentioned, and you pull out the tellico.xml file, you could send it to me directly (by email) and confirm what the problem might be. Like i said, it's probably that the file got truncated and didn't get completely written out. But I don't know why that would happen.

Yes, I have the tellico.xml file and as it does not contain any secret, I could sent it both to your email address (which one?) or here to the forum, as you prefer.
I understand that you say, it is no possible to assure finding the problem source - No problem! But probably anyone (you, me and same other reader) can learn something new ...
robbystephenson
KDE Developer
Posts
384
Karma
1
OS
ninob wrote:
robbystephenson wrote:If you have that temporary file like you mentioned, and you pull out the tellico.xml file, you could send it to me directly (by email) and confirm what the problem might be. Like i said, it's probably that the file got truncated and didn't get completely written out. But I don't know why that would happen.

Yes, I have the tellico.xml file and as it does not contain any secret, I could sent it both to your email address (which one?) or here to the forum, as you prefer.
I understand that you say, it is no possible to assure finding the problem source - No problem! But probably anyone (you, me and same other reader) can learn something new ...

Send it to robby at periapsis.org if you don't mind. Thanks.
robbystephenson
KDE Developer
Posts
384
Karma
1
OS
Thanks for sharing your file. Bug is tracked here: https://bugs.kde.org/show_bug.cgi?id=418067
User avatar
Max Magent
Registered Member
Posts
2
Karma
0
You can use recovery software for this or bug fix extension is also helpful.
ninob
Registered Member
Posts
46
Karma
0
OS
robbystephenson wrote:Thanks for sharing your file. Bug is tracked here: https://bugs.kde.org/show_bug.cgi?id=418067

I must thank you, robbystephenson!

I have quickly seen your bug description.
You think, semicolons caused the data loss !!
It would be hence better avoiding them as workaround, at least until the bug will be solved !!

About the bug two Information:
A) You have maybe noticed, there is a field with semicolon named >>Art-No.:<<, since a long time in fact, surely added using an older Tellico version. This would imply, only the versions of the last years are "affected" from this bug.
B) The problem is present in the Tellico 3.2.3 too.

How to flag this Item now? solved? bug?

= = = = = = = = = =
To Max Magent
Sorry If my Answer for You sounds too hard!
If You can read the posts again, You will surely find out, I use already backups and recovery solutions.
Thank You for Your Attention !! >:D
robbystephenson
KDE Developer
Posts
384
Karma
1
OS
ninob wrote:About the bug two Information:
A) You have maybe noticed, there is a field with semicolon named >>Art-No.:<<, since a long time in fact, surely added using an older Tellico version. This would imply, only the versions of the last years are "affected" from this bug.
B) The problem is present in the Tellico 3.2.3 too.

Tellico was using an incorrect validity check in the underlying XML library and as a result, could create fields with invalid XML names. That could include colons, your Euro character, and other issues. The Qt library is somewhat robust and can recover from some of these errors. I don't know why some work and some don't.

In any event, I've fixed the bug with writing bad XML and also added code to allow Tellico 3.3 to attempt to recover and load invalid data from previous versions. Thanks for letting me know about the issue.


Bookmarks



Who is online

Registered users: bartoloni, Bing [Bot], Google [Bot], Sogou [Bot], Yahoo [Bot]