0

We noticed that with a custom Ax form around 1500-2000 user objects are reserved. The end user will often open this form multiple times and quickly run against the user object limit. (too many form are open...)

I started looking with SysInternal tools, GDIViewer and Bear what may cause this form to use to many resources. From my search, I conclude that most handles are spend on Virtual Memory Private, Virtual Memory Image and Fonts.

Now, I ran kinda stuck. I was hoping to find a clue on which form control(s) are requesting all these resources. But I can't seem to link the user object handles to a form control or object.

My question: How does one identify which Ax form controls and User objects handles are associated? If not possible, how can one debug/track/view/trace which form elements generate the most handles?

<?xml version="1.0" encoding="UTF-8"?>
<root>
    <obj>
        <type>Brush</type>
        <count>276</count>
    </obj>
    <obj>
        <type>Font</type>
        <count>1762</count>
    </obj>
    <obj>
        <type>Region</type>
        <count>47</count>
    </obj>
    <obj>
        <type>Bitmap</type>
        <count>82</count>
    </obj>
    <obj>
        <type>DC</type>
        <count>78</count>
    </obj>
    <obj>
        <type>Palette</type>
        <count>2</count>
    </obj>
    <obj>
        <type>Virtual Memory Shared</type>
        <count>69</count>
    </obj>
    <obj>
        <type>Virtual Memory Private</type>
        <count>3020</count>
    </obj>
    <obj>
        <type>Virtual Memory Mapped</type>
        <count>34</count>
    </obj>
    <obj>
        <type>Virtual Memory Image</type>
        <count>2424</count>
    </obj>
</root>
Jonathan Bravetti
  • 2,228
  • 2
  • 15
  • 29
Reinard
  • 3,624
  • 10
  • 43
  • 61
  • A Microsoft.Dynamics.HierarchyViewerWPF.HierarchyView is included in the form. I think the user objects are caused because of it. But I need to be able to proof it. – Reinard Feb 21 '17 at 22:21

1 Answers1

0

It sounds like your custom form needs refactored or your user needs more memory. You didn't specify which version of AX you're using btw.

To answer your question about finding all of the controls on a form:

AX2009 Loop through all the controls in the form on init

You could use something like that to just dump out all of the controls on a form or put it in the form's run() method and modify it to work with the active form to give you a list of controls...but I'm not sure why you want to do this.

It sounds to me like you need a developer to look at how some custom objects are designed and if they're consuming too much memory.

Community
  • 1
  • 1
Alex Kwitny
  • 11,211
  • 2
  • 49
  • 71