MapWindow / MapWindow5

MW5 is a desktop GIS which is extendable using the plug-in architecture. It is using the MapWinGIS mapping control and is created from scratch in 2015 using new technologies like MEF and Dependency Injection making it small in size, robust and fast.
288 stars 100 forks source link

Disappearing Plugins List #5

Closed dhuantes closed 7 years ago

dhuantes commented 7 years ago

Something caused the plugins to stop being listed under the plugins menu. Additionally when clicking configure-plugins there are no plugins shown despite the Plugins subfolder being completely populated. Going to clone and build MapWindow to see if I can found out why. But thought someone might have a quick answer. Thanks.

dhuantes commented 7 years ago

I cloned, compiled, worked out several missing references and then ran MW5 from compiled source and, of course, the problem went away (at least for that instance of MW5). I then went back to the installed version and the same problem persisted (didn't do anything so didn't expect any change). Looking at the code, I didn't see anything obvious that would cause the PluginManager not to load the plugins. I did some Googling and found http://mikehadlow.blogspot.com/2011/07/mef-directorycatalog-fails-to-load.html which is a good thing to know but after checking the DLLs this was not the problem. But while looking at the plugins directory I noticed that copies of the SyncFusion...dlls were copied into the plugin directory. When I deleted them the problem went away (after restarting MW5). So I started wondering.... These DLLs are not plugins so was the MEF DirectoryCatalog saying NO when any DLLs were not plugins were found? So I put 1 of the DLLs back in and the problem didn't come back. I put 2 back in and the problem still didn't come back. I put them all in and the problem returned. What I eventually found was that there were 11 actual plugins in my Plugins directory and if there are 5 or less (less than 1/2 the number of actual plugins) of non-Plugin DLLs then the MEF DirectoryCatalog seems to not have a problem. But as soon as I add another non-Plugin DLL (i.e. 6 non-Plugin DLLs is more than 1/2 the number of actual plugins) the MEF DirectoryCatalog seems to not load any. So mystery somewhat solved. Keep extra non-Plugin DLLs out of the Plugins directory if you can afford it.....I say "somewhat" because don't know if this is an MEF DirectoryCatalog "feature" or something else. Nonetheless I found this workaround/fix...:-)...

dhuantes commented 7 years ago

Well... My work around was shorted lived. I ran into the problem again as my MW5 plugin has several dependency that all end up in the Plugins subdirectory causing this problem to occur again. Fortunately I figured out the problem. I just submitted a pull request (MapWindow/MapWindow5#6) that improves plugin loading error handling and should help others in the future.

pmeems commented 7 years ago

I've just merged your pull request. It seems you have good skills. Do you want direct commit access and help us fix some more issues and improvements? To see what is this needed: https://mapwindow.atlassian.net/secure/Dashboard.jspa

dhuantes commented 7 years ago

Would love to but am currently spread pretty thin. I just created a JIRA account under by e-mail (daniel.huantes@gmail.com) if you'd like to add me to the MapWindow v5 project. Also not sure if everyone has their own fork and are pulling from it or what your preferred commit procedures are. Let me know. Thanks.

Dan

On Fri, Dec 30, 2016 at 2:11 PM, Paul Meems notifications@github.com wrote:

I've just merged your pull request. It seems you have good skills. Do you want direct commit access and help us fix some more issues and improvements? To see what is this needed: https://mapwindow.atlassian. net/secure/Dashboard.jspa

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/MapWindow/MapWindow5/issues/5#issuecomment-269816559, or mute the thread https://github.com/notifications/unsubscribe-auth/ACeLGFplSK7-CC3T-EnFdsMd7PFClLjxks5rNWWAgaJpZM4LSfcw .

pprebeg commented 7 years ago

Hi, I am having the same issue. I have installed the last Mapwindov v5 x64 binary version available at GitHub. Is there a way to get the binaries of the version where this issue is resolved? Thanks. Pero

pmeems commented 7 years ago

When you send me an e-mail (bontepaarden[AT]gmail[D0T]com) I can send you a beta version which has this fix (among others).