vbacrashscada

Sporadic appearance of "RSIVBA module has stop working" message


I'm developing a new HMI project using Factory Talk View Studio 7.00.00 (CPR 9 SR 6) and VBA 6.5. Sometimes on client startup VBA crash and the following message appears:

enter image description here

Debug analysis

Here below I try to describe as detailed as possible the debug analysis that I've done. If you want you can skip directly to "Final considerations" chapter.

I've opened the Event View on my dev computer and i retrieved the following information about the problem, contained in two different logs:

Log 1

Log Name:      Application
Source:        Application Error
Date:          4/12/2019 11:36:47 AM
Event ID:      1000
Task Category: (100)
Level:         Error
Keywords:      Classic
User:          N/A
Computer:      C001234
Description:
Faulting application name: SEGfxVBACli.exe, version: 7.0.13.0, time stamp: 0x50e6de15
Faulting module name: VBE6.DLL, version: 6.5.10.32, time stamp: 0x471d25c7
Exception code: 0xc0000005
Fault offset: 0x00048ba2
Faulting process id: 0x24cc
Faulting application start time: 0x01d4f11339f7c9c0
Faulting application path: C:\Program Files\Rockwell Software\RSView Enterprise\SEGfxVBACli.exe
Faulting module path: C:\PROGRA~1\COMMON~1\MICROS~1\VBA\VBA6\VBE6.DLL
Report Id: 7d53c660-5d06-11e9-9097-001c428c3a57
Event Xml:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
  <System>
    <Provider Name="Application Error" />
    <EventID Qualifiers="0">1000</EventID>
    <Level>2</Level>
    <Task>100</Task>
    <Keywords>0x80000000000000</Keywords>
    <TimeCreated SystemTime="2019-04-12T09:36:47.000000000Z" />
    <EventRecordID>33867</EventRecordID>
    <Channel>Application</Channel>
    <Computer>C001234</Computer>
    <Security />
  </System>
  <EventData>
    <Data>SEGfxVBACli.exe</Data>
    <Data>7.0.13.0</Data>
    <Data>50e6de15</Data>
    <Data>VBE6.DLL</Data>
    <Data>6.5.10.32</Data>
    <Data>471d25c7</Data>
    <Data>c0000005</Data>
    <Data>00048ba2</Data>
    <Data>24cc</Data>
    <Data>01d4f11339f7c9c0</Data>
    <Data>C:\Program Files\Rockwell Software\RSView Enterprise\SEGfxVBACli.exe</Data>
    <Data>C:\PROGRA~1\COMMON~1\MICROS~1\VBA\VBA6\VBE6.DLL</Data>
    <Data>7d53c660-5d06-11e9-9097-001c428c3a57</Data>
  </EventData>
</Event>

Log 2

Log Name:      Application
Source:        Windows Error Reporting
Date:          4/12/2019 11:40:02 AM
Event ID:      1001
Task Category: None
Level:         Information
Keywords:      Classic
User:          N/A
Computer:      C001234
Description:
Fault bucket , type 0
Event Name: APPCRASH
Response: Not available
Cab Id: 0

Problem signature:
P1: SEGfxVBACli.exe
P2: 7.0.13.0
P3: 50e6de15
P4: VBE6.DLL
P5: 6.5.10.32
P6: 471d25c7
P7: c0000005
P8: 00048ba2
P9: 
P10: 

Attached files:

These files may be available here:
<b>C:\Users\xfprocessor\AppData\Local\Microsoft\Windows\WER\ReportQueue\AppCrash_SEGfxVBACli.exe_9918e682a9385aae53b328795e856d7cb5199e1b_27f321b3</b>

Analysis symbol: 
Rechecking for solution: 0
Report Id: 7d53c660-5d06-11e9-9097-001c428c3a57
Report Status: 6
Event Xml:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
  <System>
    <Provider Name="Windows Error Reporting" />
    <EventID Qualifiers="0">1001</EventID>
    <Level>4</Level>
    <Task>0</Task>
    <Keywords>0x80000000000000</Keywords>
    <TimeCreated SystemTime="2019-04-12T09:40:02.000000000Z" />
    <EventRecordID>33868</EventRecordID>
    <Channel>Application</Channel>
    <Computer>C001234</Computer>
    <Security />
  </System>
  <EventData>
    <Data>
    </Data>
    <Data>0</Data>
    <Data>APPCRASH</Data>
    <Data>Not available</Data>
    <Data>0</Data>
    <Data>SEGfxVBACli.exe</Data>
    <Data>7.0.13.0</Data>
    <Data>50e6de15</Data>
    <Data>VBE6.DLL</Data>
    <Data>6.5.10.32</Data>
    <Data>471d25c7</Data>
    <Data>c0000005</Data>
    <Data>00048ba2</Data>
    <Data>
    </Data>
    <Data>
    </Data>
    <Data>
    </Data>
    <Data>C:\Users\xfprocessor\AppData\Local\Microsoft\Windows\WER\ReportQueue\AppCrash_SEGfxVBACli.exe_9918e682a9385aae53b328795e856d7cb5199e1b_27f321b3</Data>
    <Data>
    </Data>
    <Data>0</Data>
    <Data>7d53c660-5d06-11e9-9097-001c428c3a57</Data>
    <Data>6</Data>
  </EventData>
</Event>

Using the above logs I was able to extract the following relevant information (please let me know if you think that I've missed something that could be important for debugging purpose):

  1. Log 1
    • The faulting application is SEGfxVBACli.exe, version: 7.0.13.0 (alias for RSIVBA Module, look here)
      • The faulting module is VBE6.DLL, version: 6.5.10.32
  2. Log 2
    • This log was taken by WER (Windows Error Reporting)
    • This log suggest to check in the following folder for additional information:

C:\Users\xfprocessor\AppData\Local\Microsoft\Windows\WER\ReportQueue\AppCrash_SEGfxVBACli.exe_9918e682a9385aae53b328795e856d7cb5199e1b_27f321b3

In the path suggest by Log 2 I found a file called Report.wer that doesn't seem to add new helpful information. Here below its content:

Version=1
EventType=APPCRASH
EventTime=131995354075640000
ReportType=2
Consent=1
ReportIdentifier=7d53c661-5d06-11e9-9097-001c428c3a57
IntegratorReportIdentifier=7d53c660-5d06-11e9-9097-001c428c3a57
Response.type=4
Sig[0].Name=Application Name
Sig[0].Value=SEGfxVBACli.exe
Sig[1].Name=Application Version
Sig[1].Value=7.0.13.0
Sig[2].Name=Application Timestamp
Sig[2].Value=50e6de15
Sig[3].Name=Fault Module Name
Sig[3].Value=VBE6.DLL
Sig[4].Name=Fault Module Version
Sig[4].Value=6.5.10.32
Sig[5].Name=Fault Module Timestamp
Sig[5].Value=471d25c7
Sig[6].Name=Exception Code
Sig[6].Value=c0000005
Sig[7].Name=Exception Offset
Sig[7].Value=00048ba2
DynamicSig[1].Name=OS Version
DynamicSig[1].Value=6.1.7601.2.1.0.256.4
DynamicSig[2].Name=Locale ID
DynamicSig[2].Value=1033
DynamicSig[22].Name=Additional Information 1
DynamicSig[22].Value=0a9e
DynamicSig[23].Name=Additional Information 2
DynamicSig[23].Value=0a9e372d3b4ad19135b953a78882e789
DynamicSig[24].Name=Additional Information 3
DynamicSig[24].Value=0a9e
DynamicSig[25].Name=Additional Information 4
DynamicSig[25].Value=0a9e372d3b4ad19135b953a78882e789
UI[2]=C:\Program Files\Rockwell Software\RSView Enterprise\SEGfxVBACli.exe
UI[3]=RSIVBA Module has stopped working
UI[4]=Windows can check online for a solution to the problem the next time you go online.
UI[5]=Check online for a solution and close the program
UI[6]=Check online for a solution later and close the program
UI[7]=Close the program
LoadedModule[0]=C:\Program Files\Rockwell Software\RSView Enterprise\SEGfxVBACli.exe
LoadedModule[1]=C:\windows\SYSTEM32\ntdll.dll
LoadedModule[2]=C:\windows\system32\kernel32.dll
LoadedModule[3]=C:\windows\system32\KERNELBASE.dll
LoadedModule[4]=C:\windows\system32\msi.dll
LoadedModule[5]=C:\windows\system32\msvcrt.dll
LoadedModule[6]=C:\windows\system32\ADVAPI32.dll
LoadedModule[7]=C:\windows\SYSTEM32\sechost.dll
LoadedModule[8]=C:\windows\system32\RPCRT4.dll
LoadedModule[9]=C:\windows\system32\USER32.dll
LoadedModule[10]=C:\windows\system32\GDI32.dll
LoadedModule[11]=C:\windows\system32\LPK.dll
LoadedModule[12]=C:\windows\system32\USP10.dll
LoadedModule[13]=C:\windows\system32\SHELL32.dll
LoadedModule[14]=C:\windows\system32\SHLWAPI.dll
LoadedModule[15]=C:\windows\system32\ole32.dll
LoadedModule[16]=C:\windows\system32\OLEAUT32.dll
LoadedModule[17]=C:\windows\WinSxS\x86_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.30729.4940_none_50916076bcb9a742\MSVCR90.dll
LoadedModule[18]=C:\windows\WinSxS\x86_microsoft.vc90.atl_1fc8b3b9a1e18e3b_9.0.30729.4148_none_51ca66a2bbe76806\ATL90.DLL
LoadedModule[19]=C:\windows\WinSxS\x86_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.30729.4940_none_50916076bcb9a742\MSVCP90.dll
LoadedModule[20]=C:\windows\system32\apphelp.dll
LoadedModule[21]=C:\windows\AppPatch\AcLayers.DLL
LoadedModule[22]=C:\windows\system32\SspiCli.dll
LoadedModule[23]=C:\windows\system32\USERENV.dll
LoadedModule[24]=C:\windows\system32\profapi.dll
LoadedModule[25]=C:\windows\system32\WINSPOOL.DRV
LoadedModule[26]=C:\windows\system32\MPR.dll
LoadedModule[27]=C:\windows\system32\IMM32.DLL
LoadedModule[28]=C:\windows\system32\MSCTF.dll
LoadedModule[29]=C:\windows\system32\CRYPTBASE.dll
LoadedModule[30]=C:\windows\system32\uxtheme.dll
LoadedModule[31]=C:\Program Files\Common Files\Rockwell\rsDbgUtils.dll
LoadedModule[32]=C:\Program Files\Common Files\Rockwell\DbgHelp.dll
LoadedModule[33]=C:\windows\system32\CLBCatQ.DLL
LoadedModule[34]=C:\windows\system32\CRYPTSP.dll
LoadedModule[35]=C:\windows\system32\rsaenh.dll
LoadedModule[36]=C:\windows\system32\RpcRtRemote.dll
LoadedModule[37]=C:\windows\system32\msiltcfg.dll
LoadedModule[38]=C:\windows\system32\VERSION.dll
LoadedModule[39]=C:\windows\system32\SFC.DLL
LoadedModule[40]=C:\windows\system32\sfc_os.DLL
LoadedModule[41]=C:\windows\system32\SXS.DLL
LoadedModule[42]=C:\Program Files\Common Files\Microsoft Shared\VBA\VBA6\apc65.dll
LoadedModule[43]=C:\windows\system32\dwmapi.dll
LoadedModule[44]=C:\Program Files\Rockwell Software\RSView Enterprise\SEGfxVBAPs.dll
LoadedModule[45]=C:\Program Files\Rockwell Software\RSView Enterprise\SEGfxVBAComPs.dll
LoadedModule[46]=C:\Program Files\Rockwell Software\RSView Enterprise\SEGfxRoiCli.dll
LoadedModule[47]=C:\Program Files\Common Files\Microsoft Shared\office11\mso.dll
LoadedModule[48]=C:\PROGRA~1\COMMON~1\MICROS~1\VBA\VBA6\VBE6.DLL
LoadedModule[49]=C:\Program Files\Common Files\Microsoft Shared\OFFICE11\gdiplus.dll
LoadedModule[50]=C:\windows\system32\WTSAPI32.DLL
LoadedModule[51]=C:\windows\system32\WINSTA.dll
LoadedModule[52]=C:\windows\WinSxS\x86_microsoft.windows.common-controls_6595b64144ccf1df_6.0.7601.17514_none_41e6975e2bd6f2b2\Comctl32.dll
LoadedModule[53]=C:\PROGRA~1\COMMON~1\MICROS~1\VBA\VBA6\1033\VBE6INTL.DLL
LoadedModule[54]=C:\windows\WinSxS\x86_microsoft.windows.common-controls_6595b64144ccf1df_5.82.7601.18201_none_ec80f00e8593ece5\COMCTL32.DLL
LoadedModule[55]=C:\windows\system32\riched20.dll
FriendlyEventName=Stopped working
ConsentKey=APPCRASH
AppName=RSIVBA Module
AppPath=C:\Program Files\Rockwell Software\RSView Enterprise\SEGfxVBACli.exe

At this point I enabled the application crash logs on my dev pc, by adding the following key windows register (see here for more info):

HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindowsWindows Error LocalDumps

I restarted my dev pc and then I tried to reproduce the crash just by closing and opening the client a few times. Once the client crashed, thanks to the new key, I found the file SEGfxVBACli.exe.10136.dmp file in the following path: %LOCALAPPDATA%/CrashDumps. I opened this file using Windbg and i found some useful information:

Microsoft (R) Windows Debugger Version 10.0.18317.1001 X86
Copyright (c) Microsoft Corporation. All rights reserved.


Loading Dump File [C:\Users\c264079\Desktop\SEGfxVBACli.exe.10136.dmp]
User Mini Dump File: Only registers, stack and portions of memory are available

Symbol search path is: srv*
Executable search path is: 
Windows 7 Version 7601 (Service Pack 1) MP (2 procs) Free x86 compatible
Product: WinNt, suite: SingleUserTS
Machine Name:
Debug session time: Fri Apr 12 14:19:13.000 2019 (UTC + 2:00)
System Uptime: not available
Process Uptime: 0 days 0:01:37.000
........................................................
Loading unloaded module list
......
This dump file has an exception of interest stored in it.
The stored exception information can be accessed via .ecxr.
(2798.27a0): Access violation - code c0000005 (first/second chance not available)
For analysis of this file, run !analyze -v
eax=00000000 ebx=0012dd04 ecx=00000400 edx=00000000 esi=00000002 edi=00000000
eip=774a70f4 esp=0012dcb4 ebp=0012dd50 iopl=0         nv up ei pl zr na pe nc
cs=001b  ss=0023  ds=0023  es=0023  fs=003b  gs=0000             efl=00000246
ntdll!KiFastSystemCallRet:
774a70f4 c3              ret
0:000> !analyze -v
*******************************************************************************
*                                                                             *
*                        Exception Analysis                                   *
*                                                                             *
*******************************************************************************


KEY_VALUES_STRING: 1

    Key  : AV.Dereference
    Value: NullPtr

    Key  : AV.Fault
    Value: Read

    Key  : Timeline.Process.Start.DeltaSec
    Value: 97


PROCESSES_ANALYSIS: 1

SERVICE_ANALYSIS: 1

STACKHASH_ANALYSIS: 1

TIMELINE_ANALYSIS: 1

Timeline: !analyze.Start
    Name: <blank>
    Time: 2019-04-12T12:50:57.499Z
    Diff: 1904499 mSec

Timeline: Dump.Current
    Name: <blank>
    Time: 2019-04-12T12:19:13.0Z
    Diff: 0 mSec

Timeline: Process.Start
    Name: <blank>
    Time: 2019-04-12T12:17:36.0Z
    Diff: 97000 mSec


DUMP_CLASS: 2

DUMP_QUALIFIER: 400

CONTEXT:  (.ecxr)
eax=00000000 ebx=00000000 ecx=003a9cd0 edx=00000030 esi=7598ad60 edi=00000000
eip=65048ba2 esp=0012e460 ebp=0012e4ec iopl=0         nv up ei pl zr na pe nc
cs=001b  ss=0023  ds=0023  es=0023  fs=003b  gs=0000             efl=00010246
VBE6+0x48ba2:
65048ba2 3b0c98          cmp     ecx,dword ptr [eax+ebx*4] ds:0023:00000000=????????
Resetting default scope

FAULTING_IP: 
VBE6+48ba2
65048ba2 3b0c98          cmp     ecx,dword ptr [eax+ebx*4]

EXCEPTION_RECORD:  (.exr -1)
ExceptionAddress: 65048ba2 (VBE6+0x00048ba2)
   ExceptionCode: c0000005 (Access violation)
  ExceptionFlags: 00000000
NumberParameters: 2
   Parameter[0]: 00000000
   Parameter[1]: 00000000
Attempt to read from address 00000000

DEFAULT_BUCKET_ID:  NULL_POINTER_READ

PROCESS_NAME:  SEGfxVBACli.exe

FOLLOWUP_IP: 
VBE6+48ba2
65048ba2 3b0c98          cmp     ecx,dword ptr [eax+ebx*4]

READ_ADDRESS:  00000000 

ERROR_CODE: (NTSTATUS) 0xc0000005 - The instruction at 0x%p referenced memory at 0x%p. The memory could not be %s.

EXCEPTION_CODE: (NTSTATUS) 0xc0000005 - The instruction at 0x%p referenced memory at 0x%p. The memory could not be %s.

EXCEPTION_CODE_STR:  c0000005

EXCEPTION_PARAMETER1:  00000000

EXCEPTION_PARAMETER2:  00000000

WATSON_BKT_PROCSTAMP:  50e6de15

WATSON_BKT_PROCVER:  7.0.13.0

WATSON_BKT_MODULE:  VBE6.DLL

WATSON_BKT_MODSTAMP:  471d25c7

WATSON_BKT_MODOFFSET:  48ba2

WATSON_BKT_MODVER:  6.5.10.32

BUILD_VERSION_STRING:  6.1.7601.18409 (win7sp1_gdr.140303-2144)

MODLIST_WITH_TSCHKSUM_HASH:  7519ad49d50c93fe826d48b825b7f6a3f5f3a5f1

MODLIST_SHA1_HASH:  1fa60f616645a1dc8e31d4ee0210404172dd8bbf

NTGLOBALFLAG:  0

APPLICATION_VERIFIER_FLAGS:  0

DUMP_FLAGS:  94

DUMP_TYPE:  1

ANALYSIS_SESSION_HOST:  HYBRID-PVCR502N

ANALYSIS_SESSION_TIME:  04-12-2019 14:50:57.0499

ANALYSIS_VERSION: 10.0.18317.1001 x86fre

THREAD_ATTRIBUTES: 
OS_LOCALE:  ENU

BUGCHECK_STR:  APPLICATION_FAULT_NULL_POINTER_READ_INVALID_POINTER_READ

PRIMARY_PROBLEM_CLASS:  APPLICATION_FAULT

PROBLEM_CLASSES: 

    ID:     [0n313]
    Type:   [@ACCESS_VIOLATION]
    Class:  Addendum
    Scope:  BUCKET_ID
    Name:   Omit
    Data:   Omit
    PID:    [Unspecified]
    TID:    [0x27a0]
    Frame:  [0] : VBE6

    ID:     [0n285]
    Type:   [INVALID_POINTER_READ]
    Class:  Primary
    Scope:  BUCKET_ID
    Name:   Add
    Data:   Omit
    PID:    [Unspecified]
    TID:    [0x27a0]
    Frame:  [0] : VBE6

    ID:     [0n300]
    Type:   [NULL_POINTER_READ]
    Class:  Primary
    Scope:  DEFAULT_BUCKET_ID (Failure Bucket ID prefix)
            BUCKET_ID
    Name:   Add
    Data:   Omit
    PID:    [0x2798]
    TID:    [0x27a0]
    Frame:  [0] : VBE6

LAST_CONTROL_TRANSFER:  from 65042b40 to 65048ba2

STACK_TEXT:  
WARNING: Stack unwind information not available. Following frames may be wrong.
0012e4ec 65042b40 0012e580 02d73cd0 02d74428 VBE6+0x48ba2
0012e5c8 775b63a4 0012e5e0 00000000 00000000 VBE6+0x42b40
0012e5f0 775b6276 001609ab 0012e630 775b625c msctf!InternalIMCCLock::_UnlockIMCC+0x1b
0012e5fc 775b625c 00000000 0012e6ac 00000113 msctf!IMCLock::_UnlockIMC+0xd
0012e620 75996445 00000102 7c903014 0012e65c msctf!IMCLock::~IMCLock+0x19
0012e630 7599c4e7 003e093e 00001086 00000000 user32!NtUserPeekMessage+0xc
0012e65c 7599c5e7 65099750 003e093e 00001086 user32!InternalCallWinProc+0x23
0012e6d4 7599cc19 00000000 65099750 003e093e user32!UserCallWinProcCheckWow+0x14b
0012e734 7599cc70 65099750 00000000 75992b4d user32!DispatchMessageWorker+0x35e
0012e744 0041f82f 0012e768 0012e7bc 003f7c58 user32!DispatchMessageW+0xf
0012e74c 0012e7bc 003f7c58 0012e7c0 00000000 SEGfxVBACli+0x1f82f
0012e768 00000000 00000000 00000000 00054604 0x12e7bc


THREAD_SHA1_HASH_MOD_FUNC:  4a6e6f8baf4776e223752f735125cfd7390b30f6

THREAD_SHA1_HASH_MOD_FUNC_OFFSET:  fa693dbd1eac843a3924e4c82ce5d8d2be28b6a9

THREAD_SHA1_HASH_MOD:  04a56d9ed1b188a6cdecf8d621467fac390273f4

FAULT_INSTR_CODE:  75980c3b

SYMBOL_STACK_INDEX:  0

SYMBOL_NAME:  VBE6+48ba2

FOLLOWUP_NAME:  MachineOwner

MODULE_NAME: VBE6

IMAGE_NAME:  VBE6.DLL

DEBUG_FLR_IMAGE_TIMESTAMP:  471d25c7

STACK_COMMAND:  ~0s ; .ecxr ; kb

FAILURE_BUCKET_ID:  NULL_POINTER_READ_c0000005_VBE6.DLL!Unknown

BUCKET_ID:  APPLICATION_FAULT_NULL_POINTER_READ_INVALID_POINTER_READ_VBE6+48ba2

FAILURE_EXCEPTION_CODE:  c0000005

FAILURE_IMAGE_NAME:  VBE6.DLL

BUCKET_ID_IMAGE_STR:  VBE6.DLL

FAILURE_MODULE_NAME:  VBE6

BUCKET_ID_MODULE_STR:  VBE6

FAILURE_FUNCTION_NAME:  Unknown

BUCKET_ID_FUNCTION_STR:  Unknown

BUCKET_ID_OFFSET:  48ba2

BUCKET_ID_MODTIMEDATESTAMP:  471d25c7

BUCKET_ID_MODCHECKSUM:  281c17

BUCKET_ID_MODVER_STR:  6.5.10.32

BUCKET_ID_PREFIX_STR:  APPLICATION_FAULT_NULL_POINTER_READ_INVALID_POINTER_READ_

FAILURE_PROBLEM_CLASS:  APPLICATION_FAULT

FAILURE_SYMBOL_NAME:  VBE6.DLL!Unknown

WATSON_STAGEONE_URL:  http://watson.microsoft.com/StageOne/SEGfxVBACli.exe/7.0.13.0/50e6de15/VBE6.DLL/6.5.10.32/471d25c7/c0000005/00048ba2.htm?Retriage=1

TARGET_TIME:  2019-04-12T12:19:13.000Z

OSBUILD:  7601

OSSERVICEPACK:  18409

SERVICEPACK_NUMBER: 0

OS_REVISION: 0

SUITE_MASK:  256

PRODUCT_TYPE:  1

OSPLATFORM_TYPE:  x86

OSNAME:  Windows 7

OSEDITION:  Windows 7 WinNt (Service Pack 1) SingleUserTS

USER_LCID:  0

OSBUILD_TIMESTAMP:  2014-03-04 10:16:37

BUILDDATESTAMP_STR:  140303-2144

BUILDLAB_STR:  win7sp1_gdr

BUILDOSVER_STR:  6.1.7601.18409

ANALYSIS_SESSION_ELAPSED_TIME:  28ba2

ANALYSIS_SOURCE:  UM

FAILURE_ID_HASH_STRING:  um:null_pointer_read_c0000005_vbe6.dll!unknown

FAILURE_ID_HASH:  {2bab7801-cedf-2d01-08e7-be358bc1f51e}

Followup:     MachineOwner
---------

The interesting information that I found in the file reported above is:

ERROR_CODE: (NTSTATUS) 0xc0000005 - The instruction at 0x%p referenced memory at 0x%p. The memory could not be %s.

Final considerations

So, after the analysis carried out above, it seems that the sporadic crash of RSIVBA module on client startup is due to an istruction that try to reference to an illegal memory area. The strange thing is that this happens sporadically...

I tried can't figure out which instruction could produce this error. Anyone has experienced this problem?


Solution

  • After days of struggling, finally, I found the root of the problem! Now I'm going to explain what was causing the problem. If you have a bit of knowledge about FactorkTalk View Studio (FTVs) will be easier, but I will try to be as general as possible during the explanation because I think that this kind of error could occur even on other systems with VBA integrated.

    On FTVs you can create an HMI server that contains items called "Displays" that can be shown to users who access the HMI through a Factory Talk View Client (FTVc).

    Each display has its own VBA module and when a display is shown the following events, that can be handled on VBA side, will occur with this order:

    1. Application_DisplayLoad
    2. Display_Load
    3. Display_AnimationStart
    4. Display_Activate

    In one of my displays, in its Display_Load event, I was performing some objects initialization and look what Rockwell says about Display_Load event:

    Remarks

    1. When a display is not animating, ActiveX controls will not be activated and interaction with them may be limited.
    2. When a display is not animating, property writes and method calls to Graphics objects are not allowed and will cause errors to be raised.

    Try to guess... In Display_Load I was writing on the property of a Graphics object... So I just moved my code in the event Display_AnimationStart because code that is executed in there is sure to find all graphics objects correctly activated. Look what Rockwell says about Display_AnimationStart event:

    Remarks

    1. This event occurs after all elements in a display are activated. At this point, you can read and write to element properties and call element methods.

    Now the crash no longer occurs.