LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

dr watson

Hello
I have a very strange error when I call the SetActivePanel() function of CVI
 
CVI is 7.1 version
O.S. is WXP professional.
 
 
this is the log file from dr. Watson 
 
 
 
0012e3d4 684ebe9f 00000000 0012e3f0 00000001 cvirte!MinimizeAllWindows+0x397a
0012e47c 684edfa6 01533b50 00000234 0b2044ac cvirte!MapPhysicalMemory+0x1031d
0012e4c4 684eb667 00000001 00000234 0b2044ac cvirte!MapPhysicalMemory+0x12424
0012e518 685ce6ec 00000001 000000a4 0012e600 cvirte!MapPhysicalMemory+0xfae5
0012e5a0 685cede1 0012e600 0012e600 01533bcc cvirte!GetRs232Err+0x1266
0012e5d0 684799e1 00000000 01533b50 68479a32 cvirte!GetRs232Err+0x195b
0012e5f0 68479bec 01533bcc 01533bcc 0000000e cvirte!DirSelectPopup+0x2e676
0012e630 68479bd7 01533bcc 0012e66c 01533bcc cvirte!DirSelectPopup+0x2e881
0012e67c 68479bd7 01533b9c 0012e6b8 01533b9c cvirte!DirSelectPopup+0x2e86c
0012e6c8 68479bd7 01533b28 0012e704 01533b28 cvirte!DirSelectPopup+0x2e86c
0012e714 68479bd7 01532108 0012e750 01532108 cvirte!DirSelectPopup+0x2e86c
0012e760 68479bd7 0b220468 0012e79c 0b220468 cvirte!DirSelectPopup+0x2e86c
0012e7ac 68479bd7 01533240 0012e7e8 01533240 cvirte!DirSelectPopup+0x2e86c
0012e7f8 685d1eba 01533538 0012e87c 0012e87c cvirte!DirSelectPopup+0x2e86c
0012e88c 685d5202 01533538 0012ea20 685d5ccc cvirte!SetWindowsErrorMode+0x132b
0012e99c 685d5d00 000801f6 0000000f 00000000 cvirte!MinimizeAllWindows+0x1be0
0012e9b8 77d48734 000801f6 0000000f 00000000 cvirte!MinimizeAllWindows+0x26de
0012e9e4 77d48816 685d5ccc 000801f6 0000000f USER32!GetDC+0x6d
0012ea4c 77d4b4c0 00000000 685d5ccc 000801f6 USER32!GetDC+0x14f
0012eaa0 77d4b50c 0107e1d8 0000000f 00000000 USER32!DefWindowProcW+0x184
0012eac8 7c90eae3 0012ead8 00000018 0107e1d8 USER32!DefWindowProcW+0x1d0
0012eb00 685d7e07 000801f6 685d7e57 01533538 ntdll!KiUserCallbackDispatcher+0x13
0012eb4c 685ce13c 01533b50 01536e08 00000000 cvirte!MinimizeAllWindows+0x47e5
0012eb68 685cedbe 0012ebc0 01533bcc 00000001 cvirte!GetRs232Err+0xcb6
0012eb94 684799e1 00000000 01533b50 68479a32 cvirte!GetRs232Err+0x1938
0012ebb4 68479af3 0b222acc 00000027 01533bcc cvirte!DirSelectPopup+0x2e676
0012ebe0 685d7806 01533bcc 00000000 00000001 cvirte!DirSelectPopup+0x2e788
0012ec00 685d76fa 00000000 00000000 0b222acc cvirte!MinimizeAllWindows+0x41e4
0012ec20 685d7d57 00000000 00000001 0b22064c cvirte!MinimizeAllWindows+0x40d8
0012ec58 00d045e1 0b22064c 0012ec74 0012ed40 cvirte!MinimizeAllWindows+0x4735
0012ec68 0049e2aa 00000005 0012f1dc 0b22064c CVIUserInt!SetActivePanel+0xd                                  <---- this is the last call from my code.
0012ed40 0049e107 00000005 0b222ae4 0b22064c Idillio!CVI__UserInt__SetActivePanel+0x2a               
0012f2a0 6856ee56 00000005 00000002 00000008 Idillio!CallBack__newpanel_callback+0x1077
0012f314 6856f9e9 0049d090 00000005 00000002 cvirte!SetIdleEventRate+0x16c
0012f348 68570b3f 0b22064c 0b222ae4 00000008 cvirte!InstallPanelCallback+0x2c0
0012f384 685710d4 00000001 00000001 00000000 cvirte!RunUserInterface+0x185
0012f44c cccccccc cccccccc 00000000 00000000 cvirte!RunUserInterface+0x71a
0 Kudos
Message 1 of 4
(3,350 Views)
Dr Watson logs are rarely helpful in my experience. What was the problem you experienced?
--
Martin
Certified CVI Developer
0 Kudos
Message 2 of 4
(3,328 Views)

Hello,

 

in my experience “Dr. Watson” was fairly useful because it  allow at least to identify the exact point where the crash of the software happens.

The most part of mistakes that I have encountered are due to a code, that has been badly developed from our side, that in certain situations will carry out some non valid operations that cause the a.m. crash problems.

In this case (it never happened) instead is the function National "SetActivePanel()" that blocks itself without giving any error reply as stand out from the Dr. Watson log.

 

I am asking myself if there are some limits to its utilisation, or if it exists some other functions that could survey eventual errors, or perhaps to check that the panel is really active and the function could really be executed, or if it ‘ s possible to execute the same function "SetActivePanel()" in another way.

 

This is the summary of my code:

int CVICALLBACK newpanel_callback (int panel, int control, int event, void *callbackData, int eventData1, int eventData2)

{

            switch (event)

            {

               case EVENT_COMMIT:

               case EVENT_GOT_FOCUS:

         

                  .............................

                  .............................

                  some other code..............

                  creation of other windows...

                  .............................           

                  .............................

  

                  //  re-activation of the original panel  

                  es= SetActivePanel(panel);  <------ "point of the crash".

                  if(es < 0)

                  {

                     Actual spy text "Error SetActivePanel()  number :   ", es);

                  }

            }

}

0 Kudos
Message 3 of 4
(3,305 Views)

I would suspect (but cannot know) that something you are doing is causing the panel handle stored in 'panel' to be invalid in some way. What exactly are you doing in:

 

                some other code..............

                  creation of other windows...

  ?

--
Martin
Certified CVI Developer
0 Kudos
Message 4 of 4
(3,280 Views)