Page 1 of 1

TI-Nspire CAS error: This document format is not supported

Unread postPosted: 23 Jan 2025, 20:15
by Megidd
Hi,

Product: TI-Nspire CAS touchpad
OS version: 3.9.0.463

Error: This document format is not supported. peexam.tns


I'm studying for an exam. I created a document `peexam.tns` inside my calculator. I created the problems on the document, like Notes application and TI-Basic functions by the TI-Nspire function editor. I was enjoying it.

Once, I went outside the `peexam.tns` document and entered another document. At this point, the calculator OS asked me if I wanted to save the `peexam.tns` file. I had done it before without any problem, so I saved it again. But to my surprise, afterward, suddenly my calculator refused to open the document popping up a dialog containing this error:

Error: This document format is not supported. peexam.tns


I used an official TI-Nspire Computer Link software to copy the problematic document file from my calculator to my computer. I have uploaded the problematic document file here on Google Drive:

https://drive.google.com/file/d/1Yu5oZx ... sp=sharing

Can you investigate the file for me? Since I just created the file using the calculator, this error should NOT happen.

I have spent much time creating and improving this document and it's very frustrating to lose my data and effort.

I'm very frustrated. I shouldn't lose data. Since I believe I did nothing wrong. Just using the calculator in a normal workflow :(

I'd appreciate it if you help me. I have heard that TI-Nspire document files are just compressed files. I'd appreciate it if you investigate the file with any debugging tools you might have. I don't want to lose all my data and effort.

Thanks for your help.

Re: TI-Nspire CAS error: This document format is not support

Unread postPosted: 24 Jan 2025, 03:10
by Megidd
The user `Goplat` on the following forum has fixed two corrupted TNS files:

https://www.omnimaga.org/general-calcul ... #msg235003

Anyway, I managed to dump the XML of the documents, remove the offending tag (it was just the cursor location, nothing important), zip them back up, and re-save on my TI-Nspire with OS 2.0.1 (in order to encrypt them - 3.0 doesn't allow unencrypted documents any more). Here you go.
* tns_fixed.zip (105.61 kB - downloaded 405 times.)


https://www.omnimaga.org/general-calcul ... #msg253174

Here you go; the password is same as the original. It might be best to avoid saving documents while editing a spreadsheet cell, to avoid this bug.

Edit: The bug is caused by the combination of two things: a colored row, and saving while editing a cell. Loading a spreadsheet that was saved while editing a cell somehow tries to retrieve the color of a cell in column -1, and if there exists a colored row, that crashes.
* Etude11_12fixed.zip (14.74 kB - downloaded 369 times.)


I wonder if anyone is familiar with any workflow for fixing the TNS files? Or even fixing the operating system?

How do you fix the corrupt `*.tns` files? After all, a `*.tns` file is just a set of encrypted and compressed XML files. Right?

Thanks.

Re: TI-Nspire CAS error: This document format is not support

Unread postPosted: 24 Jan 2025, 15:41
by Adriweb
I've spent a bit of time with various tools and messing with their source code to brute force some offsets and whatnot to find the zip entries, but it might be a bit too corrupted to actually retrieve things correctly.
Or maybe missing some bytes, or something like that. It doesn't help that the .tns files are also encrypted, not just compressed.

I've linked this topic to some other people who may have more experience in dealing with this kind of thing, so we'll see, but I'm not very optimistic.
Code: Select all
Central directory entry invalid. Doing manual search

good current_cdir_entry_offset found: 16997
     cdir_entry->file_offset: 0
     cdir_entry->disk: 0
     cdir_entry->method: 13
     cdir_entry->comment_len: 0
     cdir_entry->size_compressed: 4730
     cdir_entry->size_uncompressed: 69050
File 'Document.xml':
     file_entry->name_len: 12
     file_entry->extra_len: 0
     file_entry->method: 51760
     file_entry->size_compressed: 786433
     file_entry->size_uncompressed: 0
Invalid content.

The metadata is just all wrong :(

Re: TI-Nspire CAS error: This document format is not support

Unread postPosted: 24 Jan 2025, 18:44
by Megidd
Adriweb wrote:I've spent a bit of time ...

I've linked this topic to some other people ...

The metadata is just all wrong...


Thanks for your help. I also tried TI customer service. So far no answer is recieved. I will try more.