none
Visio Ribbon: Custom Backstage Controls disappear RRS feed

  • Question

  • Hi

    I have a well running Visio add-in that provides a custom interface.     One problem I am having is as follows:

     

     

    • After a certain amount of operation some things on the ribbon disappear or stop working
    1. Custom Backstage controls disappear
    2. Dynamic menu's stop updating there content
    And I get the following error:
    *********************
    Custom UI Runtime Error in a_visualMesa.connect      (a_visualMesa.connect   is my add-in)
    Error Found in Custom UI XML of "a_visualMesa.Connect:
    Line 136
    Column 176 
    Error Code 0x80004005
    Too many controls.  Total number of controls in customization XML cannot be more then 10000
    **********************************

     

    Some Comments:    

     

    • I am not adding any dynamic item to the ribbon after launch.   The ribbon works fine for an undetermined amount of time after launch
    • I don't have anywhere near 10,000 controls in my ribbon.  Maybe a few 100 at most  
    • This is not a repeatable error on all machines
    • The only machines I see with this error have Visio 2010 and Office 2007 but not all machines like this present the error  (excel is not part of the solution,  I am just suspicious there is some missing office 2010 install item that visio 2010 is missing).  My ribbon is a 2010 add-in only. 
    I searched the internet pretty hard on the error above but could not find anything.    Does anyone have any information on this error?

    Thanks

    David Nelson

     

     

     

     


    David Nelson
    Thursday, January 13, 2011 1:43 AM

All replies

  • Hello David,

    Thank for posting. Is this Visio add-in a Shared add-in? Right? If yes, is there any other add-in with ribbon controls in this machine with this error?

    Also please try to create a simple add-in for test, and see if this issue also happens.

    I notice that this machine with this error has both Visio 2010 and Office 2007 installed. Right? Is this machine the only one with Office 2007 and Visio 2010 installed? If yes, actually, it is not recommended to install multiple version of Office on one machine. For more information, please see this KB article: http://support.microsoft.com/kb/218861.

    If you have any concern on this post, just feel free to follow up. Have a nice day.


    Bessie Zhao [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Thursday, January 13, 2011 8:36 AM
  • Hey Bessie

    Thanks for the help!  

    To answer your questions and ask a few more:

     

    • Shared add-in:  yes.  But  on this machine its the only add-in installed
    • Simple add-in test.    hm:   we only see  the issue if we push our add-in really hard.   I am very skeptical a simple add-in will illustrate the issue. 
    • Office Versions:    
    • It would be nice if I had the luxury of specifying this but the reality is most corporation I deal with (Big conservative Oil Companies) use office 2007  but with out a visio as part of the corporate spec.   When they put Visio on for us they install the latest version because its the easist thing to get.  
    •          Visio is really the only office app working with my add-in.   All the other apps are not used and my add-in only loads in viso.
    •  

    Can you illuminate me any more on the error codes I reported?

     

    I am concerned that the Office ribbon  has  a 10,000 control limit and the dynamic items don't do garbage collection against  this limit.  My add-in does 2 things that could push the limit:

    1. I have a dynamic menu that loads a 100 or so menu items on demand  (i am using the getContent callback and I invalidate this control as required)
    2. There is lots and lots of editing action.   The undo queue is highly used and hence the  undo and RedoOrRepeat visio ribbon items are part of my solution and the Undo Galary item is changing all the time.    It not beeing used when we test so I would expect no real affect from 
              <gallery idMso="Undo"/>
              <button idMso="RedoOrRepeat"/>

    Can you please comment on this.

     

    Thanks

     

    David

     


    David Nelson
    Friday, January 14, 2011 10:54 PM
  • Hello again David,

    Sorry for delay. Actually, in my side, I am not able to reproduce this issue. However, I will try to give you some useful information. Does this add-in is the only com add-in for Visio? You could check this in Com Add-ins dialog.

    I have found two threads about the error “Error Found in Custom UI XML of ”. Hope they could help you.

    Error found in Custom UI XML:
    http://social.technet.microsoft.com/Forums/en-US/outlook/thread/a5d7d2b7-2fa3-4942-a8e9-493c8563c392.

    Outlook 2010 - Error found in Custom UI XML:
    http://social.msdn.microsoft.com/Forums/en/vsto/thread/e59c6363-f5e6-47cf-803d-c396a1ba55dd.

    If this post does not help you, just feel free to follow up. Have a nice day.


    Bessie Zhao [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Wednesday, January 19, 2011 10:02 AM
  • Hi Bessie,  Thanks for the continuing help.

    To answer your question:  Yes, this is the only visio add-in on the computers that show the problem.

    Your threads didn't help  they really aren't the same error.  I think in the error message (below)  the bold part is really the error message.   

    *********************
    Custom UI Runtime Error in a_visualMesa.connect      (a_visualMesa.connect   is my add-in)
    Error Found in Custom UI XML of "a_visualMesa.Connect:
    Line 136
    Column 176 
    Error Code 0x80004005
    Too many controls.  Total number of controls in customization XML cannot be more then 10000
    **********************************
    This is a hard to reproduce,  I have only seen it on 2 computers,  neither my own.  I have also ruled out that office 2007 is part of the issue.  We see it on a machine with office 2010 and visio 2010.  

    Can you also please respond to the issues around garbage collection in my last message.  

    Thanks

    David


    David Nelson
    Thursday, January 20, 2011 1:53 AM
  • Hello David,

    From what you said above, maybe there are some com objects used but not released in code. Right? If yes, have you tried to use Marshal.ReleaseComObject to release these com objects? If this does not help you, just feel free to follow up again.


    Bessie Zhao [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Thursday, January 20, 2011 9:15 AM
  • Hello Bessie,

    Isn't it Visio that would need to release the com objects?   THe only hooks I have into the ribbon are  the ribbon callbacks which are pretty limited.  

    Indecently,   My com-addin is vb6 so I don't have access to Marshal.ReleaseComObject in any case.    I would have also thought if the releasing com object issue was on my side,  it would have shown up long ago.  

    The error: 

    Too many controls.  Total number of controls in customization XML cannot be more then 10000

    Seems to tell me there are too many controls and I am pretty sure that means RIBBON controls..  I don't understand how that could be and there is NO hooks from the ribbon to delete controls.  

    Thanks for any help. 


    David 

     


     


    David Nelson
    Thursday, January 20, 2011 4:13 PM
  • Bessie,   

     

    Any further comments on this question?  still not resolved.  


    David 


    David Nelson
    Tuesday, March 1, 2011 12:22 AM
  • Hello again Dave,

    Actually, I am not able to reproduce this issue on my side. So I am afraid that I could not help you. However, I will consult other engineers on this question. Once there is some useful information, I will follow up again. Have a nice day. :-)


    Bessie Zhao [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Tuesday, March 1, 2011 7:39 AM
  • Could you please track down with the engineers what:

    Too many controls.  Total number of controls in customization XML cannot be more then 10000

    exactly means.

    Thanks


    David 


    David Nelson
    Tuesday, March 1, 2011 3:58 PM
  • Hi David,

     

    Did you ever solve this problem? I'm getting exactly the same error message in very similar circumstances:

     

    • I'm developing an Excel 2010 spreadsheet app with its own custom ribbon and some new context menu elements.
    • Like David, I have maybe 100-200 total elements in my customization.
    • This works fine the majority of the time, but occasionally, this error pops up.
    • This usually happens when I've had Excel open a few hours, and I've been heavily using/opening/closing the spreadsheet.
    • I haven't been successful in repoducing this reliably -- I can play with it for five minutes and cause the error, then restart Excel and do the exact same thing with no problems.

    I'd appreciate any insights into this, as this could quite conceivably become a showstopper to the eventual rollout of this app.

     

    Many thanks,

    Matt

    Thursday, March 17, 2011 4:17 PM
  • Hello again David,

    Sorry for delay. By reading the feedback from other senior engineers, they also could not reproduce this issue because of its complexity. This issue also is recommended to fall into the Paid support category which requires a more in-depth level of support. Please visit the below link to see the various paid support options that are available to better meet your needs.

    http://support.microsoft.com/default.aspx?id=fh;en-us;offerprophone.

    It would be better if you share reproducible example in that site. This will require a copy of the add-in and the source code for it, a complete list of the installed .dlls and system information about the version and service pack level of the installed Windows operating system. 

    Thanks for your understanding and have a nice day.


    Bessie Zhao [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Wednesday, March 23, 2011 10:21 AM
  • Hey Matt,

    I have no progress to report on the error.  Your error does sound the same. 

    I have simplified my app slightly so there are no dynamic menu's  but that didn't help. 

    It does basically feel like the following:

    • leave Visio running my app open for an undefined period of time
    • Any dynamnic menu or the File menu will stop working after an unknown amount of time
    • Ever other ribbon command will continue to function

    Sorry to not be off help.   Please email me if you find any resolution.   I will move forward on this sometime via a paid support option but its going to be a little while till I get to it.


    David

     

     


    David Nelson
    Wednesday, March 23, 2011 11:54 PM
  • Thanks -- I've made no more progress at this end. I'll let you know if I do discover anything else.

     

    Matt

    Thursday, March 24, 2011 12:25 PM
  • Hello everybody, So I'm not the only one with this problem. I get the same error message with my ribbon customizations. I was under the impression it has to do with the dynamic menu's. Didn't think this error occurred without them. And it only occurrs after some time. Then you have to restart Word to get the menu's working again.

    I'm curious: did anyone work this out? Happy to hear any reply!

    Thursday, January 5, 2012 10:46 AM
  • This problem is 100% reproducible.

    1. Create a "dynamicMenu" ribbon control.
    2. Use the "getContent" call back method to populate the dynamic menu with 1000+ "button" controls.
    3. Create another separate "button" control that does nothing but call "ribbon.InvalidateControl" and then specify the Ctrl.Id for the "dynamicMenu" ribbon control created in step 1 .
    4. Run the application.
    5. Select the "dynamicMenu" ribbon control created in step 1 in order to update the content.
    6. Select the "button" control created in step 3 in order to invalidate the "dynamicMenu" ribbon control.
    7. Repeat steps 5 and 6 for 15 cycles and the error is guaranteed to appear.

    I realize that a dynamic menu with 1000+ controls is not typical, but refreshing a dynamic menu with 10 to 20 controls is not uncommon.  A good example is the drop down menu that lists recent searches in Outlook 2010.

    Therefore, if a user selects a dynamic menu that is continually invalidated and the user does this over the course of several hours (i.e. when they are using Outlook), then this error will occur.

    Is there way for programmers to perform garbage collection on the ribbon control buttons inside the dynamic menu after the ribbon.InvalidateControl method is invoked in order to dispose of the previous controls in the dynamic menu? 

    Monday, January 23, 2012 6:23 AM
  • Due to a lack of response on this topic, I have decided to pursue the "Paid Support" option from Microsoft.  First, I created a short demo program that reproduces the problem as I explained in my last post.  I have just now submitted this demo program to Microsoft for analysis.  I will post a reply to this thread once I hear back from Microsoft.

    Jon

    • Proposed as answer by VeranoSoft Tuesday, February 7, 2012 3:33 AM
    • Unproposed as answer by VeranoSoft Tuesday, February 7, 2012 3:33 AM
    Wednesday, February 1, 2012 4:34 AM
  • Good news, I heard back from Microsoft today in response to my support request.  They informed me that this issue is a confirmed bug in MS Office.  They also stated that they were already aware of the bug and were working on a solution prior to my submitting the support request.  I was assured by Microsoft that a fix for this bug will be included in the Office update to be released this month.  Therefore, we should see a fix for this problem by the end of February 2012.

    Good news indeed!

    Jon

    • Proposed as answer by VeranoSoft Tuesday, February 7, 2012 3:41 AM
    Tuesday, February 7, 2012 3:40 AM
  • Any progress on this?


    -- Paul Herber, Sandrila Ltd. Engineering and software shapes for Visio - http://www.sandrila.co.uk/

    Friday, March 2, 2012 8:39 AM