It is currently April 23rd, 2024, 8:19 pm

My custom plugin crashes on TCP connect?

Get 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?

Post by Silverflow »

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?

Post by Silverflow »

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.