I’ve never worked with the ThinkGeo Desktop product before. But I’ve been assigned a project requiring use of CAD files in the Winforms Desktop map. So one obvious path of exploration includes the DisplayCadFile sample. However, it appears to not be able to run with a standard licensed installation of the 8.0 Desktop product. I’m getting the following exception in the OnLoad event handler. I’m sure I’m missing something obvious, but so far have not been able to identify the cause of the problem. What is necessary to get this working?
System.ArgumentException: The CAD unmanaged assemblies cannot be found.
at ThinkGeo.MapSuite.Core.CadFeatureSource.ozs=()
at ThinkGeo.MapSuite.Core.CadFeatureSource.gGs=(String gWs=)
at ThinkGeo.MapSuite.Core.CadFeatureSource.f2s=()
at ThinkGeo.MapSuite.Core.CadFeatureSource.GetAllFeaturesCore(IEnumerable`1 returningColumnNames)
at ThinkGeo.MapSuite.Core.FeatureSource.GetBoundingBoxCore()
at ThinkGeo.MapSuite.Core.FeatureSource.GetBoundingBox()
at Sample.sampleFileListBox_SelectedIndexChanged(Object sender, EventArgs e) in c:\Toro\Samples\Map\ServicesEditionSample_CADFeatureLayer_CS_130726\DisplayCadFile\Sample.cs:line 56
at System.Windows.Forms.ListBox.set_SelectedIndex(Int32 value)
at Sample.DisplayASimpleMap_Load(Object sender, EventArgs e) in c:\Toro\Samples\Map\ServicesEditionSample_CADFeatureLayer_CS_130726\DisplayCadFile\Sample.cs:line 29
at System.Windows.Forms.Form.OnLoad(EventArgs e)
Exception in DisplayCadFile sample
One more point. When I run it in the debugger, I get a different error in the same Load handler. But this time it’s a Access Violation (0xC0000005) from the MapEngine ctor.
mapEngine = new MapEngine();
Produces this in the output window, and then exits due to the unhandled exception in the load handler.
A first chance exception of type ‘System.InvalidOperationException’ occurred in MapSuiteCore.dll
The program ‘[4968] DisplayCadFile.vshost.exe’ has exited with code -1073741819 (0xc0000005) ‘Access violation’
Also, I see reference to "Setup Unmanaged Dependencies", but nothing seems to indicate where this may be found.
This may all be related, but I’m finding problem after problem with your samples. Not just requirements that don’t seem to be readily available, but also simply broken code, either in the sample, or apparently with the actual Map component itself. I just tried a sample ExtendingMapSuiteExploringLayers, downloaded from your Wiki, and it falls off into an infinite recursion when you click the shapes button (representative call stack below). I’m also a bit disappointed that I have not yet found a traditional help file for 8.0, and the Wiki seems both limited and slow, as well as samples (which appear to be the primary learning tool?) which haven’t been updated for recent releases and don’t work without those non-obvious dependencies. This is my first day introduction to your 8.0 Winform project, and there is always a learning curve, but it has so far been one of the least productive new product evaluation experiences I’ve endured in years…
Infinite recursion occurs a as a result of this code:
MapShape mapShape1 = new MapShape(new Feature(-104, 42));
Representative call stack from near bottom of stack overflow stack:
MapSuiteCore.dll!ThinkGeo.MapSuite.Core.BaseShape.GetWellKnownBinary() Unknown
MapSuiteCore.dll!ohM=.bCs=.cCs=(ThinkGeo.MapSuite.Core.BaseShape cSs=) Unknown
MapSuiteCore.dll!ThinkGeo.MapSuite.Core.BaseShape.GetWellKnownBinaryCore(ThinkGeo.MapSuite.Core.RingOrder outerRingOrder, ThinkGeo.MapSuite.Core.WkbByteOrder byteOrder) Unknown
MapSuiteCore.dll!ThinkGeo.MapSuite.Core.BaseShape.GetWellKnownBinary() Unknown
MapSuiteCore.dll!ohM=.bCs=.cCs=(ThinkGeo.MapSuite.Core.BaseShape cSs=) Unknown
MapSuiteCore.dll!ThinkGeo.MapSuite.Core.BaseShape.GetWellKnownBinaryCore(ThinkGeo.MapSuite.Core.RingOrder outerRingOrder, ThinkGeo.MapSuite.Core.WkbByteOrder byteOrder) Unknown
MapSuiteCore.dll!ThinkGeo.MapSuite.Core.BaseShape.GetWellKnownBinary() Unknown
MapSuiteCore.dll!ohM=.bCs=.cCs=(ThinkGeo.MapSuite.Core.BaseShape cSs=) Unknown
MapSuiteCore.dll!ThinkGeo.MapSuite.Core.BaseShape.GetWellKnownBinaryCore(ThinkGeo.MapSuite.Core.RingOrder outerRingOrder, ThinkGeo.MapSuite.Core.WkbByteOrder byteOrder) Unknown
MapSuiteCore.dll!ThinkGeo.MapSuite.Core.BaseShape.GetWellKnownBinary() Unknown
MapSuiteCore.dll!ohM=.bCs=.cCs=(ThinkGeo.MapSuite.Core.BaseShape cSs=) Unknown
I would have to second that last thought. I have found the lack of a proper reference document and help file to be a hindrance to learning the product. I don’t like the sample methods as they are invariably in C# when I work in VB.Net or even the rare VB samples are in a different version (2008 or 2010) and require messy fiddling around for too long to get working just to find out something simple. I think I mentioned ages ago that ThinkGeo should take a look at the MapInfo reference documents as an example.
Between that and the fact that I could never get a stable version where the all the features worked as promised without having to keep hoping and keep paying the annual maintenance, I am winding down use of ThinkGeo for future projects.
Hi Russ,
For your exception, it looks that’s because missed the CAD support dll package.
Please view this wiki page:
wiki.thinkgeo.com/wiki/Map_Suite_Services_Edition_Deployment_Guide
And you can download the package here:
wiki.thinkgeo.com/wiki/File:MapSuiteCadX642014-07-28.zip
wiki.thinkgeo.com/wiki/File:MapSuiteCadX862014-07-28.zip
Wish that’s helpful.
For your mentioned exception thrown by this code:
MapShape mapShape1 = new MapShape(new Feature(-104, 42));
I think we need more code about how class MapShape and we can know what happen in it.
Regards,
Don
Hi Daivd,
We are so sorry to give you bad experience on documentation.
In fact we are keeping work for improve our documents, we have hired some new guys recently to focus on the document improvment, including API description and WIKI pages, I gusee it will much better.
About version, our stable version is something like 7.0.0.0 and 8.0.0.0. We do many tests before release these stable version and reveiw everything include API documents.
The other version like 8.0.0.x or 8.0.x.0 is include some new features, enhancements and fixes, so sometimes it works not the same as how the page said.
Regards,
Don
As I said, MapShape is in YOUR code, in the sample I referenced. And the recursion is inside your component code beginning with the “new Feature(-104, 42)” ctor argument. So I would think you would know all about that code.
Also, why in the world would I need to read what is clearly labeled a “deployment guide” to find supporting libraries after I installed a package called “development full”? And the only CAD files listed are from the build version you note as “less stable”. And I had already found and downloaded the CAD zip from your “Dependency Guide”, but it’s just a zip with some files in folders with no clue where they go. On a guess as a quick test, I put them in the build output folder, figuring if it loaded from anywhere it would load from the AppBase. No luck with that, same error. Then I noticed the Dependency Guide had a path specified off the SystemRoot. I thought “surely that can’t be right?”, but tried anyway. Still doesn’t find them. I tried a few more guesses (did they intend “Install Root” (or some such) rather than “System Root”?) before becoming frustrated and more than a little angry.
Requiring those using your products to deal with this is absolutely terrible. Installing the product should just work without scouring a scrambled Wiki. Help and samples should be updated and available for a release without requiring what turned into hours with still no functional sample code. And the failures resulting form simply instantiating constructors for some of your main core classes are absolutely catastrophic. This is not even boundary stuff, but just instantiating a Feature instance. How do you release a product with that? This is utterly ridiculous.
Here’s an idea, let’s try this. Get the 2 samples I’ve mentioned (not the only ones I found problems in). Put them on a clean system with VS 2013 and a brand new install of your licensed 8.0 WinForms product (with NOTHING else), just like a new customer (like me) would experience. Now, make it work correctly. Then get back to us and tell us what it takes to get there. I suspect that the answers to those 2 problems will likely get me back to a point where I can be productive. When you figure out the incantation, put it somewhere on the site that a new customer can’t possible miss it, with clear instructions what to do.
Hopefully I can get an update and instructions on how to proceed by tomorrow morning.
Hi Russ,
Thanks for let us know the problem, I reproduce your issue and found that caused by the MapSuiteCore.dll reference haven’t been updated to the latest in the sample.
I tested with 8.0.0.50 today and it works well.
What you want to do is:
1. Setup Unmanaged Dependencies, that will install CAD support dlls to system folder.
2. Download our latest dll package, remove original reference and reference the new one.
Wish that’s helpful.
Regards,
Don
No you have not reproduced my issue.
1) The MapSuiteCore.dll reference update is a compile error due to reference path. Both problems I reported are runtime errors, so clearly I got past the compile.
2) I’ve already stated that I can find no information on your site to download the unmanaged assemblies installer. Searching your entire site (from top of main page) last week failed to produce. I just tried again and get a 403 this time. I did see comments regarding it (sometimes) being part of the daily build images, but my requirement is to use the release, not daily builds.
So, assuming you ran the actual scenarios I posted and didn’t get the runtime errors (one a fail to load, the other an infinite recursion), it seems these unmanaged dependencies provide the answer. Now, can you answer where I might find them? Hopefully without waiting until tomorrow morning…
At a minimum, give me a link to the page on your site that tells me the following.
1) Gives me a link to download these mysterious “unmanaged dependencies”.
2) If it’s not an automatic installer (msi etc), give me a link to a page that describes the installment process.
Perhaps I just have some sort of blind spot on this site, but I have looked again and again, and still failed to find this information.
Ok, I decided to start looking again, and found the unmanaged msi.
“C:\Program Files (x86)\ThinkGeo\Map Suite 8.0\Map Suite Desktop\Daily Full Development 8.0.154.0\Map Suite Unmanaged Dependencies 8.0.122.0.msi”
I’m surprised I missed it, but still can’t believe that your site continually refers to it without any indication of where to find it (that I found). I would think it would be very clear.
In any case, this did not fix my problem.
DisplayCadFile, rebuilt after running the unamanaged msi, and referencing the installed 8.0 MapSuiteCore dll (see below), I still get the same error at the same line.
mapEngine = new MapEngine();
Referencing: C:\Program Files (x86)\ThinkGeo\Map Suite 8.0\Map Suite Services\Current Version\Managed Assemblies\MapSuiteCore.dll
Likewise, after running the unmanaged msi, I still get the stack overflow in the Exploring Layers sample.
So in short, the unmanaged dependencies msi appears not to correct the problem.
For reference I am is running
VS 2013 Update 2
Win 8.1
Your “8.0.0.0” product.
Hi Russ,
Sorry for the confusion, could you please update your test to us via forumsupport@thinkgeo.com or contact with support@thinkgeo.com for a FTP address to share your test data with us? We will try creating a demo to you.
Thanks,
Johnny
I’ll repeat again. I am confident I can manage our data once things work. The problem is that YOUR samples don’t work for me. They crash inside the core library code. If the samples relating to features we need don’t work, there is no point in trying to get our more complex real data to work.
So please do as I ask.
Take a clean system and install your 8.0 release MSI. If you use Win 8.1, VS2013 (update 2), your 8.0 release and the samples indicated, I am confident you can reproduce EXACTLY what I’m describing on YOUR system without any further information from ME. This is your samples and your libraries that are crashing. Not one line of my code involved. The only thing I did to your samples was update them to point to the current release bins in the install folder.
And I still haven’t found (or been shown) where this “Setup Unmanaged Dependencies” can be downloaded other than as part of the daily builds. And at this point I don’t want daily builds, I want release level code. Since this update seems to be a requirement, there should be a “blessed” install that matches the release. How many times must I ask the same question?
Ok, looks like this is resolved via an online assist. The problem appears to have resulted from multiple sources. One may have been related to the version that was available before a refresh that apparently occurred yesterday. It appears that the previous version may have had an issue, that appears also in the new version we installed (while using shared desktop) today. The verified problem with the current install (and apparently previous) was missing CAD support that should have been part of the standard registered install. We had to add those manually to C:\Windows\SysWOW64\Map Suite 8.0\CadX64 (not SystemRoot as specified in guide).
Another source of problem appears to have crept in while trying to fix the CAD support. At some point I managed to install the “evaluation version”, which updated my “current” bins folder under Program Files (x86).
So the resolution was to remove all traces of the Map Suite from my test VM. That included uninstall followed by manual removal of all traces from within both SysWow64 and Program Files (x86). We then installed the latest product center, logged in with registered account, and then installed the “Full Production” download. Finally we manually added the CAD support to SysWow64, and both samples I reported are now working correctly.
I’m now awaiting a fully supported install update that works correctly without the manual steps required. This is required to accept the update to Map Suite 8.0 internally. Hopefully they will be able to provide this official “production” update release soon. But until then, at least I can continue with my project…
Hi Russ,
We are sorry Don&Johnny might not catch the correct point on your question. I reviewed your issues and please let me explain something on unmanaged dependencies:
In order to support some special features in map suite, like CAD, Ecw, Jp2, FGDB,etc, we always need to refer to the third-party dependencies dlls and those dlls are included in an installer named “Unmanaged Dependencies.msi”. This installer is responsible to unzip those dlls under “systemRoot” automatically. The systemRoot folder means the folder “C:\Windows\System32” or “C:\Windows\sysWOW64”:
Case1: app win32 version on 32bit system => system32
Case2: app win32 version on 64bit system => sysWOW64
Case3: app win64 version on 64bit system => system32
So, after we install the Unmanaged Dependencies.msi, we should see the below dll structure.
As for the Unmanaged Dependencies.msi installer you are looking for, I have to say sorry again we did a strategy change that customer can’t download it directly via product center or customer portal since 8.0. But I agree to public it somewhere like before so that you can feel free to download it and I will let my leader knows if we have a solution on this stuff. For temporary, I shared it and please download it from ap.thinkgeo.com:5001/fbsharing/3Pvu5UQT
As for the Dependencies Guide in our wiki, the matrix lists those required dlls for each feature and its target location so that you can verify if those dlls are at the right position. From the guide you can also notice those feature’s mergemodules, they are used when we release our production, you don’t need to include all the dependencies dlls but only need the current mergemodules to support this feature.
Please let us know if you have any questions.
Thanks,
Troy
Thanks for the help.
I think the root of that “unmanaged dependencies” question was that the installer of the moment was not correctly installing the CAD files. The resulting error had me looking for answers, running across the references to the “unmanaged dependencies installer”, and then not being able to find where to get it.
Also, just for reference, “SystemRoot” has a very specific meaning for most Windows devs, and it’s been unchanged since early versions of Windows. It’s a standard environment variable, which is by default configured as “SystemRoot=C:\WINDOWS”. I would say it is a mistake for ThinkGeo to redefine this since it can easily cause the confusion I experienced. And I will also say that I never found where they define it at all, so was left only with my experience based interpretation.
Hi Russ,
I am also curious why the CAD dlls are not there after the installer is installed. But based on our test, the unmanaged dependencies installer is correct.
Another thing is the unmanaged dependencies installer is integrated into dll packages now and we can find it within the dlls packages.
As for the "SystemRoot", Oh, I think you might be right after some searching. I will let my leader to know if we can add more descriptions on the dependencies guide page.
Any questions, please feel free to let us know.
Thanks,
Troy