Comments (37)
@Gavenvincent You are welcome to try https://github.com/TiltonJH/secs4net. I fixed the leak there. I also created a pull request, but mkjeff does not seam to be interested in it.
from secs4net.
No it is not normal. the reason are the not reused or disposed SocketAsyncEventArgs. I fixed it. I am preparing to a pull request.
from secs4net.
I have created the promised pull request to fix the memory leak (and other issues) #35
One can also see the code here: https://github.com/TiltonJH/secs4net
from secs4net.
The reason are the not reused or disposed SocketAsyncEventArgs as described here: SocketAsyncEventArgs Class#Remarks
I also fixed an issue where messages went missing, because only the first message was read from the buffer.
from secs4net.
let's keep post Q&A here.
from secs4net.
The same thing happened to me,There's going to be a memory leak every time when click the send button.
Steps to reproduce the behavior:
1.Start two instances
2. Connection successful
3. passive form send messages to the active form,and successfully
4. Then,there's going to be a memory leak every time when click the send button.
from secs4net.
@TiltonJH HI,Thanks~
This problem is caused by my UI!
from secs4net.
Thank you!
I want to use the improved software.
I am waiting to be merged.
from secs4net.
@tazu08408 do you have any progress of this project ? can you run EAP Host?
from secs4net.
@dzhydaniel
No, there is no progress on this project.
A memory leak occurred in the development of an application using this library.
Check the operation on the EAP host.
Are there any results that do not cause memory leaks?
from secs4net.
@tazu08408 did you can run MWN01 or PEU01? i can't, this has bugging me for a very long time.
from secs4net.
@tazu08408 @TiltonJH hi guys do you have the intreast of start a group on we chat
from secs4net.
@dzhydaniel
I would like to actively discuss SECS communications.
The platform to discuss may be any SNS.
from secs4net.
@dzhydaniel
MWN01 and PEU01 are not used.
It uses only the SECS communication function and uses the original wrapper library based on SECS4NET.
We are developing communication software for semiconductor devices.
from secs4net.
@dzhydaniel
I would like to actively discuss SECS communications.
The platform to discuss may be any SNS.
seems only two of us are active offtenly.
from secs4net.
Do you discuss here?
There is a possibility that others will cooperate.
from secs4net.
What are the challenges with SECS4NET?
I have problems with memory leaks and I have not been able to identify the cause either in SECS4NET or my own library.
from secs4net.
I have not run into memory leak problem yet, right now i am trying to set auto reply mechanism, and try to figure out how to define message,how to update item value in one message.
from secs4net.
Hi,
in order for the pull request, I need to solve a Git problem. I cloned this repository to our on site TFS. I am still new to Git and can not figure out how to create the pull request from our master on the on site TFS to this repository on GitHub. Can someone help me or give me a push in the direction of the solution?
from secs4net.
Hi,
I am also no git master, but i think one of the easiest solutions would be to clone the repository from the tfs to your local machine and change the remote to the github address and then create the pull request.
The command for doing this should look like this:
git remote set-url origin https://github.com/USERNAME/REPOSITORY.git
from secs4net.
@TiltonJH how to contact you besides this frum
from secs4net.
@dzhydaniel Contact me? To what end?
from secs4net.
@TiltonJH my company need secs/gem solution, it appears you have alot know-how and technical skills, i think may be my company and you can work together .
from secs4net.
@dzhydaniel thx, but I am germany based and currently working for a company which sells a product which uses secs4net. Maybe this could be your secs/gem solution. Have a look at www.inqu.de. especially for our InQu.MDA.
from secs4net.
@TiltonJH That's really awesome.I will try and I would like to know where exactly is mkJeff's memory leak ,then do some detailed memory analyses.
from secs4net.
@TiltonJH Thank you very much ! I'll start with that.
from secs4net.
@TiltonJH I hava tried your https://github.com/TiltonJH/secs4net ,but there's still going to be a memory leak every time when click the send button.How can i fix it?
Thank you~
from secs4net.
@0daycrack Any more information on that? How do you arrive at this conclusion?
I could not find a leak in all my extensive tests.
from secs4net.
@TiltonJH Hi, I use a timer to cycle send messages,
The following are my codes:
①Button Click
private void btnSendPrimary_Click(object sender, EventArgs e)
{
timer1.Interval = 10;
timer1.Enabled = true;
}
②Timer Event
private async void timer1_Tick(object sender, EventArgs e)
{
if (_secsGem.State != ConnectionState.Selected)
return;
if (string.IsNullOrWhiteSpace(txtSendPrimary.Text))
return;
try
{
var reply = await _secsGem.SendAsync(txtSendPrimary.Text.ToSecsMessage());
txtRecvSecondary.Text = reply.ToSml();
}
catch (SecsException ex)
{
txtRecvSecondary.Text = ex.Message;
}
}
The following are my steps:
1.Start two instances
2. Connection successful
3. passive form send messages to the active form,and successfully
4. Then,there's going to be a memory leak
from secs4net.
@0daycrack Hi, So you lock at the memory allocation and it steadily grows?
You could use Visual Studio Diagnostic Tools to analyze your memory with memory snapshots (while debugging) and determine what kind of object or objects remain. Once that is done and it is actually a object from within secs4net. I can take a look where that object is used and where it is kept and for what purpose. And then fix the issue.
It could also be possible that it is not sec4net, but your UI that keeps things referenced and thereby keep the GC from collecting it.
from secs4net.
@TiltonJH Hi,I have tried your https://github.com/TiltonJH/secs4net, It has solved the memory leak problem, but I have found another problem:
The reconnection problem occurs After frequently disconnecting the device when the program is running in Active mode。
from secs4net.
@TiltonJH is awesome! but I faced the same issue on reconnecting at active mode just like @YandaLiang said.
It seems to be the async task is not canceled when Retry. This ends up "Connection Exhaust" easily.
I upload the fixed version here. (it's only a sample. never tested.)
https://github.com/teonsen/secs4net/tree/dev
hope this helps.
from secs4net.
@teonsen Great! If someone tests this and I'll get a pull request I will merge this.
@YandaLiang BTW: Shouldn't this be filed under a different issue?
from secs4net.
I also fixed an issue where messages went missing, because only the first message was read from the buffer.
@TiltonJH Hi, Could you tell me which commit did you fix this issue in your pull request #35?
from secs4net.
@TiltonJH
A new bug was recently discovered using your project,it is:
1.Start two instances
2. Connection successful
3. But it quickly becomes buggy
from secs4net.
Well, yes I have noticed that too. However, I currently don't have the time to investigate or fix it.
If someone would provide a fix (pull request) for it, I would take a look and integrate it.
from secs4net.
the memory usage is a big target on the v2 roadmap. welcome to test v2
from secs4net.
Related Issues (20)
- Program crash problem HOT 1
- Passive mode connection, the device intentionally disconnects from the network, and the connection status remains unchanged
- registering COM
- Linq方式添加item错误 HOT 2
- Stream greater than 63 is a parsing error
- network error HOT 1
- State remains in Connected and not going into Selected
- Sometimes the message reading is incomplete. HOT 5
- Can't response message after reconnect,自動重連之後不會回復消息了 HOT 10
- SendAsync Not Sending In A Specific Case HOT 1
- WpfVisualizer running in environment .net framework 4.8, an error is reported
- Parsing packet error
- A suggestion for class SecsMessage
- How can I use Secs4Net to create a passive host EAP to connect to many equipments? HOT 2
- EQ cannot be connected after reopen host severial times while selected HOT 2
- S10F3 remote terminal message notification, Chinese garbled code issue
- Question
- Is it possible to support Linux ARMv7 32bits for doubles and floats HOT 2
- [Question] SECS-I over Telnet compatibility
- can you please list difference on license and no license ?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from secs4net.