Debugging memory problems
What would be the best way to debug memory problems?
In the new version of Noesis I have run into some memory problems and most of them I have solved, but the problem is that the process is really time consuming.
For every modification I had to run the app and constantly navigating to the user control that I am "profiling" and keep track if the garbage collector will do something about the memory growth.
It would really help if there was a profiling tool for that.
In the new version of Noesis I have run into some memory problems and most of them I have solved, but the problem is that the process is really time consuming.
For every modification I had to run the app and constantly navigating to the user control that I am "profiling" and keep track if the garbage collector will do something about the memory growth.
It would really help if there was a profiling tool for that.
Re: Debugging memory problems
We offer a callback in C++ to track all the allocations but we don't expose it in the C# layer because we though it doesn't make sense. I don't know, if you have any suggestion to improve this we are open to suggestions.
Re: Debugging memory problems
Hi jsantos,
The problem is that I free my resources in the user control (every reference and events) but in some cases it still does not help.
I think that a help would be if after I free all my resources, something tells me if noesis will free the resources that I have used.
It can be a function that uses the UserControla as an argument and traverses all the visual tree.
It would be better if it returns which resources could not be freed.
I don't know if this is possible but it would speed up my debugging.
Another thing that would help whit debugging is to know how noesis internally works.
I don't know how much you can describe but some hints would be nice to have.
One thing that I noticed is that noesis allocates memory to some point and then it stops (I don't know the reason for that) but it helped me for debugging.
It has probably something to do with the offscreen settings but I didn't see anything about this in the documentation.
If there is something about this in the documentation and I have missed it can you post a link ?
The problem is that I free my resources in the user control (every reference and events) but in some cases it still does not help.
I think that a help would be if after I free all my resources, something tells me if noesis will free the resources that I have used.
It can be a function that uses the UserControla as an argument and traverses all the visual tree.
It would be better if it returns which resources could not be freed.
I don't know if this is possible but it would speed up my debugging.
Another thing that would help whit debugging is to know how noesis internally works.
I don't know how much you can describe but some hints would be nice to have.
One thing that I noticed is that noesis allocates memory to some point and then it stops (I don't know the reason for that) but it helped me for debugging.
It has probably something to do with the offscreen settings but I didn't see anything about this in the documentation.
If there is something about this in the documentation and I have missed it can you post a link ?
Re: Debugging memory problems
We don't allocate memory and then stop doing that. Could this be related to how the garbage collector behaves? in C#, memory allocation grows till some threshold and then the memory is freed and reused. All the big objects in Noesis (like offscreens or internal resources) are allocated once.Another thing that would help whit debugging is to know how noesis internally works.
I don't know how much you can describe but some hints would be nice to have.
One thing that I noticed is that noesis allocates memory to some point and then it stops (I don't know the reason for that) but it helped me for debugging.
It has probably something to do with the offscreen settings but I didn't see anything about this in the documentation.
If there is something about this in the documentation and I have missed it can you post a link ?
This could also be related to delegates. We have an internal deviation from WPF regarding this and the best way to overcome it is manually resetting all the delegates you hook to. This is something we will fix in the future.
You also have the method NoesisView.GetStats that can be useful to get performance counters although I am not sure this is something helpful for your scenario.
Re: Debugging memory problems
Hi jsantos,
About the memory allocation I have explained incorrectly what I meant, but it is not relevant .
I did unsubscribed from events but maybe I have to check again If I did really unsubscribed and if that is causing the problem.
I think that the NoesisView.GetStats would help but for example, the number of triangles that it returns is always zero, I have the version 2.1.0rc2.
About the memory allocation I have explained incorrectly what I meant, but it is not relevant .
I did unsubscribed from events but maybe I have to check again If I did really unsubscribed and if that is causing the problem.
I think that the NoesisView.GetStats would help but for example, the number of triangles that it returns is always zero, I have the version 2.1.0rc2.
Re: Debugging memory problems
Ops, you are right, this is something we need to fix. Right now, only clients with access to source code can build an instrumented version of noesis.I think that the NoesisView.GetStats would help but for example, the number of triangles that it returns is always zero, I have the version 2.1.0rc2.
Who is online
Users browsing this forum: Ahrefs [Bot], Bing [Bot] and 38 guests