Exception when many changes are done to a Geodatabase using arcpy

05-27-2022 05:06 AM
Occasional Contributor III

There is a Python script that make modifications to a Geodatabase (Creation of tables, domains, relationships, views). The amount of changes is quite substantial.

In some point of the execution of the script, the process is stopped, and the window "ArcGIs Application has stopped working" appears.

checking the dump file that is going to be attached to the report, I have found that there is an exception in sdemssqlsrvr.dll (Attached file)

this is a bit of info from that file:

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


EXCEPTION_PARAMETER1: 0000000000000000

EXCEPTION_PARAMETER2: 0000000000000138

00000076`fc7193b0 00007ff9`00b45d66 : 00000076`fc71ad10 00000076`fc719f20 00000076`fc7215f4 00000076`fc719820 : sdemssqlsrvr!DB_table_calculate_stats_by_logfile+0x1ba4
00000076`fc7193e0 00007ff9`00b5363a : 00000076`fc721570 00000076`fc71a302 00000076`fc721570 00007ff9`00000000 : sdemssqlsrvr!DB_raster_get_max_id+0x7dc6
00000076`fc719e20 00007ff9`013c5037 : 00000076`00000000 0000025a`f6730d60 00000076`00000000 00000000`00000001 : sdemssqlsrvr!DB_registered_column_metadata_alter+0xcaa
00000076`fc71f130 00007ff9`013a911b : 0000025a`fbd0c050 00000076`fc725710 00000076`fc724eb0 0000025a`fbd0c050 : gsrvrmssql!S_gsrvr_main+0x84a7
00000076`fc722540 00007ff9`0138a1f5 : 00000000`00000000 0000025a`fbd0c050 0000025a`fbd0c050 0000025a`fbd0c050 : gsrvrmssql+0x3911b
00000076`fc724e90 00007ff9`013c0a3a : 00007ff9`ad75f4e8 0000025a`fbd0c050 0000025a`f68fb040 0000025a`fbd0c050 : gsrvrmssql+0x1a1f5
00000076`fc725900 00007ff9`ad691bb2 : 0000025a`f6953430 0000025a`f6953430 00000000`00000000 00000000`00000000 : gsrvrmssql!S_gsrvr_main+0x3eaa
00000076`fc72f900 00007ff9`afc37034 : 00000000`00000000 00000000`00000000 00000000`00000000 00000000`00000000 : ucrtbase!thread_start<unsigned int (__cdecl*)(void *),1>+0x42
00000076`fc72f930 00007ff9`aff42651 : 00000000`00000000 00000000`00000000 00000000`00000000 00000000`00000000 : kernel32!BaseThreadInitThunk+0x14
00000076`fc72f960 00000000`00000000 : 00000000`00000000 00000000`00000000 00000000`00000000 00000000`00000000 : ntdll!RtlUserThreadStart+0x21


As the script has been created to idempotent, if I run the script again, it will check the state of modifications and continue in the broken point. (I am able to finish the objective running the script twice)

In other computer, it happens, but I have to run the script three time to successfully end the script.


Reading more carefully the dump, I found this:

ExceptionAddress: 00007ff90f4101b4 (sdemssqlsrvr!DB_table_calculate_stats_by_logfile+0x0000000000001ba4)
   ExceptionCode: c0000005 (Access violation)
  ExceptionFlags: 00000000
NumberParameters: 2
   Parameter[0]: 0000000000000000
   Parameter[1]: 0000000000000138
Attempt to read from address 0000000000000138


something similar happend here:


Is there any way to surpass this behavior?


0 Kudos
0 Replies