Author Topic: HELP! - Couldn't open maps.dat for writing  (Read 10627 times)

Vegas Runner

  • Sr. Member
  • ****
  • Posts: 95
    • View Profile
HELP! - Couldn't open maps.dat for writing
« on: August 23, 2011, 06:30:01 AM »
Topofusion wont start. I get a message that says "Couldn't open maps.dat for writing..." I have 160 GB of map data. This took months to compile. I don't want to delete my maps. What can I do?

Please help!

ScottMorris

  • Administrator
  • Sr. Member
  • *****
  • Posts: 2756
  • TopoFusion Author
    • View Profile
    • http://www.topofusion.com/diary
Re: HELP! - Couldn't open maps.dat for writing
« Reply #1 on: August 23, 2011, 08:14:57 AM »
Best thing to do first is reboot your computer.  It could just be a stray file handle that has grabbed the index or one of the mapsX.dat files.

If that doesn't work, does it go into read only mode and talk about CD-roms, or just say not open for writing, and then fail?
Scott Morris - founder and co-author of TopoFusion
email: smorris@topofusion.com

Vegas Runner

  • Sr. Member
  • ****
  • Posts: 95
    • View Profile
Re: HELP! - Couldn't open maps.dat for writing
« Reply #2 on: August 23, 2011, 08:36:57 AM »
As suggested I rebooted my computer.

Some more info. This is the circumstance under which it failed. I was doing a batch download. During the download Topofusion unexpectedly quit. I restarted topofusion. When I did, it just said  "Couldn't open maps.dat for writing..." and then failed.

ScottMorris

  • Administrator
  • Sr. Member
  • *****
  • Posts: 2756
  • TopoFusion Author
    • View Profile
    • http://www.topofusion.com/diary
Re: HELP! - Couldn't open maps.dat for writing
« Reply #3 on: August 23, 2011, 08:43:30 AM »
That kind of makes sense, that a file lock would still be on it.

But rebooting did not help?  That should have cleared it.
Scott Morris - founder and co-author of TopoFusion
email: smorris@topofusion.com

Vegas Runner

  • Sr. Member
  • ****
  • Posts: 95
    • View Profile
Re: HELP! - Couldn't open maps.dat for writing
« Reply #4 on: August 23, 2011, 09:25:53 AM »
I may be mistaken. It is possible I only restarted topofusion. After thinking about it I do not have a specific recollection of rebooting. I will reboot when I get home from work.

Vegas Runner

  • Sr. Member
  • ****
  • Posts: 95
    • View Profile
Re: HELP! - Couldn't open maps.dat for writing
« Reply #5 on: August 23, 2011, 10:32:16 AM »
bodyI rebooted but Topofusion is producing an error message: “Couldn’t open Maps.dat for writing……

Dismissing the error produces another:  “Fatal Error: Couldn’t open Maps.dat for reading.  Check for existence of mapindex.dat and masps0.dat in the maps directory…


Vegas Runner

  • Sr. Member
  • ****
  • Posts: 95
    • View Profile
Re: HELP! - Couldn't open maps.dat for writing
« Reply #6 on: August 23, 2011, 12:46:15 PM »
Is there a way to rebuild the mapindex.dat file from the map*.dat files? If there isn't there probably should be.

This is an extremelly painful experience. Having all your data destroyed from a corrupted index file is a disaster.

ScottMorris

  • Administrator
  • Sr. Member
  • *****
  • Posts: 2756
  • TopoFusion Author
    • View Profile
    • http://www.topofusion.com/diary
Re: HELP! - Couldn't open maps.dat for writing
« Reply #7 on: August 24, 2011, 09:12:16 AM »
Hmm.  Can you send a screen grab of what your map folder looks like?  I just want to make sure all the files are there and that the sizes make sense.

One thing to try it copying (!) everything to a new directory.  It's possible there's something wrong on your hard drive.  If it succeeds it may be that TF can open the copy.

At one point we did have a util that rebuilds the mapindex file, but it hasn't been used/updated for a while.  I can take a look later.
Scott Morris - founder and co-author of TopoFusion
email: smorris@topofusion.com

Vegas Runner

  • Sr. Member
  • ****
  • Posts: 95
    • View Profile
Re: HELP! - Couldn't open maps.dat for writing
« Reply #8 on: September 14, 2011, 06:55:36 PM »
Hi Scott,

I sent you an email today with screen shots of my maps directory.

Ed

ScottMorris

  • Administrator
  • Sr. Member
  • *****
  • Posts: 2756
  • TopoFusion Author
    • View Profile
    • http://www.topofusion.com/diary
Re: HELP! - Couldn't open maps.dat for writing
« Reply #9 on: September 14, 2011, 07:52:16 PM »
Thanks, got 'em.

It does seem like your mapindex.dat file got truncated -- it's only 92mb and it should (by my rough calculations) be closer to 125 mb.

Is there a maps297.dat file?  #296 looks like it is full.

I will have to dig up the mapindex rebuilder tool, and we can try that.  It may need some updates for the newer file structure in v4 of TF Pro.

Thx
Scott Morris - founder and co-author of TopoFusion
email: smorris@topofusion.com

Vegas Runner

  • Sr. Member
  • ****
  • Posts: 95
    • View Profile
Re: HELP! - Couldn't open maps.dat for writing
« Reply #10 on: September 14, 2011, 10:57:37 PM »
Thanks Scott. Hopefully the tool will work for me!

BTW- There is no maps297.dat file

Ed

ScottMorris

  • Administrator
  • Sr. Member
  • *****
  • Posts: 2756
  • TopoFusion Author
    • View Profile
    • http://www.topofusion.com/diary
Re: HELP! - Couldn't open maps.dat for writing
« Reply #11 on: September 15, 2011, 07:11:46 PM »
Unfortunately I am heading back to AZ this weekend, so it'll be a few days before I can take a look.  Please bug me about it mid-next week if I haven't gotten back to you.

Cheers.
Scott Morris - founder and co-author of TopoFusion
email: smorris@topofusion.com

Vegas Runner

  • Sr. Member
  • ****
  • Posts: 95
    • View Profile
Re: HELP! - Couldn't open maps.dat for writing
« Reply #12 on: September 21, 2011, 07:58:56 AM »
Hi Scott,

Bugging you as requested! Have you had a chance to look at the mapindex rebuilder tool?

Ed

ScottMorris

  • Administrator
  • Sr. Member
  • *****
  • Posts: 2756
  • TopoFusion Author
    • View Profile
    • http://www.topofusion.com/diary
Re: HELP! - Couldn't open maps.dat for writing
« Reply #13 on: September 22, 2011, 03:54:30 PM »
Found it, and it needs updating as I suspected.  I'll throw a little time at it right now and see if it'll roll.
Scott Morris - founder and co-author of TopoFusion
email: smorris@topofusion.com

Vegas Runner

  • Sr. Member
  • ****
  • Posts: 95
    • View Profile
Re: HELP! - Couldn't open maps.dat for writing
« Reply #14 on: September 22, 2011, 03:57:38 PM »
Thanks I appreciate it greatly!

ScottMorris

  • Administrator
  • Sr. Member
  • *****
  • Posts: 2756
  • TopoFusion Author
    • View Profile
    • http://www.topofusion.com/diary
Re: HELP! - Couldn't open maps.dat for writing
« Reply #15 on: September 22, 2011, 04:40:40 PM »
Alright, it took a bit, but it worked on one of my Maps0.dat files -- resurrected a correct mapindex.dat file for it!

Put fixmaps.exe into your map directory -- you may want to rename or copy the current mapindex.dat file since it will get overwritten.  Run it (for you it may take an hour or more, and the progress bar is messed up, it goes beyond 100%!).

No guarantees!  For use with v4.0 TF and up only (in case other people end up on this thread).

We'll see if it lets me attach a .exe file to a forum post or not.
Scott Morris - founder and co-author of TopoFusion
email: smorris@topofusion.com

Vegas Runner

  • Sr. Member
  • ****
  • Posts: 95
    • View Profile
Re: HELP! - Couldn't open maps.dat for writing
« Reply #16 on: September 22, 2011, 06:25:17 PM »
OK it is running. I will let you know how it turns out.

Vegas Runner

  • Sr. Member
  • ****
  • Posts: 95
    • View Profile
Re: HELP! - Couldn't open maps.dat for writing
« Reply #17 on: September 23, 2011, 06:55:33 PM »
I ran the fixmaps.exe it took about 22 hours. It did not work for me.

ScottMorris

  • Administrator
  • Sr. Member
  • *****
  • Posts: 2756
  • TopoFusion Author
    • View Profile
    • http://www.topofusion.com/diary
Re: HELP! - Couldn't open maps.dat for writing
« Reply #18 on: September 24, 2011, 09:35:30 AM »
22 hours, wow!  It's not the most efficient code, for sure.

Does it give the same error, or something different, or just no maps, or?
Scott Morris - founder and co-author of TopoFusion
email: smorris@topofusion.com

Vegas Runner

  • Sr. Member
  • ****
  • Posts: 95
    • View Profile
Re: HELP! - Couldn't open maps.dat for writing
« Reply #19 on: October 06, 2011, 04:22:17 PM »
It gives the same error.