It is currently March 20th, 2019, 4:48 pm

My custom plugin crashes on TCP connect?

Help with creating, editing & fixing problems with skins
Silverflow
Posts: 2
Joined: January 14th, 2019, 2:26 pm

My custom plugin crashes on TCP connect?

Silverflow » January 14th, 2019, 3:34 pm

So this is my first shot at making a plugin and things were going well until i wanted to set up the TCP connection.
I know the coding works because i first made a simple c# program to test everything before diving into this plugin development.
It uses System.Net.Sockets.TcpClient to make a connection with an arduino but things go wrong at line 110:

client.Connect(adress, port);

I tried hardcoding the address and port as well to make sure nothing went wrong there.
What could be causing this or even better yet, how do you debug such a thing?
Right now the connection is made in a try and catch structure but if i take it out of there then rainmeter will not even load the plugin and crash with an "error 126" in the logs.

here is the plugin file which is based on the PluginSystemVersion template given by the SDK:
https://github.com/Centens/Snippet

Really appreciate it if you decide to help me out here! :thumbup:
Silverflow
Posts: 2
Joined: January 14th, 2019, 2:26 pm

Re: My custom plugin crashes on TCP connect?

Silverflow » January 14th, 2019, 6:26 pm

Man i was so bizy fiddling with the code that i never thought about the firewall. :oops:
Seems it was blocking Rainmeter but not Visual Studio so it works in my own app but crashes in rainmeter.