Jump to content

You're browsing the 2004-2023 VATSIM Forums archive. All content is preserved in a read-only fashion.
For the latest forum posts, please visit https://forum.vatsim.net.

Need to find something? Use the Google search below.

vPilot plugin development/debugging


Luke Kolin
 Share

Recommended Posts

Luke Kolin
Posted
Posted

I've started work on a vPilot plugin (thanks for the info Ross), but I don't think it's being invoked properly. I've got some debug code in it, but it doesn't appear in the vPilot console. How do I know if my plugin is being loaded successfully?

 

Cheers!

 

Luke

... I spawn hundreds of children a day. They are daemons because they are easier to kill. The first four remain stubbornly alive despite my (and their) best efforts.

... Normal in my household makes you a member of a visible minority.

Link to comment
Share on other sites

Ross Carlson
Posted
Posted

If you add the /dbgwin command line argument, the debug console will open immediately on startup, and you should then see an entry in the console indicating that vPilot has found your plugin. Looks like this:

 

[13:48:39.237] Found plugin: Metacraft.Vatsim.Vpilot.TestPlugin.TestPlugin

 

When you say you've got some debug code in it, what do you mean?

Developer: vPilot, VRC, vSTARS, vERAM, VAT-Spy

Senior Controller, Boston Virtual ARTCC

Link to comment
Share on other sites

Luke Kolin
Posted
Posted
If you add the /dbgwin command line argument, the debug console will open immediately on startup, and you should then see an entry in the console indicating that vPilot has found your plugin. When you say you've got some debug code in it, what do you mean?

 

You're awesome! I'm calling PostDebugMessage() on the Broker. Looks like it's not loading the plugin; it's built using .NET 4.0 but it claims it's a "new runtime". I'll back it down to 2.0 and see what happens.

 

Cheers!

 

Luke

... I spawn hundreds of children a day. They are daemons because they are easier to kill. The first four remain stubbornly alive despite my (and their) best efforts.

... Normal in my household makes you a member of a visible minority.

Link to comment
Share on other sites

Luke Kolin
Posted
Posted

Drat - can't do Memory mapped files in .NET 2.0.

 

Luke

... I spawn hundreds of children a day. They are daemons because they are easier to kill. The first four remain stubbornly alive despite my (and their) best efforts.

... Normal in my household makes you a member of a visible minority.

Link to comment
Share on other sites

Ross Carlson
Posted
Posted

In preparation for the AFV launch, I have had to move to targetting .net 4.7. The main vPilot [Mod - Happy Thoughts]embly now targets 4.7, but the plugins [Mod - Happy Thoughts]embly still targets 3.5. Would this allow you to use your 4.0 version? You can try it out by downloading 2.3.0 which is in the Beta updates channel. Let me know if it still complains and I can update the plugins [Mod - Happy Thoughts]embly to 4.7 as well.

Developer: vPilot, VRC, vSTARS, vERAM, VAT-Spy

Senior Controller, Boston Virtual ARTCC

Link to comment
Share on other sites

Luke Kolin
Posted
Posted

I'll need at least 4.0 - that seems to be where a lot of stuff got added. It's not a big deal (I managed to do it via P/Invoke) but I think targeting 4.0 would be a lot better than 3.5, unless it breaks something that already exists.

 

Cheers!

 

Luke

... I spawn hundreds of children a day. They are daemons because they are easier to kill. The first four remain stubbornly alive despite my (and their) best efforts.

... Normal in my household makes you a member of a visible minority.

Link to comment
Share on other sites

Ross Carlson
Posted
Posted

Give 2.3.0 a try, that should let you load a plugin built on the 4.0 runtime.

Developer: vPilot, VRC, vSTARS, vERAM, VAT-Spy

Senior Controller, Boston Virtual ARTCC

Link to comment
Share on other sites

Luke Kolin
Posted
Posted
Give 2.3.0 a try, that should let you load a plugin built on the 4.0 runtime.

 

Works like a charm. Thanks!

 

Luke

... I spawn hundreds of children a day. They are daemons because they are easier to kill. The first four remain stubbornly alive despite my (and their) best efforts.

... Normal in my household makes you a member of a visible minority.

Link to comment
Share on other sites

Ross Carlson
Posted
Posted

Great ... I'll be releasing 2.3.0 as Stable within the next day or two, in prep for the AFV launch.

Developer: vPilot, VRC, vSTARS, vERAM, VAT-Spy

Senior Controller, Boston Virtual ARTCC

Link to comment
Share on other sites

  • 3 weeks later...
Markus Ristl
Posted
Posted (edited)

Hi Ross,

 

maybe this is the same issue that the Prosim Utils vpilot plugin is not working any more with v 2.4.0? The plugin does not get called during startup when I deleted the config.xml.

 

with /dbgwin the error states:

[21:08:13.433] Error loading plugin from file "C:\Users\Markus\AppData\Local\vPilot\Plugins\PSU.vPilot2.dll": Could not load file or [Mod - Happy Thoughts]embly 'file:///C:\Users\Markus\AppData\Local\vPilot\Plugins\PSU.vPilot2.dll' or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515)

Edited by Guest

greetings from Vienna / Austria

Markus Ristl

My Homecockpit

Link to comment
Share on other sites

Ross Carlson
Posted
Posted

No, older plugins still work fine with 2.4.0. I am in contact with Humberto about it.

Developer: vPilot, VRC, vSTARS, vERAM, VAT-Spy

Senior Controller, Boston Virtual ARTCC

Link to comment
Share on other sites

Markus Ristl
Posted
Posted
No, older plugins still work fine with 2.4.0. I am in contact with Humberto about it.

 

Ok. Than its in good hands.

Hopefully fixed before the CTP event on saturday. *fingerscrossed*

greetings from Vienna / Austria

Markus Ristl

My Homecockpit

Link to comment
Share on other sites

Markus Ristl
Posted
Posted

I am running Win7 64bit on the machine where vpilot is running.

Could this be an issue or something missing with the new vpilot version?

greetings from Vienna / Austria

Markus Ristl

My Homecockpit

Link to comment
Share on other sites

Ross Carlson
Posted
Posted

Win 7 is fine, as long as you have the necessary .NET framework version installed. If you didn't, vPilot wouldn't run at all.

Developer: vPilot, VRC, vSTARS, vERAM, VAT-Spy

Senior Controller, Boston Virtual ARTCC

Link to comment
Share on other sites

  • 2 weeks later...
Markus Ristl
Posted
Posted

Hi Ross,

 

any news from Humberto on this?

Do you know if he is looking into this issue?

Thanks,

Markus

greetings from Vienna / Austria

Markus Ristl

My Homecockpit

Link to comment
Share on other sites

Ross Carlson
Posted
Posted

I haven't heard anything further from him.

Developer: vPilot, VRC, vSTARS, vERAM, VAT-Spy

Senior Controller, Boston Virtual ARTCC

Link to comment
Share on other sites

Markus Ristl
Posted
Posted

Hi Ross,

 

I think I found the issue:

 

Make a right click - properties to the PSU.vPilot2.dll

file.php?id=23694&t=1

Check for the Security details. For me it was enabled and the "Unblock" button was shown.

As soon as I clicked it, and restarted vpilot, it was working again.

For doublecheck, I removed the .xml config file from the vpilot plugins sub folder and reentered the connections again.

It also worked.

greetings from Vienna / Austria

Markus Ristl

My Homecockpit

Link to comment
Share on other sites

Ross Carlson
Posted
Posted

Did you download a new copy of the plugin? If not, it should have already been unblocked if it was working before you installed the new version of vPilot.

Developer: vPilot, VRC, vSTARS, vERAM, VAT-Spy

Senior Controller, Boston Virtual ARTCC

Link to comment
Share on other sites

Markus Ristl
Posted
Posted

No I didnt.

When I replied the Error message I posted, I googled this error and found there a hint for the security settings.

greetings from Vienna / Austria

Markus Ristl

My Homecockpit

Link to comment
Share on other sites

Ross Carlson
Posted
Posted

Doesn't make sense ... I don't see how the DLL could have been blocked if you didn't download a new version.

Developer: vPilot, VRC, vSTARS, vERAM, VAT-Spy

Senior Controller, Boston Virtual ARTCC

Link to comment
Share on other sites

  • 1 year later...
Ross Carlson
Posted
Posted

To anyone developing plugins for vPilot, be advised that I will be making a breaking change in the next release. I am moving all my personal software development projects out of the Metacraft namespace, to keep a clear separation between my work projects (Metacraft) and my personal projects, such as VATSIM applications.

Starting with the next release of vPilot, which will be v2.8, the namespace will be RossCarlson.Vatsim.Vpilot. This means that plugins that depend on the former namespace, Metacraft.Vatsim.Vpilot will no longer load. You'll need to recompile your plugin using the new namespace. Nothing else about the plugin API will be changing.

I tried to come up with an elegant way to be able to load plugins from both the old and the new namespaces, but I couldn't find a way that didn't incur technical debt, so I decided to just do a clean break.

Developer: vPilot, VRC, vSTARS, vERAM, VAT-Spy

Senior Controller, Boston Virtual ARTCC

Link to comment
Share on other sites

  • 8 months later...
Matthias Roschk
Posted
Posted

Hello,

 

i am working on a vPilot Plugin.
It works fine so far.
But i get no infor from ATIS Received.

Quote

            _broker.SelcalAlertReceived += Broker_SelcalAlertReceived;
            _broker.AtisReceived += Broker_AtisReceived;

When a SELCAL comes in i get it, but when/how can i get anything for the ATIS ?

Thanks
Matthias

Link to comment
Share on other sites

Ross Carlson
Posted
Posted
1 hour ago, Matthias Roschk 821976 said:

how can i get anything for the ATIS ?

This isn't clear from the minimal documentation I've done for the plugins, but you need to request an ATIS through the broker before it'll raise the AtisReceived event.

Developer: vPilot, VRC, vSTARS, vERAM, VAT-Spy

Senior Controller, Boston Virtual ARTCC

Link to comment
Share on other sites

Matthias Roschk
Posted
Posted

Hello,

 

ahh ok, thanks

Matthias

Link to comment
Share on other sites

 Share