10 Replies Latest reply on May 6, 2011 7:28 AM by Asle Frantzen

    Processbook stops responding

    AlistairFrith

      I suspect this is something that my VBA code is doing...

       

      I have a processbook display with some VBA behind it, (talking to AF via a .NET module but I don't think that is relevant). After a period of use, the display stops working. mouse clicks anywhere in Processbook just result in the title bar flashing. I can hover over items in the toolbars and menu bar but clicking them just flashes the title bar. The VBA environment title bar also flashes but the VBA environment responds. I am not paused within any VBA (hitting the play button/F5 gives the Macro dialog for me to choose which macro to run). To get it all back, I have to kill PB from the Task Manager and restart it. This is a real pain for me and will be more so for the customer!

       

      Any ideas what may be causing this?

       

      --- Alistair.

       

       

        • Re: Processbook stops responding
          andreas

          I can only think of a dialogbox somewhere hidden. Can you minimize all so that you have a "clean" desktop and than switch to ProcessBook with the task manager to see if that shows something?

            • Re: Processbook stops responding
              Ahmad Fattahi

              Another relevant question is if you do anything specific before it happens or it happens after a certain time? Does CPU shoot up?

                • Re: Processbook stops responding
                  AlistairFrith

                  Can't find any dialogs Andreas. Ahmad, I have not noticed any particular action that precedes the issue (though obviously I am looking out for that). It does not seem to be after a certain time since it often happens within a few minutes but last night I left it running and it is still running fine this morning. I have not looked at the CPU/memory usage so I will check that the next time it plays up.

                   

                  --- Alistair.

                    • Re: Processbook stops responding
                      Ahmad Fattahi

                      Thanks Alistair. Please keep this thread updated so we get to the bottom of the problem!

                        • Re: Processbook stops responding
                          AlistairFrith

                          I thought it had cleared up but it has just happened again after more than a day with no problem.

                          • Processbook had been open for about 10 minutes or so. Before that I don't think it had been closed all morning and maybe not since yesterday.
                          • I had been stepping through the VBA in the debugger,
                          • spotted a problem,
                          • hit the stop button,
                          • made the change,
                          • hit the save button in PB,
                          • went to change the context to trigger the VBA and thereby hit a breakpoint when I realised that PB had stopped responding and indeed had not done the save.
                          • So I have saved from the VBA environment (which works and even gets reflected in the PB title bar) and will kill  and restart PB.

                          PB is not using any CPU and its memory footprint is static at 129,448k.

                           

                          Having restarted PB, its memory footprint is 123,480k so not much different.

                           

                          --- Alistair.

                            • Re: Processbook stops responding

                              Do you do any symbol manipulation?  Or set Application.Redraw = False without setting back to True again?

                                • Re: Processbook stops responding
                                  AlistairFrith

                                  Rhys @ RJK Solutions

                                  Do you do any symbol manipulation?
                                  Yes. I add traces to a trend, fill in MS ListView, FlexGrid and Chart objects and other manipulation like that.
                                  Rhys @ RJK Solutions

                                  Or set Application.Redraw = False without setting back to True again?
                                  No.

                                   

                                  --- Alistair.

                                    • Re: Processbook stops responding
                                      dtakara

                                      Alistair,

                                       

                                      I am not sure if your PB display is a too busy one, with many objects, but a tool that might be helpful to make sure you don't have any "lost, forgotten" object in your display (that could be causing this issue) is the DevNet Word Document Utility, available for download in the vCampus Library. You'll find it in this path in the library tree:

                                       

                                      vCampus Library > Legacy DevNet Content > PI ProcessBook VBA Scripts

                                       

                                      It is the last one in the list of applications of that category. Here is its description:

                                       

                                      Word Document Utility     
                                      This Document Utility uses a ProcessBook VBA script to extract information from an open ProcessBook Workbook (.PIW) file and export it into Excel. The report lists all objects contained in each display, including its symbol name, symbol type, coordinates, and tag names.