Bridge plug-in runtime error.

Interested in developing new plug-ins? Got one to share? Post here!
bokkie
Posts: 767
Joined: Sun Feb 08, 2009 6:30 am

Re: Bridge plug-in runtime error.

Postby bokkie » Fri Sep 07, 2012 12:06 pm

Francesco,

I fully believe that you have tested them. :)

I spent a bit of time cleaning up the solutions in my first plugin as I wanted to make it easier to print them and by cleaning them up I could learn a little more about what goes on while I was taking my time. It was once written by someone "When I read, I forget; when I see, I remember; when I do, I understand."

At work, I am developing a rather comprehensive hardware PLC driver. The manufacturer's protocol has more trip hazards than a badly broken sidewalk. We use a TCP/IP-to-RS232 converter and one of the installation niceties is to send a protocol message to the PLC during installation. Depending on the status codes given back will determine what additional files are needed. The PLC has many, many variants and what's on the label does not always conform to the firmware downloaded to it. This is where a plugin will help very well.

Like I once said before, I need to learn walking before running so the more time I spend testing the basics then I will incrementally increase my knowledge about how well they work in IA. The first steps then are to test and lots of it. I really think the bridge concept will make IA even better. I don't know if the "other" product, can do anything as close as IA does but I'm sure Glen, christ23 and myself will do our best to test the plugin concept. :D
Peter. Smartly dressed, he still resembles an unmade bed.
InstallAware MVP

MaxLogic.eu
Posts: 25
Joined: Sat Oct 08, 2011 2:42 am
Contact:

Re: Bridge plug-in runtime error.

Postby MaxLogic.eu » Fri Sep 07, 2012 1:54 pm

In any case, if you have still problems, just post here and I or Francesco will be glad to help.
About me:
Pawel Piotrowski is a software developer and a Delphi and C++/C# expert with 15 years of programming experience.
Learn more at http://www.maxlogic.eu

glenharvy
Posts: 167
Joined: Fri Sep 14, 2007 3:53 am

Re: Bridge plug-in runtime error.

Postby glenharvy » Mon Sep 10, 2012 3:11 pm

Hi Francesco,

Thanks for all your efforts to date.

FrancescoT wrote:Said this, for any information regarding the functions usage and parameters, you must refer to InstallAware Plugin documentation.


It looks like I will need to learn C++ because in it's present form I can't make use of the .Net Interface. Can you tell me where I can locate the documentation you mentioned please.

FrancescoT wrote:Last but not least, as compendium to the plugin skeleton available with InstallAware NX, I have realized a simple NET plugin ready to use.
My plugin sample is a DUMMY plugin that in reality does nothing, but illustrates with a ready to use sample how it works.
I will post you very soon all the projects required to test it ... so I'm just asking you to be patient for while ... the time required to complete some parts that I think you will find useful.


I would appreciate it if you could include the source code for your sample. Then I will have a working code sample that I can learn and implement something I can use.

FrancescoT wrote:These last two weeks has been very busy for me, Bridge testing, sample testing and ... many more.
Regards


But very productive it seems. Hopefully we will all be able to benefit from it.

Once again, thanks for your efforts.

FrancescoT
Site Admin
Posts: 5360
Joined: Sun Aug 22, 2010 4:28 am

Re: Bridge plug-in runtime error.

Postby FrancescoT » Tue Sep 11, 2012 12:44 pm

Dear Glenharvy,

It looks like I will need to learn C++ because in it's present form I can't make use of the .Net Interface. Can you tell me where I can locate the documentation you mentioned please.

I'm not saying that you have to learn C++ ( ... even if I personally believe that knowing C/C++ can be very useful ... probably because I really like it and I'm proud to be a C/C++ developer), I meant that references to Plugin functions are used in the same way.

Plugin functions reference are available with InstallAware documentation (Plug-in Development topic under the IA documentation main content).

just a bit of patience ... I will post my sample very soon.

Regards
Francesco Toscano
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE

bokkie
Posts: 767
Joined: Sun Feb 08, 2009 6:30 am

Re: Bridge plug-in runtime error.

Postby bokkie » Wed Sep 12, 2012 12:16 am

The really irritating thing for me is not being unable to use the bridge at this time. What I'm saying, is that since we had the avalanche of problems and the solution to them I've simply not had the time to even look at it! I've been doing insane hours at work recently (I hate deadlines :D) so I've not even had the energy to try it all again. Just as soon as this week is behind me I intend to go to the bridge and see if I can cross it. Until then, if Glenn or christ23 have called it successfully using c# I'd like to hear about it. :)
Peter. Smartly dressed, he still resembles an unmade bed.
InstallAware MVP

christ23
Posts: 82
Joined: Mon Jan 16, 2012 4:51 am

Re: Bridge plug-in runtime error.

Postby christ23 » Wed Sep 12, 2012 12:52 am

Bokkie,

i am really according to you. I have spent so much time on the plugin, because i thought that it is me something doing wrong, but now knowing it was the bridge.
Still yet i did not have the time to go onto the plugin again, and i think i will better wait for the examples of Francesco, because i already have spent so much time at the plugin theme.

So, i am hopefully looking forward getting the examples :). But do not hurry, Francesco, the plugins won't run away.

bokkie
Posts: 767
Joined: Sun Feb 08, 2009 6:30 am

Re: Bridge plug-in runtime error.

Postby bokkie » Fri Sep 14, 2012 12:24 pm

At long last, things have quietened down a lot at work. This weekend, I want to schedule some plugin time and see where we are at. I'm probably going to mess it up somewhere but if I can get the basics to work I'll be happy. I figure though, I might have some more questions... :D
Peter. Smartly dressed, he still resembles an unmade bed.
InstallAware MVP

bokkie
Posts: 767
Joined: Sun Feb 08, 2009 6:30 am

Re: Bridge plug-in runtime error.

Postby bokkie » Fri Sep 14, 2012 2:53 pm

Chaps, this is what I've tried. First, notice the three attachments:

Hairball.7z contains the registry keys that add the plugin for use in IA. Double-click the Hairball.reg file.

TestABCDE.7z is the sample project I used. Look at the top of the MSIcode and you'll see reference to the Cats Hairball plugin.

ABCDE.7z is the bridge stuff. I compiled the projects in VS2012 which won't be a problem as VS2010 can open the same solutions. If you have VS2008 you'll have to create a new bridge of the same name, ABCDE, and copy and paste my source files. The names are the same. Sorry, but I only have VS2012 installed. I changed the CompileTimeTest.dll and added some more files and a loop to copy them. No rocket science! Both c# projects use framework 2.0.

For consistency, unzip the three files into the same folder I used C:\Temp.

I built the assemblies. No problem. I added them as support files to TestABCDE. When I build and run the project and run it, I get two big messages boxesthat display all the variables and their values. No problem. It then goes through the dialogs and then hits the wall:

It displays about 16 (yes, sixteen) " is not a valid integer message boxes. The last one I dismiss says "Runtime error in setup script. Source file TestABCDE. Line number 193".

christ23, Glenn, anyone else care to try my attachments and see what happens? It's been a hell of a long week and I'm eager to get away from the keyboard but if anyone can tell me what I'm doing wrong I'll be happy to read about it. I downloaded the latest version from IA's website this afternoon so I think I'm as up to date as I can be and I regenerated my licence file. That's it for now. :)

Edit: Another thing I noticed is that $TITLE$ is getting changed/corrupted. When I ran the project with the plugin statement in the MSIcode the dialogs no longer display the name of the project. Instead, the dialogs display literally "$TITLE$". If I delete the plugin line from the MSIcode then $TITLE$ displays its value correctly. I can't explain why but it does do this.

Edit #2: I moved the plugin statement further down in the code; in fact on the line immediately below the line number it complained about above. This time, the title of the project was displayed correctly. It leads me to think that where you add the plugin statement in the MSIcode, then so the "damage" it causes moves with it? In a sense, I feel happy knowing that christ23's "is not an integer" problem is still lurking. I never set out to break anything deliberately so please accept my findings and reports as part of the process.
Attachments
Hairball.7z
(358 Bytes) Downloaded 1978 times
TestABCDE.7z
(2.27 MiB) Downloaded 1920 times
ABCDE.7z
(1.12 MiB) Downloaded 1959 times
Peter. Smartly dressed, he still resembles an unmade bed.
InstallAware MVP

christ23
Posts: 82
Joined: Mon Jan 16, 2012 4:51 am

Re: Bridge plug-in runtime error.

Postby christ23 » Sat Sep 15, 2012 1:48 pm

Bokkie,

Yeah now you are at my level :). The error you are getting is exactly the same i am hanging on for weeks now :). Also the 16 boxes (but i have to declare that i never counted them :) )

I cannot tell you, from where the error comes and why it is thrown. I opened a thread discussing this error a little time ago, but there has never been a solution.

Bokkie, did you use the "new bridge", included in NX, or an older version?

I thought this error has been removed in the bridge from NX, but it seems that it is the one i hqve since some weems, months, ...

Anybody from IA who could clarify the situation??
Last edited by christ23 on Sun Sep 16, 2012 11:08 am, edited 1 time in total.

bokkie
Posts: 767
Joined: Sun Feb 08, 2009 6:30 am

Re: Bridge plug-in runtime error.

Postby bokkie » Sat Sep 15, 2012 1:58 pm

Hello christ23, glad to see you are lurking this evening (UK time). I'm sad to have reached your level. :(

I downloaded the latest version on Friday afternoon so what I have is as fresh as it gets. Perhaps there is a new version still to be released?

Did you observe "corruptions" to variables like I did, especially $TITLE$ having it's variable name as its value? :?

If I had the confidence to use C++ or the money to buy Delphi, I'd consider both alternatives. :)

It seems we have to wait a while longer.
Peter. Smartly dressed, he still resembles an unmade bed.
InstallAware MVP

glenharvy
Posts: 167
Joined: Fri Sep 14, 2007 3:53 am

Re: Bridge plug-in runtime error.

Postby glenharvy » Sat Sep 15, 2012 2:12 pm

Just to let you know I'm still lurking here but am waiting for Francesco to post his 'SAMPLE' because without it, all this is useless to me. I did think however that the new release fixed the issue we are having and I have downloaded and installed it in preparation for the 'SAMPLE'.

I have also started learning C++ and am amazed how similar to C# it is. This will be a long term goal of mine but writing a IA plugin seems as good a place to start as anywhere else :D

bokkie
Posts: 767
Joined: Sun Feb 08, 2009 6:30 am

Re: Bridge plug-in runtime error.

Postby bokkie » Sat Sep 15, 2012 2:28 pm

Evening, Glenn. I'd like to read our dear friend Francesco's comments as well. He must be getting very fed up and annoyed with us by now. :wink:

It seems we're hitting the same problems from different sides perhaps, so perhaps that will aid his and IA's research. I'm sort of tempted to try the C++ route but when I took a look at the plugin template it overwhelmed me a bit, hence I'd like to stick it out until c# plugins are up and running. Once we get to the point it is, then I still want see if it's possible to return a variable using the plugin. There are other ways of doing it, perhaps by writing results to the registry for example. The message box that displays the pile of variables seems to have tons of stuff in them you can use.

I'd still like to know what the first and second iterations are about.

And so to bed. G'night all.
Peter. Smartly dressed, he still resembles an unmade bed.
InstallAware MVP

bokkie
Posts: 767
Joined: Sun Feb 08, 2009 6:30 am

Re: Bridge plug-in runtime error.

Postby bokkie » Sun Sep 16, 2012 1:57 am

FrancescoT wrote:For a complete list of the changes introduced with the new 14.03, please refer to:
Regards


Francesco, how do I know if what I've downloaded is 14.03? When I click the Project tab Version button it tells me NX (Build 9.12.12) Mooooya. Is that the same?
Peter. Smartly dressed, he still resembles an unmade bed.
InstallAware MVP

christ23
Posts: 82
Joined: Mon Jan 16, 2012 4:51 am

Re: Bridge plug-in runtime error.

Postby christ23 » Sun Sep 16, 2012 11:16 am

Bokkie,

A) Yes, mi $title$ is corrupted too (like many other variables)

B) @glenharvy : C# is similar to C++, not as you wrote ;). C++ was before C# ..

C) But this is exactly the reason why i want to use C# ... C++ is not the thing i want to continue myself ...

Waiting for the samples ...
Ah, and my timezone is berlin,but i do not live there ;)

bokkie
Posts: 767
Joined: Sun Feb 08, 2009 6:30 am

Re: Bridge plug-in runtime error.

Postby bokkie » Sun Sep 16, 2012 2:09 pm

christ23,

I noticed that there was a recent version available for download posted after I downloaded on Friday (version 9.12.12). The version displayed now is build 9.14.12.

I'm sticking my neck out here a little but am I being too optimistic to think it's now working? The reason I say that is that after installing NX using the download I got this afternoon, I created new versions of the plugin and a test installation project. I edited my plugin registry and changed the pathname to the new plugin, that sort of thing. I built the project, ran it, and now (at this time) there are no more error messages and the $TITLE$ value is now restored.

I then copied the bridge dlls to my original plugin I created on Friday evening (using Friday's download). The bridge dlls are smaller than Friday's dlls. I then ran my original plugin without changing anything and again, it all worked well, no more errors. I'm not saying I'm 100% successful in everything I'd like to try but I really feel we are a step closer now. So, download the version on the website which does have a different version to Friday's and try it. In theory, you only need to copy the bridge dlls and rename to the same names you used. I think you may find it will work for you. I look forward to you and Glenn giving the heads-up that it's okay for you as well. :) :!: :!: :!:

Edit: I also wrote all the variables the plugin received to a text file. Immediately before the plugin I created a variable. Unfortunately, the plugin doesn't seem to get my own defined variables and their values. It only gets the "master" variables if you understand me. I'm not sure if that is by design, or is perhaps a new bug now that we can go further than before? It might be worth trying for yourself to confirm it. Best of luck. I look forward to reading your results.
Peter. Smartly dressed, he still resembles an unmade bed.
InstallAware MVP


Return to “Plug-In Development”

Who is online

Users browsing this forum: No registered users and 38 guests