Author Topic: TF4: MyTopo tiles corrupted on download  (Read 22776 times)

derelict

  • Full Member
  • ***
  • Posts: 35
    • View Profile
TF4: MyTopo tiles corrupted on download
« on: July 13, 2010, 07:47:40 AM »
I am getting corrupted tiles on MyTopo display.  The tiles are different colors, and don't line up with each other.  I note that each tile *does* look like a valid tile (except for the odd background colors), they just don't match up with each other. 

BTW, the regular topo map displays fine, as do all the other maps (once downloads are working!).  Only MyTopo is corrupted.

My system:
AMD 9750, 3GB RAM, Windows 7 Home Premium 32-bit.
Video: Nvidia 8800GT
Topofusion 4.0


I have included an example of the screen that I'm seeing.  Here's my topofusion.log:
TopoFusion 4.000 Log Begin
SizeChanged : Not initialized, aborting
Setting internet settings..
SizeChanged : Not initialized, aborting
GPSMaster.ocx, Initialize...
Windows Major Version: 6
Windows Minor Version: 1
Windows Build Number : 7600
Windows Platform ID  : 2
Windows CSD Version  :
Initializing Winsock
Initializing Direct3D
Direct3D : Driver "NVIDIA GeForce 8800 GT " (nvd3dum.dll)
Direct3D : Display properties - 1600x1200, Format=22, Refresh = 75
Free Texture Memory = 1855979520 bytes
Direct3D : Hardware supports rendering after flips (is relatively fast)
Direct3D : Hardware supports at least DX7
Direct3D : Hardware supports at least DX9
Direct3D : Hardware supports anisotropic filtering.
Direct3D : Hardware supports ALPHA pixels in textures.
Direct3D : Hardware supports any sized textures.
Direct3D : Hardware doesn't support antialiased lines.
Direct3D : Hardware supports alpha blended lines.
Direct3D : Hardware supports textured lines.
Direct3D : Maximum Texture Width: 8192
Direct3D : Maximum Texture Height: 8192
Color Info : Sizes : R=8, G=8, B=8
Color Info : Shifts : R=16, G=8, B=0
Direct3D : Hardware supports color conversion.
Direct3D : Hardware supports compressed textures DXT1.
Creating Surfaces (1580 x 853)
Creating Resource Tiles....
Creating Sprites
No custom sprites.bmp file found in default tracks dir, using standard.
No custom symbols.bmp file found in default tracks dir, using standard.
Successfully Created Surfaces
Initializing Memory Pool
Total Physical Memory: 2147483647
Physical Memory Free: 1420402688
Memory Load: 55 percent
Tile Cache Size = 1331
initMemoryPool: using DXT1 compression
Free Texture Memory = 1849688064 bytes
Setting gbLotsOfVideoRam
Initializing Threads
Initializing Index File
Sorting Index File.  Number of entries: 5501
Time to sort index file: 0.00 seconds
Initialization Complete

DirectX shutdown, resources freed.  Frames = 165

ScottMorris

  • Administrator
  • Sr. Member
  • *****
  • Posts: 2756
  • TopoFusion Author
    • View Profile
    • http://www.topofusion.com/diary
Re: TF4: MyTopo tiles corrupted on download
« Reply #1 on: July 13, 2010, 11:24:22 AM »
Thanks for the screenshot and log.  No errors in the log.  Seems like a video card issue to me, though it is hard to think of what could be going on.

Hmm, have you ever used the "user maps" feature before?  I wonder if they show up corrupt as well. 

You have (I think) the same video card as I do (the one I develop TF with).  I'd see if your drivers might need an update, though I can't say I've updated mine for years...
Scott Morris - founder and co-author of TopoFusion
email: smorris@topofusion.com

derelict

  • Full Member
  • ***
  • Posts: 35
    • View Profile
Re: TF4: MyTopo tiles corrupted on download
« Reply #2 on: July 13, 2010, 05:30:05 PM »
Well, I *am* using a down-rev driver for my Nvidia card, version 178.24, because a number of early DirectX games don't work properly on Windows 7 with current drivers (believe it or not!!). 

So why would the MyTopo tiles have a problem when none of the others do??  Are you using a completely different graphics library to render them??  If you use DirectX or OpenGL, nobody (including myself) will have any problems.

Besides, some of the problems that I have don't seem like they'd be graphics-driver related; for example, the fact that the wrong tiles seem to be selected, so that they don't line up with each other... I suspect that drivers are not the issue here.

Just as another experiment, I just went to www.mytopo.com and zoomed down to this same park, and everything displays fine; I'm uploading a screen capture of the image.  I think this points to a problem in TF?? 

ScottMorris

  • Administrator
  • Sr. Member
  • *****
  • Posts: 2756
  • TopoFusion Author
    • View Profile
    • http://www.topofusion.com/diary
Re: TF4: MyTopo tiles corrupted on download
« Reply #3 on: July 13, 2010, 08:41:15 PM »
The myTopo tiles are still displayed using DirectX, however they are first run through a matrix transform to account for the different projection they are in.

So, it still makes sense that it is a video card issue.  Try the Open Street Map tiles.  Same problem?  They are displayed the same way.

The downrev drivers and the fact that the current ones don't work on W7 is suspect, I'd say.

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

derelict

  • Full Member
  • ***
  • Posts: 35
    • View Profile
Re: TF4: MyTopo tiles corrupted on download
« Reply #4 on: July 13, 2010, 09:10:07 PM »
No, Open Street Map works fine, both in town and in the hills.  I tested multiple zoom levels, from 6-mile scale down to 1300ft scale, both in town and in the park.  No tiles are corrupted at any zoom level on OSM.  Only MyTopo is corrupted.

ScottMorris

  • Administrator
  • Sr. Member
  • *****
  • Posts: 2756
  • TopoFusion Author
    • View Profile
    • http://www.topofusion.com/diary
Re: TF4: MyTopo tiles corrupted on download
« Reply #5 on: July 14, 2010, 12:05:59 PM »
Well, that is interesting.  The difference must be in the format of the image file coming from the server.  OSM is PNG, while myTopo may be something else.  Very strange.  That's really the only difference.

It is still possible that it's a driver issue, but does seem less likely now.  I will have to think about it.  I haven't heard of any other users with the same issue.
Scott Morris - founder and co-author of TopoFusion
email: smorris@topofusion.com

sarlabs

  • Full Member
  • ***
  • Posts: 40
    • View Profile
    • www.K9CHP.net
Re: TF4: MyTopo tiles corrupted on download
« Reply #6 on: July 19, 2010, 05:09:21 AM »
Hi Scott:
I am having some map display problems with TF4.0. See my attachments. I also have tiles not loading in Topo and MyTopo, yet WMS is working fine. While taking screen dumps, Topo started working proerly again but not MyTopo or Color.

Now for the good news. I may put my mitts on a Garmin GPSMAP 62S today and will let you know whether TF4.0 can deal with it, reading/writing tracks and waypoints. I believe it should be fine as the 62 is based on the Oregon/Dakota lines but one never knows.

Amir K9CHP


[attachment deleted by admin]
Amir K9CHP

derelict

  • Full Member
  • ***
  • Posts: 35
    • View Profile
Re: TF4: MyTopo tiles corrupted on download
« Reply #7 on: July 19, 2010, 07:10:07 AM »
Just as clarification, however, this is not the same issue that I'm having... I was getting all tiles downloaded, but they were displayed incorrectly - wrong color or scale. 

I have also seen this issue of certain tiles displaying "cannot download" when the rest were fine, and I've seen it on different map types, but that is unrelated to my "corrupted tiles" issue, which is only on MyTopo maps.

sarlabs

  • Full Member
  • ***
  • Posts: 40
    • View Profile
    • www.K9CHP.net
Re: TF4: MyTopo tiles corrupted on download
« Reply #8 on: July 19, 2010, 01:01:07 PM »
Playing a little further with MyTopo maps, I found that there is a magnification level that below it I get the missing tiles...Just one click on the mouse scroll roller/button makes the difference...

While it does not seem to be the same problem as derelict's, they may be related, as it is a display problem of the MyTopo set.

Amir K9CHP
Amir K9CHP

ScottMorris

  • Administrator
  • Sr. Member
  • *****
  • Posts: 2756
  • TopoFusion Author
    • View Profile
    • http://www.topofusion.com/diary
Re: TF4: MyTopo tiles corrupted on download
« Reply #9 on: July 19, 2010, 03:26:14 PM »
Hey guys,

Amir -- I am pretty sure that most of the missing tiles you've posted are actually problems on the server side.  I have seen one myself and verified that it is downloading a white noise tile from the server.  The first shot with the message from TF *might* be a TF issue, but the others should be myTopo.

Fortunately, unlike Terraserver, the folks at myTopo are very interesting in correcting errors like these.  Drop them a note and I'll bet they will be happy to hear from you.  If they can fix them you can use the reload maps tool to grab new tiles.

Derelict - I don't have any new ideas on your issue and I'm traveling right now so cannot really sit down to try and debug it.  Would it be possible to try the latest release drivers just to see if that clears it up?
Scott Morris - founder and co-author of TopoFusion
email: smorris@topofusion.com

derelict

  • Full Member
  • ***
  • Posts: 35
    • View Profile
Re: TF4: MyTopo tiles corrupted on download
« Reply #10 on: July 19, 2010, 05:08:25 PM »
Ummm... actually, I'm playing a game now that requires the older drivers, so I think I'll just do without MyTopo for now.  The older topo maps will suffice for my purposes.

sarlabs

  • Full Member
  • ***
  • Posts: 40
    • View Profile
    • www.K9CHP.net
Re: TF4: MyTopo tiles corrupted on download
« Reply #11 on: July 23, 2010, 09:31:08 AM »
A few days ago I said I'd test the Garmin GPSMAP 62S with TFPro 4.0. Well it works as expected. Yes, I believed it was close enough to the Oregon to work just fine, but one never knows. OTOH, past experience has shown that Scott makes TF work even with new units, well before the competition!

Amir K9CHP
Amir K9CHP

bhabha

  • Newbie
  • *
  • Posts: 1
    • View Profile
    • kissimmee realtor
Re: TF4: MyTopo tiles corrupted on download
« Reply #12 on: August 10, 2010, 07:11:11 PM »
hello!

Thanks for the screenshot and log.  No errors in the log.  Seems like a video card issue to me, though it is hard to think of what could be going on.

derelict

  • Full Member
  • ***
  • Posts: 35
    • View Profile
Re: TF4: MyTopo tiles corrupted on download
« Reply #13 on: August 10, 2010, 07:16:05 PM »
I agree, *very* hard to see how it could be a video card issue, far more likely to be a TF4 issue.  Either way, I guess I'll be living without MyTopo.

ScottMorris

  • Administrator
  • Sr. Member
  • *****
  • Posts: 2756
  • TopoFusion Author
    • View Profile
    • http://www.topofusion.com/diary
Re: TF4: MyTopo tiles corrupted on download
« Reply #14 on: August 10, 2010, 09:24:14 PM »
That previous post was actually from a spam bot, combining previous posts, apparently.

I just helped out a user that had a problem with very similar code (map re-projection).  Updating his driver fixed the problem.  I'll think for a bit on myTopo vs OSM, though.
Scott Morris - founder and co-author of TopoFusion
email: smorris@topofusion.com

ScottMorris

  • Administrator
  • Sr. Member
  • *****
  • Posts: 2756
  • TopoFusion Author
    • View Profile
    • http://www.topofusion.com/diary
Re: TF4: MyTopo tiles corrupted on download
« Reply #15 on: August 11, 2010, 03:12:41 PM »
I did confirm that myTopo tiles come in as jpeg, whereas OSM are png.  That is the only difference.  They are otherwise displayed and stored the same way.

If you want to take a closer look at this there's one thing we can try to see if we can isolate where the corruption is coming from.  If you can start a new map file (by changing the default map directory to an empty dir, then restarting TF), download a few myTopo files, confirm that they are corrupt, then email me the resulting mapindex.dat and maps1.dat files.  I'll see if they come out corrupt on my system.

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

derelict

  • Full Member
  • ***
  • Posts: 35
    • View Profile
Re: TF4: MyTopo tiles corrupted on download
« Reply #16 on: August 11, 2010, 07:11:17 PM »
Okay, here's the newly-generated files...

Later note:  The new files were 3.1MB in .zip format, and the upload failed.  So, I pushed them onto my website, here's the download link:
http://home.comcast.net/~derelict/files/tf.files.zip

ScottMorris

  • Administrator
  • Sr. Member
  • *****
  • Posts: 2756
  • TopoFusion Author
    • View Profile
    • http://www.topofusion.com/diary
Re: TF4: MyTopo tiles corrupted on download
« Reply #17 on: August 11, 2010, 07:49:11 PM »
Oh yeah, one more thing -- can you hit me with a coordinate (or GPX file) that will point me to the area you downloaded?  Just needs to be close enough that I can pan/zoom around and find the tiles.

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

derelict

  • Full Member
  • ***
  • Posts: 35
    • View Profile
Re: TF4: MyTopo tiles corrupted on download
« Reply #18 on: August 12, 2010, 07:33:12 AM »
Oh... ummmm... I'm not sure *what* I was looking at when I captured this !?!?
Should I do this over again?

However, it almost certainly was either Sunol Regional Wilderness (37.54N 121.855W) or downtown Fremont, CA
« Last Edit: August 12, 2010, 07:44:40 AM by derelict »

ScottMorris

  • Administrator
  • Sr. Member
  • *****
  • Posts: 2756
  • TopoFusion Author
    • View Profile
    • http://www.topofusion.com/diary
Re: TF4: MyTopo tiles corrupted on download
« Reply #19 on: August 12, 2010, 09:20:42 AM »
No worries, I found it.  Sorry for forgetting to ask at first.

So, the tiles are definitely corrupted on disk.  They came up in funky colors for me.  But newly downloaded tiles in the area are fine.

So basically the function that is failing (without any error apparently) is a D3D function that converts a .jpg into a DXT1 compressed .DDS file, before saving it out.

One thing to try is (perhaps while still in a new map directory) turning off DXT1 compression (Options->prefs->Use texture compression (DXT1).  You'll need to reopen TF, and then download new tiles.  See if they still come in corrupted or not.
Scott Morris - founder and co-author of TopoFusion
email: smorris@topofusion.com

derelict

  • Full Member
  • ***
  • Posts: 35
    • View Profile
Re: TF4: MyTopo tiles corrupted on download
« Reply #20 on: August 12, 2010, 09:29:25 AM »
Dang, turning off texture compression did not work... after restarting TF, I went to a new area and downloaded MyTopo tiles, and they are still coming in corrupted.

ScottMorris

  • Administrator
  • Sr. Member
  • *****
  • Posts: 2756
  • TopoFusion Author
    • View Profile
    • http://www.topofusion.com/diary
Re: TF4: MyTopo tiles corrupted on download
« Reply #21 on: August 12, 2010, 09:35:11 AM »
Hmm, OK, so that makes me suspect that it's getting incomplete downloads.

Are there any errors in the log while running in non-DXT mode?  It uses a completely different method to convert the jpeg tiles.

I may have to add some debug info and have you try it.  You might try changing your internet settings a bit (toggle persistent, change number of threads).
Scott Morris - founder and co-author of TopoFusion
email: smorris@topofusion.com

derelict

  • Full Member
  • ***
  • Posts: 35
    • View Profile
Re: TF4: MyTopo tiles corrupted on download
« Reply #22 on: August 12, 2010, 09:51:48 AM »
Okay, I changed internet connections to 1 and turned off persistent connections, then restarted the program.  I'm still getting corruption, but it's different now... I've uploaded a screen dump of part of the screen - notice that only the bottom of each tile is corrupt; I don't think that was true previously, though I'm not entirely sure...

My only reservation about the "incomplete downloads" theory is that all the other map types work fine, only MyTopo has an issue.  I suppose, though, that it *could* be an issue between me and that one site.  I don't have any other download accelerators or anything running, that could interfere with TF...

ScottMorris

  • Administrator
  • Sr. Member
  • *****
  • Posts: 2756
  • TopoFusion Author
    • View Profile
    • http://www.topofusion.com/diary
Re: TF4: MyTopo tiles corrupted on download
« Reply #23 on: August 12, 2010, 02:52:11 PM »
I'm not sure what else it could be if the downloads are complete... but let's verify that.

Download the new beta version just out.  http://topofusion.com/beta.php (use your same name/code there).

Your version (it recognizes your reg. name) will export a file C:\debug.jpg for the last tile downloaded.  So, if you can, download v4.01, download a few new myTopo maps, then let's have a look at the .jpg that results.
Scott Morris - founder and co-author of TopoFusion
email: smorris@topofusion.com

derelict

  • Full Member
  • ***
  • Posts: 35
    • View Profile
Re: TF4: MyTopo tiles corrupted on download
« Reply #24 on: August 12, 2010, 03:03:47 PM »
Hokay, here's your file!!

ScottMorris

  • Administrator
  • Sr. Member
  • *****
  • Posts: 2756
  • TopoFusion Author
    • View Profile
    • http://www.topofusion.com/diary
Re: TF4: MyTopo tiles corrupted on download
« Reply #25 on: August 13, 2010, 08:33:08 AM »
Thanks.  Sure enough the file itself appears to have the corruption on it, and it's a valid jpeg file.

I will send it on to the myTopo folks and see if they have any ideas.
Scott Morris - founder and co-author of TopoFusion
email: smorris@topofusion.com

derelict

  • Full Member
  • ***
  • Posts: 35
    • View Profile
Re: TF4: MyTopo tiles corrupted on download
« Reply #26 on: September 25, 2010, 11:57:50 AM »
BTW, as a follow-up to this, I recently updated my drivers to current (NVidia 258.96), in order to play Fallout 3 again, and this problem is still present, to the same degree as previously.  So, as we suspected, it is not a driver issue.

derelict

  • Full Member
  • ***
  • Posts: 35
    • View Profile
Re: TF4: MyTopo tiles corrupted on download
« Reply #27 on: November 07, 2012, 06:14:28 AM »
Well, I upgraded to TFP V4.65, and this issue is no longer present; myTopo works just fine in all locations.