This thread looks to be a little on the old side and therefore may no longer be relevant. Please see if there is a newer thread on the subject and ensure you're using the most recent build of any software if your question regards a particular product.
This thread has been locked and is no longer accepting new posts, if you have a question regarding this topic please email us at support@mindscape.co.nz
|
Hi, I am using the property grid 2.0. ( 2.0.589.10342,runtimeversion=2.0.50727) I my program is a listview and a line like this:
propertygrid.selectedobjects=listView.SelectedItems After "short" time (selecting many items) I can see a memory leak and an "performance leak".
You can reproduce the issue with your sample:
Please change quickstart/multipleselectedobjects page to
public partial class MultipleSelectedObjects : Page After certain time you can see the memory leak in the task manager. Could you fix it please ?
Thank you and cheers
Mario
|
|
|
Hi, can you write some feedback about this please ? workarounds or an fix date and so on ?
Thank you!
Mario
|
|
|
Hello Mario, Sorry about the delay in replying -- combination of a public holiday and some on-site work. We will look at this as soon as possible and will aim to have a fix by the end of this week. |
|
|
Good news -- we have a candidate fix for this and it will be in tonight's nightly build (builds dated 11 Feb 2009 and above, available from about 1430 GMT). Please let us know if you still see the problem. |
|
|
Hi ivan, I cant see any improvments. The bug (memory/performance leak) is still present. (Tested with builds 11,12,13 february) Whots going wrong ?
Cheers, Mario |
|
|
Aaugh. Looks like there was a minor difference in our test code. Your timer2 handler was setting TestGrid.SelectedObjects = new object[] { Person.AliceFull }. Mine was setting TestGrid.SelectedObjects = new object[] { Person.Bob }. So I think there must still be an issue with children / expandable properties. Apologies for not catching this; I'm looking into it now. |
|
|
Hello Mario, I have committed an updated fix for this and it will be included in nightly builds dated 17 Feb 2009 and above, available from the store from about 1430 GMT. I hope this finally addresses the problem for you. Apologies again for the inconvenience and thanks for helping us to track the problem down. |
|
|
Hi ivan,
yes, the bug is fixed for the sample application. But in my real application the bug is still there. Do you need more informations ?
CHeers, Mario |
|
|
Hi Mario, Yes, if you can provide me with some more information or repro instructions for the remaining bug that would be very useful. Thanks! |
|
|
public class MediaObject : INotifyPropertyChanged [Category("Properties")]
[Browsable(false)] // so the PropertyGrid doesn't see it
protected string m_groupName;
[Browsable(false)] // so the PropertyGrid doesn't see it
[Browsable(false)] [Browsable(false)] // so the PropertyGrid doesn't see it and so on... public class CalibrationObject : MediaObject
- no own Duration property implementation - no own DurationString property implementation - no own show ShowMouseInPreview impl
[Browsable(false)] // so the PropertyGrid doesn't see it [Category("Properties")]
[Browsable(true)] and so on. Of course there are more properties.... (in both classes). There are more derived classes. There is also an public class StimulusList : ObservableCollection<MediaObject> class. there is a databinding to a listview. and an handler: private void OnSelectionChangedSlideShowListViewMainFrame(object Sender, SelectionChangedEventArgs e) { propertyGrid.SelectedObjects = listview.selecteditems; }
btw: i have noted the handler is not necessary. it is enough to write in a loaded event propertyGrid.SelectedObjects = listview.selecteditems; Then there is an "automatic databinding"!!(if the listview selection changed the propgrid selected objects will change!) the propgrid is defined by: <my:PropertyGrid Name="propertyGrid" Height="Auto" Width="Auto" Focusable="False" AllowModifyCollections="False" Style="{StaticResource FancyStyle}" BorderThickness="0" IsToolBarVisible="False" Visibility="Visible" BorderBrush="Beige" views:HelpProvider.HelpID="10140">
i dont know wthat is also interesting for you! CHeers and thanks!
Mario
|
|
|
btw: the bug also appears with an old "not mult selections" prop grid ( version circa aprril -may 08) I have noted: in "my" version (20081126) is no flicker after changing selectedobjects. in the new one there is a flicker. it looks like "first loading singe editor then loading many editor" Feature request: In ImageObject there is an Property protected bool m_FitToScreen;
in movieobject is also an fittoscreen property but this one is "displaynamed" "Fit movie to Screen". An attribute like SharedDisplayName would be cool! i.e. SharedDisplayName("Fit object to screen")
and sometimes there is no sense to share an prop. (i.e. we use a property as "url" and in an other class as "file location"-> An attribute like [ShareProperty(false)] ->dont show this property with the other one..(in the prop grid) would be cool.
CHeers MArio |
|
|
Hello Mario, Sorry for the slow reply on this. I have managed to reproduce a small memory leak, and have largely fixed it. (There remains a further small leak in your scenario, approximately 1K per change of selection in the ListView, but this will be a bit harder to fix so I want to understand (a) whether I am on the right track first, and (b) whether the remaining small leak is actually significant in your scenario -- are people actually making tens of thousands of selections over the course of the app.) This fix will be included in nightly builds dated 26 Feb 2009 and above, available from about 1430 GMT. However, because the leak I identified was relatively small, I am not sure whether I have actually caught your real problem. I don't have the full objects and resources that you are using in your project, so it may be that my repro case is still missing something. Therefore, if you are still seeing a significant leak with the new version, would it be possible for you to provide us with a full working sample project that demonstrates the larger leak please? (You can attach a zip file via the Options tab, or if the content is sensitive, you can mail it via the contact form. Please make sure you strip out any binaries first or our mail system is likely to bounce it!) I know this is a bit tedious but it is the only way we can be sure that we are addressing the real problem! |
|
|
Hi ivan, yes there is still aleak. I will write an repro solution until wednesday.
CHeers
Mario |
|