Author Topic: ERR: VERSION  (Read 10959 times)

0 Members and 1 Guest are viewing this topic.

Offline thepenguin77

  • z80 Assembly Master
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1594
  • Rating: +823/-5
  • The game in my avatar is bit.ly/p0zPWu
    • View Profile
ERR: VERSION
« on: August 02, 2010, 03:58:19 pm »
I was reading the topic about backing up your groups, when I just went, duh, I know what is happening. After a little abuse to my calculator's flash, I managed to pull my own ERR:VERSION. It's actually very simple if you know what you are doing.

Flash is made of sectors, each sector is 65,536 bytes long. Then each sector is split into 4 pages of 16,384 each. When you archive stuff, it is stuck where ever there is room while trying to be efficient. This means that data is allowed to run over one page onto the next, (not a sector boundary though). The only problem is that it is rather annoying to see if the data crosses a page boundary. Normally this is not a problem as TI checks to see if the data crosses the boundary. But if the 9 byte header which has to be processed byte by byte crosses a boundary, ERR:VERSION. This is TI's way of saying since the chance of this happening is only 3*9/65535 = .04%, we just won't bother with it.

Pretty soon I'll be looking to see how this can be patched, I'd imagine it's not too hard, but I'll see what I can do.

Here is the proof of concept screen shot.

Edit:
    Whoa, the problem is a lot worse than I thought, that was a completely blank group that it made. It has a flash header, but no data, just FF's.
« Last Edit: August 02, 2010, 04:11:08 pm by thepenguin77 »
zStart v1.3.013 9-20-2013 
All of my utilities
TI-Connect Help
You can build a statue out of either 1'x1' blocks or 12'x12' blocks. The 1'x1' blocks will take a lot longer, but the final product is worth it.
       -Runer112

Offline meishe91

  • Super Ninja
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2946
  • Rating: +115/-11
    • View Profile
    • DeviantArt
Re: ERR: VERSION
« Reply #1 on: August 02, 2010, 04:07:59 pm »
I'm to tired to really understand what you said but from the sound of it basically we are seeing TI's laziness once again?
Spoiler For Spoiler:



For the 51st time, that is not my card! (Magic Joke)

Offline matthias1992

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 408
  • Rating: +33/-5
    • View Profile
Re: ERR: VERSION
« Reply #2 on: August 02, 2010, 07:35:11 pm »
Basically we are seeing Ti being very very undescriptive. Err: Version wouldn't make you guess that the header of a group was split over 2 Flash pages wouldn't it? Err: Flash or Err: Header or Err: Boundary would have been better. Secondly it indeed shows Ti being lazy about getting the header always in the right place, makes me wonder if data actually is at all neatly packed of any prm or app in flash rom. Would there be FF's between several apps? that would indicate that Ti is even more lazy then I initialy thought. Does make something as rudimentary as a garbage collector needed though.
MASM xxxxxxxxxx aborted | SADce ====:::::: 40% -Halted until further notice| XAOS =====::::: 50% -Units done| SKYBOX2D engine ========== 100% -Pre-alpha done. Need to  document it and extend |

~Those who dream by day are cognizant of much more than those who dream by night only. -Sir Edgar Allen Poe-

Offline Raylin

  • Godslayer
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1392
  • Rating: +83/-25
  • I am a certifiable squirrel ninja.
    • View Profile
    • Ray M. Perry
Re: ERR: VERSION
« Reply #3 on: August 02, 2010, 07:59:00 pm »
So, wait.
How did you trigger this error?
Bug me about my book.

Sarah: TI-83 Plus Silver Edition [OS 1.19]
Cassie: TI-86 [OS 1.XX]
Elizabeth: TI-81 [OS 1.XX]
Jehuty: TI-83 Plus Silver Edition [OS 1.19]
Tesla: CASIO Prizm







Offline Quigibo

  • The Executioner
  • CoT Emeritus
  • LV11 Super Veteran (Next: 3000)
  • *
  • Posts: 2031
  • Rating: +1075/-24
  • I wish real life had a "Save" and "Load" button...
    • View Profile
Re: ERR: VERSION
« Reply #4 on: August 02, 2010, 08:02:53 pm »
What makes groups different than programs and the other variable types though?  Because I'm pretty sure those can have headers on the page boundary.
« Last Edit: August 02, 2010, 08:03:33 pm by Quigibo »
___Axe_Parser___
Today the calculator, tomorrow the world!

Offline Builderboy

  • Physics Guru
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5673
  • Rating: +613/-9
  • Would you kindly?
    • View Profile
Re: ERR: VERSION
« Reply #5 on: August 02, 2010, 08:17:08 pm »
My guess is that TI just was too lazy to write in the check for Group names in the ungrouping routine?  Or it happened so infrequently that they never even knew the bug existed.

Offline thepenguin77

  • z80 Assembly Master
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1594
  • Rating: +823/-5
  • The game in my avatar is bit.ly/p0zPWu
    • View Profile
Re: ERR: VERSION
« Reply #6 on: August 02, 2010, 11:54:29 pm »
I have found one source of the problem. When the OS makes the group, it stores the start page and address in a temporary memory location. It then loads them in the OS specified page and address spot. The only problem is that the routine it calls to setup the group header, happens to also use the temporary memory location. So what happens is that the page gets first put by the main program, then increased by the header program, and finally the main program grabs it and raises it again! These ERR:VERSION groups actually start at the beginning of one page, and restart at the beginning of the next.

What worries me is that the best way to fix the problem was actually to NOP 15 bytes. Not only that, TI went through and optimized this section for 2.53. That means they looked at it, saw nothing wrong, and continued on.

But that's only half the problem! After I patched it up to make the groups, it can't read them. The group was definitely created successfully because GrpTool can read it. Plus it was readable after it got relocated on a garbage collect. TI just doesn't want us to use groups.

So, wait.
How did you trigger this error?
I GC'd to erase all memory. Then I filled the first flash page up until it only had 3 bytes left. (Flash isn't truly erased until GC it is just marked dirty). Then I made a group.

What makes groups different than programs and the other variable types though?  Because I'm pretty sure those can have headers on the page boundary.
What makes them different is that they have very specific code that creates and reads them! The ERR:VERSION groups function normally anywhere else, unless they corrupted the next page.

Now I'm off to find part two of this horrible group handling.

Edit:
   Found the second one, it only occurs if the group starts <4 bytes from the end of a page. TI almost did it right, they checked for page crosses, it's just that they assumed that it wouldn't change pages.

Edit 2:
   For those that want to jump the gun, I finished the patch for 2.53. Tomorrow I'll have to make one for 2.43, maybe the 83+ and SE too if I can find some roms. It won't run on anything but, 2.53. Don't run it if you know your batteries are low and especially don't pull a battery. I was even nice enough to make it so that it won't say ROM failed in the self test.
« Last Edit: August 03, 2010, 12:34:31 am by thepenguin77 »
zStart v1.3.013 9-20-2013 
All of my utilities
TI-Connect Help
You can build a statue out of either 1'x1' blocks or 12'x12' blocks. The 1'x1' blocks will take a lot longer, but the final product is worth it.
       -Runer112

Offline Raylin

  • Godslayer
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1392
  • Rating: +83/-25
  • I am a certifiable squirrel ninja.
    • View Profile
    • Ray M. Perry
Re: ERR: VERSION
« Reply #7 on: August 03, 2010, 01:44:45 am »
One last question:

Is this error something someone would run into practically or is it from stress test only?
« Last Edit: August 03, 2010, 09:11:31 am by Raylin »
Bug me about my book.

Sarah: TI-83 Plus Silver Edition [OS 1.19]
Cassie: TI-86 [OS 1.XX]
Elizabeth: TI-81 [OS 1.XX]
Jehuty: TI-83 Plus Silver Edition [OS 1.19]
Tesla: CASIO Prizm







Offline TIfanx1999

  • ಠ_ಠ ( ͡° ͜ʖ ͡°)
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 6173
  • Rating: +191/-9
    • View Profile
Re: ERR: VERSION
« Reply #8 on: August 03, 2010, 02:28:29 am »
@Raylin: I don't use groups (There have been issues that turned me off of using them), but this does actually happen sometimes. It's poor programming on TI's part really.

Offline Deep Toaster

  • So much to do, so much time, so little motivation
  • Administrator
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 8217
  • Rating: +758/-15
    • View Profile
    • ClrHome
Re: ERR: VERSION
« Reply #9 on: August 03, 2010, 04:38:10 am »
I have no idea if this applies or not, but does a defragmentation fix the ERR:VERSION? I once grouped a project and it ended up with that bug, then accidentally deleted MirageOS, and the group suddenly worked again.




Offline Lionel Debroux

  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2135
  • Rating: +290/-45
    • View Profile
    • TI-Chess Team
Re: ERR: VERSION
« Reply #10 on: August 03, 2010, 10:02:33 am »
This looks like another unofficial patch to fix TI's bugs... people, keep them going :)
Member of the TI-Chess Team.
Co-maintainer of GCC4TI (GCC4TI online documentation), TILP and TIEmu.
Co-admin of TI-Planet.

Offline FinaleTI

  • Believe in the pony that believes in you!
  • CoT Emeritus
  • LV10 31337 u53r (Next: 2000)
  • *
  • Posts: 1830
  • Rating: +121/-2
  • Believe in the pony that believes in you!
    • View Profile
    • dmuckerman.tumblr.com
Re: ERR: VERSION
« Reply #11 on: August 03, 2010, 10:48:04 am »
Awesome! I can't wait for the 2.43 version! ERR:VERSION caused me to lose quite a bit of stuff over the years, so this is great!


Spoiler For Projects:

My projects haven't been worked on in a while, so they're all on hiatus for the time being. I do hope to eventually return to them in some form or another...

Spoiler For Pokemon TI:
Axe port of Pokemon Red/Blue to the 83+/84+ family. On hold.

Spoiler For Nostalgia:
My big personal project, an original RPG about dimensional travel and a few heroes tasked with saving the world.
Coding-wise, on hold, but I am re-working the story.

Spoiler For Finale's Super Insane Tunnel Pack of Doom:
I will be combining Blur and Collision Course into a single gamepack. On hold.

Spoiler For Nostalgia Origins: Sky's Story:
Prequel to Nostalgia. On hold, especially while the story is re-worked.

Offline thepenguin77

  • z80 Assembly Master
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1594
  • Rating: +823/-5
  • The game in my avatar is bit.ly/p0zPWu
    • View Profile
Re: ERR: VERSION
« Reply #12 on: August 03, 2010, 12:04:40 pm »
Here is the fix for 2.43.

While we're on the topic of protecting groups, I also added in two more programs. For 2.43 and 2.53 respectively, these stop the OS from deleting all your groups during press to test. It has always bothered me that it disables all your programs, and then deletes all your groups.

As far as these patches go, they are all undo-able. When you run them, a menu pops up with a fix and unfix option.
zStart v1.3.013 9-20-2013 
All of my utilities
TI-Connect Help
You can build a statue out of either 1'x1' blocks or 12'x12' blocks. The 1'x1' blocks will take a lot longer, but the final product is worth it.
       -Runer112

Offline calcdude84se

  • Needs Motivation
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2272
  • Rating: +78/-13
  • Wondering where their free time went...
    • View Profile
Re: ERR: VERSION
« Reply #13 on: August 05, 2010, 12:15:48 pm »
Wow I missed this entire thread x.x
Nice to see someone else fixing TI's problems :P
I'm getting the patch right now. Good job! +1 for you. :D
"People think computers will keep them from making mistakes. They're wrong. With computers you make mistakes faster."
-Adam Osborne
Spoiler For "PartesOS links":
I'll put it online when it does something.

Offline ztrumpet

  • The Rarely Active One
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5712
  • Rating: +364/-4
  • If you see this, send me a PM. Just for fun.
    • View Profile
Re: ERR: VERSION
« Reply #14 on: August 05, 2010, 01:59:41 pm »
Woah!  I missed it too.  It's wonderful to see you fixing the problems.  Thank you! +1 also! ;D
Any chance of a 83+SE Patch? :D