ThinkGeo.com    |     Documentation    |     Premium Support

Can't create .000 file to .idx file - S57 Viewer

I’m testing NauticalChartsViewer Sample, and I want to visualize a S57 Chart, but the problem is that when I try to create the .idx file, it shows an error:

private void buildIndexWorker_DoWork(object sender, DoWorkEventArgs e)
{
IEnumerable fileNames = e.Argument as IEnumerable;
foreach (string fileName in fileNames)
{
NauticalChartsFeatureSource.BuildIndexFile(fileName, BuildIndexMode.Rebuild); //ERROR
}
e.Result = fileNames;
}

In my case the error says the follwing:
“Intento de leer o escribir en la memoria protegida. A menudo, esto indica que hay otra memoria dañada.”

In English it would be something like:
“Trying to read or write in the protected memory. Sometimes, it indicates that there’s another memory damaged”.

I don’t have any idea about that or how to solve it. Please help! I need this sample to continue with a project.

I’m using the evaluation product because I want to know more about this. And after buy the license.

Hi Alberto,

Thanks to let us know that, I download the code from https://github.com/ThinkGeo/NauticalChartsViewerSample-ForWpf

Then upgrade all packages to latest and load our test data, which works well.

Could you please test my attached project, load the data under “MapData” folder and see whether it also works in your side. If that works, please try to load your data again, that should be the problem in your data.

NauticalChartsViewerSample-ForWpf-master.zip (520.3 KB)

Regards,

Don

I ran the NauticalChartsViewerSample-ForWpf-master, and apears the following error:
“Exception during operation. The result is not valid. Check the Exception InnerException to have more details”

Hi Alberto,

It looks you should run that using your data, if so please send your data to us, so our developer can look into it.

If you don’t want to upload the data in forum, you can sent that to forumsupport@thinkgeo.com (if size is small) or ask support@thinkgeo.com for a FTP address (if size is big).

Regards,

Don

Hello, this is the data I want to see. I downloaded from NOAA’s ENC. I tried everything but I can’t make it work. I don´t know what problem I have. And I really need this sample because I want to integrate something similar to an application that I’m creating. But I need to understand how it works.
US1WC01M.zip (1.3 MB)

Or I don´t know if you have another example to visualize a S57 Nautical Chart, or a tutorial maybe. That will help me a lot.
Thanks!

Alberto

Hi Alberto,

That’s very strange, because I can load your file correct like this:

I directly use the attached sample which I have replied before.

NauticalChartsViewerSample-ForWpf-master.zip (520.3 KB)

It looks the first time the file build index takes so much time, so I also uploaded the file including generated index files which should be helpful.

US1WC01M.zip (1.4 MB)

Please let me know whether it still don’t work for you.

Regards,

Don

Well, now I have a different mistake.


It sais that: "An exception ocurred in the initializer of type ‘myU=4Eo’. I don’t know what it means, and I don’t understand why I can’t build the index of a file like you did.

Thanks,

Alberto

Hi Alberto,

Thanks for your update, as below is some questions:

  1. Have you tested my attached data with the index file, does that works for you?
  2. Could you please let us know what’s the exception in English because it looks we don’t know what’s the exception, and the call stack information is helpful. And please let us know what’s the operation when it’s thrown.
  3. It looks it’s thrown when the NauticalChartsFeatureLayer class is initialize, it only pass in one parameter here: FileName, so please let us know the file path here, maybe that’s the language problem in the file path.

Regards,

Don

Well, answering to your questions:

Yes, I ran your data with the index file, when it’s loading or processing, the error in the image above appears. It sais: "An exception ocurred in the initializer ‘myU=4Eo’. I don’t know what does it mean. The error is i the ChartItem.cs.

And the path from the file is: “C:\Users\NAVALECDEV\Desktop\US1WC01M”. I don’t know if you mean this or where can I find the path you are saying?

Alberto

This was weird but finally I could create the index and visualize the file. I tried to run the example in another computer, rebuild everything, and worked. Thank you so much for the help!

Now I’m wondering, why takes too much time to create de index file? There’s a way treduce this time? Or depends on the computer?

Alberto

Hi Alberto,

I am glad to hear that works in your another machine.

It looks we cannot reduce the build index time, if the algorithm get enhancement in future this maybe get changed.

So we suggest you build index for your files and save the index file together with your data.

Regards,

Don