Author Topic: plug in bundle fails to load  (Read 7294 times)

0 Members and 1 Guest are viewing this topic.

Kotofej

  • Guest
plug in bundle fails to load
« on: July 08, 2016, 10:37:35 AM »
Hello to all,

as the title suggests, I have problems (as anticipated) with something which looked decievingly simple at first glance. After following Autodesk's instructions and resources from the web, I created a simple testing .bundle folder with the accompanying .xml file, as well as a .lsp file. I placed it in all possible folders (Program data..., Program files..., User...) and after launching AutoCAD, a bubble appears and says "Unable to load unnamed plugin" (using AutoCAD 2014). Also, the log file is pretty useless.

I tried to download some free plugins - which all work normally - from the app store and compare their content (specially the .xml file) and saw no discrepancies of concerns. Although these apps used an installer which possibly made some additional changes which I didn't make in order for the plugins to work.

I am interested if anyone has any experience with .bundle-ing up their applications and if so, any advice is highly appreciated. On request, I can post more details if needed.

Jeff_M

  • King Gator
  • Posts: 4087
  • C3D user & customizer
Re: plug in bundle fails to load
« Reply #1 on: July 08, 2016, 12:30:08 PM »
Can you share the bundle here?

Atook

  • Swamp Rat
  • Posts: 1027
  • AKA Tim
Re: plug in bundle fails to load
« Reply #2 on: July 08, 2016, 12:33:38 PM »
What version of CAD are you running? Security requirements for bundles changed with 2017.

Kotofej

  • Guest
Re: plug in bundle fails to load
« Reply #3 on: July 08, 2016, 12:38:42 PM »
I'm using AutoCAD 2014. I added the bundle to the attachment.


ChrisCarlson

  • Guest
Re: plug in bundle fails to load
« Reply #4 on: July 08, 2016, 12:54:16 PM »
Is it a full version of 2014 or LT?

Jeff_M

  • King Gator
  • Posts: 4087
  • C3D user & customizer
Re: plug in bundle fails to load
« Reply #5 on: July 08, 2016, 01:02:47 PM »
This line needs a space added:
   <RuntimeRequirementsOS="Win32|Win64|MacOS" Platform="AutoCAD|AutoCAD*"/>

so it looks like this:
   <RuntimeRequirements OS="Win32|Win64|MacOS" Platform="AutoCAD|AutoCAD*"/>

It then loads and the command runs, using Autocad 2016 and placing the bundle in C:\ProgramData\Autodesk\ApplicationPlugins

Kotofej

  • Guest
Re: plug in bundle fails to load
« Reply #6 on: July 08, 2016, 02:42:34 PM »
My bad, this was a trivial mistake.

But unfortunately, this still doesn't work for me. Btw, I'm not using LT

Edit: interestingly, I have 3 other apps (some default apps) in that folder and they all load with no problems.

BlackBox

  • King Gator
  • Posts: 3770
Re: plug in bundle fails to load
« Reply #7 on: July 08, 2016, 05:59:39 PM »
Just an observation -

Only "AutoCAD*" is needed, as "AutoCAD|AutoCAD*" is redundant for any version that supports the former (2013-2017).

*If* memory serves, only 2012 version requires each-and-every-single product to be specified.


Cheers
"How we think determines what we do, and what we do determines what we get."

Jeff_M

  • King Gator
  • Posts: 4087
  • C3D user & customizer
Re: plug in bundle fails to load
« Reply #8 on: July 08, 2016, 08:40:02 PM »
Kotofej, I tested with C3D 2014 and your bundle loaded perfectly for me.

Kotofej

  • Guest
Re: plug in bundle fails to load
« Reply #9 on: July 09, 2016, 03:40:01 AM »
Bizzare, right now I'm thinking of actually reinstalling AutoCAD.

Kotofej

  • Guest
Re: plug in bundle fails to load
« Reply #10 on: July 09, 2016, 08:12:55 AM »
By the way, should the folder ProgramData/... be specified in the support file search path, if not?

Edit: a side note - when I type "appmanager" in the command prompt, the app shows up there, although after right-clicking it, I can't do anything. So it appears the app is recognized, but not loaded.
« Last Edit: July 09, 2016, 10:47:52 AM by Kotofej »

BlackBox

  • King Gator
  • Posts: 3770
Re: plug in bundle fails to load
« Reply #11 on: July 09, 2016, 04:00:24 PM »
This is representative of how incomplete, or improperly implemented the Autoloader mechanism really is....

PackageContents.xml loading properly registers the App (and Commands?), but does not ensure that the dependent executable file(s) are loaded... And does not un-register the App, should the loading of the executable(s) fail.
"How we think determines what we do, and what we do determines what we get."

kdub_nz

  • Mesozoic keyThumper
  • SuperMod
  • Water Moccasin
  • Posts: 2124
  • class keyThumper<T>:ILazy<T>
Re: plug in bundle fails to load
« Reply #12 on: July 09, 2016, 06:52:55 PM »
This is representative of how incomplete, or improperly implemented the Autoloader mechanism really is....

PackageContents.xml loading properly registers the App (and Commands?), but does not ensure that the dependent executable file(s) are loaded... And does not un-register the App, should the loading of the executable(s) fail.

Don't expect it to be fixed ... they're too busy Forging ahead ...
Called Kerry in my other life
Retired; but they dragged me back in !

I live at UTC + 13.00

---
some people complain about loading the dishwasher.
Sometimes the question is more important than the answer.

Kotofej

  • Guest
Re: plug in bundle fails to load
« Reply #13 on: July 10, 2016, 12:27:02 PM »
I am somehow getting an implicit message here which says: "Better avoid using plug-ins as a mean of app distribution."

Jeff_M

  • King Gator
  • Posts: 4087
  • C3D user & customizer
Re: plug in bundle fails to load
« Reply #14 on: July 10, 2016, 12:56:23 PM »
Kotofej, the bundle system works well...once you get it setup correctly. I've now tested your bundle (after that minor edit) on 2 computers and it's working fine.

Kotofej

  • Guest
Re: plug in bundle fails to load
« Reply #15 on: July 10, 2016, 01:39:21 PM »
OK, if I manage to solve this problem, I'll post what it was. Obviously something related specifically to my computer.

Anyways, thanks to all of you for your feedback!

BlackBox

  • King Gator
  • Posts: 3770
Re: plug in bundle fails to load
« Reply #16 on: July 10, 2016, 01:42:25 PM »
Kotofej, the bundle system works well...once you get it setup correctly.

This.

I'm a big fan of the Autoloader mechanism, actually - I use it both for my own daily work for custom internal tools, as well as SincPac.  :wink:

I also publish a few of my smaller apps at Autodesk Exchange, and merely pointed out Autodesk's historical pattern of introducing something, and being okay with things not being what they could be; this is no different than many of the long-standing bugs, etc within AutoCAD itself.

Another example of this, with regard to Autoloader, is custom system variables - Int variable type is not properly implemented, the way string types are, and there is no means by which to implement a bit-coded sysvar via PackageContents.xml directly.

I didn't mean to deter you from Autoloader, as it is exceptionally good at the few things that it does; as Jeff aptly points out, you just need to be mindful to use it well.


Cheers
"How we think determines what we do, and what we do determines what we get."

BlackBox

  • King Gator
  • Posts: 3770
Re: plug in bundle fails to load
« Reply #17 on: July 10, 2016, 05:39:20 PM »

Don't expect it to be fixed ... they're too busy Forging ahead ...

Code - C#: [Select]
  1. Modes normality = this.Mode;
  2. this.Mode = Modes.ExpectationsManaged;
  3.  

This, too.  :|

Code - C#: [Select]
  1. this.Mode = normality;
  2.  

"How we think determines what we do, and what we do determines what we get."

Kotofej

  • Guest
Re: plug in bundle fails to load
« Reply #18 on: July 13, 2016, 11:54:29 AM »
Just to inform you, I finally got this to work. It turns out that replacing the line

<RuntimeRequirements OS="Win32|Win64|MacOS"Platform="AutoCAD*"/>

with

    <RuntimeRequirements OS="Win32|Win64|MacOS" Platform="AutoCAD*"/>

did the job. Although I'm a bit surprised that the space between " and Platform made a difference, I'm pretty new to xml, and I assume this is possibly a bug? Since I would expect it to ignore a blank space at the end of the last function argument (the string "Win32|Win64|MacOS"). Pretty terrible.

BlackBox

  • King Gator
  • Posts: 3770
Re: plug in bundle fails to load
« Reply #19 on: July 13, 2016, 05:50:20 PM »
The spacing is only really an issue following an XmlNode, XmlAttribute's value, etc... Once separated, multiple spaces can be used without issue, but there needs to be a space, or it time up the works. *shrugs*
"How we think determines what we do, and what we do determines what we get."

Jeff_M

  • King Gator
  • Posts: 4087
  • C3D user & customizer
Re: plug in bundle fails to load
« Reply #20 on: July 13, 2016, 06:04:21 PM »
Kotofej, looks like my post showing that I added a space before the OS also shows that space before Platform. I do not recall adding it, but I did load the packagecontents file into XMLEditor. Perhaps it automatically added the other space. Sorry I didn't notice that earlier.

You may want to grab XMLEditor. Using this is what led me to find the first missing space, as it would not load due to an error on line XX. Once you learn how to use it, it's much easier (imho) to create & edit xml files.

BlackBox

  • King Gator
  • Posts: 3770
Re: plug in bundle fails to load
« Reply #21 on: July 13, 2016, 11:03:24 PM »
I just use Notepad++; it's free, and can be configured for custom theme, syntax highlighting, etc.
"How we think determines what we do, and what we do determines what we get."

kdub_nz

  • Mesozoic keyThumper
  • SuperMod
  • Water Moccasin
  • Posts: 2124
  • class keyThumper<T>:ILazy<T>
Re: plug in bundle fails to load
« Reply #22 on: July 13, 2016, 11:34:24 PM »
[gump]

free isn't always the cheapest

[/gump]
Called Kerry in my other life
Retired; but they dragged me back in !

I live at UTC + 13.00

---
some people complain about loading the dishwasher.
Sometimes the question is more important than the answer.

BlackBox

  • King Gator
  • Posts: 3770
Re: plug in bundle fails to load
« Reply #23 on: July 13, 2016, 11:53:26 PM »
[gump]

free isn't always the cheapest

[/gump]

 :-D

... I know some folks that still use Notepad. *chortle*


"How we think determines what we do, and what we do determines what we get."

Kotofej

  • Guest
Re: plug in bundle fails to load
« Reply #24 on: July 15, 2016, 01:47:13 PM »
I also use Notepad++, however it does not highlight such syntax errors. Anyways, I'm glad that the answer to the problem was trivial, as it is in many cases. Thanks for the help and tips, folks!

dgorsman

  • Water Moccasin
  • Posts: 2437
Re: plug in bundle fails to load
« Reply #25 on: July 18, 2016, 10:38:18 AM »
If you're already using Visual Studio, it has a decent XML editor as well.  While it has its downsides, the fact that XML can be done with something as simple as notepad is a benefit - when I need to make small tweaks to data I don't need a full-blown application to do so.
If you are going to fly by the seat of your pants, expect friction burns.

try {GreatPower;}
   catch (notResponsible)
      {NextTime(PlanAhead);}
   finally
      {MasterBasics;}