Starting about 2 weeks ago our AOS will crash, literally stopped and then I have to restart it.
It mostly happens in SalesTable adding a new line and with my login added as a retail channel user. We have found that in general when the userID is Retail, the automatic populating of the order line is slower than when entering a sales order line as a non-retail user.
My form changes to unresponsive after I entered the itemID. For retail it usually takes a while before it populates the default quantity and price etc, but sometimes it is so slow that it becomes not responsive and the AOS crash at that point.
I had it crash while I am not even running code, I am just in the AOT saving my code changes.
I must also say that it happens more when I turn off the "Run business operations in CIL" flag under Tools -> Options -> Development tab. I do that when I test code and want to use breakpoints.
I installed DebugDiag2 and added a rule to monitor the specific process for AX32Serv.exe. I tried to include a full heap but that makes AX so slow that it doesn't even want to load the main menu. So I had to remove it.
The DebugDiag 2 analysis tool came back with the following error:

The log-file that is generated with the dump file indicates the following regarding the exception 0xc0000374:
[11/16/2017 10:53:55 AM]
Thread exited. Exiting thread - System ID: 23696. Exit code - 0x00000000
Thread created. New thread - System ID: 23100
[11/16/2017 10:53:58 AM]
Exception 0X80000003 on thread 4572. DetailID = 58
[11/16/2017 10:53:59 AM]
Exception 0XC0000374 on thread 4572. DetailID = 59
[11/16/2017 10:56:47 AM]
Second chance exception - 0XC0000374 caused by thread with System ID: 4572 DetailID = 59
Thread exited. Exiting thread - System ID: 12832. Exit code - 0xffffffff
Thread exited. Exiting thread - System ID: 11388. Exit code - 0xffffffff
Thread exited. Exiting thread - System ID: 25300. Exit code - 0xffffffff
Thread exited. Exiting thread - System ID: 15748. Exit code - 0xffffffff
Thread exited. Exiting thread - System ID: 12536. Exit code - 0xffffffff
Thread exited. Exiting thread - System ID: 10100. Exit code - 0xffffffff
Thread exited. Exiting thread - System ID: 24744. Exit code - 0xffffffff
Thread exited. Exiting thread - System ID: 4420. Exit code - 0xffffffff
Thread exited. Exiting thread - System ID: 23204. Exit code - 0xffffffff
Thread exited. Exiting thread - System ID: 492. Exit code - 0xffffffff
Thread exited. Exiting thread - System ID: 8808. Exit code - 0xffffffff
Thread exited. Exiting thread - System ID: 6860. Exit code - 0xffffffff
Thread exited. Exiting thread - System ID: 18856. Exit code - 0xffffffff
Thread exited. Exiting thread - System ID: 17996. Exit code - 0xffffffff
Thread exited. Exiting thread - System ID: 9236. Exit code - 0xffffffff
Thread exited. Exiting thread - System ID: 20280. Exit code - 0xffffffff
Thread exited. Exiting thread - System ID: 20648. Exit code - 0xffffffff
Thread exited. Exiting thread - System ID: 9112. Exit code - 0xffffffff
Thread exited. Exiting thread - System ID: 15796. Exit code - 0xffffffff
Thread exited. Exiting thread - System ID: 18824. Exit code - 0xffffffff
Thread exited. Exiting thread - System ID: 23352. Exit code - 0xffffffff
Thread exited. Exiting thread - System ID: 18516. Exit code - 0xffffffff
Thread exited. Exiting thread - System ID: 15164. Exit code - 0xffffffff
Thread exited. Exiting thread - System ID: 19124. Exit code - 0xffffffff
Thread exited. Exiting thread - System ID: 6212. Exit code - 0xffffffff
Thread exited. Exiting thread - System ID: 24248. Exit code - 0xffffffff
Thread exited. Exiting thread - System ID: 23100. Exit code - 0xffffffff
Thread exited. Exiting thread - System ID: 16976. Exit code - 0xffffffff
Thread exited. Exiting thread - System ID: 19440. Exit code - 0xffffffff
Thread exited. Exiting thread - System ID: 17136. Exit code - 0xffffffff
Thread exited. Exiting thread - System ID: 5904. Exit code - 0xffffffff
Thread exited. Exiting thread - System ID: 9240. Exit code - 0xffffffff
Thread exited. Exiting thread - System ID: 20640. Exit code - 0xffffffff
Thread exited. Exiting thread - System ID: 4340. Exit code - 0xffffffff
Thread exited. Exiting thread - System ID: 5900. Exit code - 0xffffffff
Process exited. Exit code - 0xffffffff
***********************
* EXCEPTION DETAILS *
***********************
DetailID = 1
Count: 16
Exception #: 0XE06D7363
Stack:
KERNELBASE!RaiseException+0x6c
MSVCR120_CLR0400!CxxThrowException+0xc3
clr!TranslateSecurityAttributes+0x1d7ec
clr!NGenCreateNGenWorker+0x95cc2
clr!CreateAssemblyNameObject+0xfb5d
clr!StrongNameFreeBuffer+0xff
clr!GetPrivateContextsPerfCounters+0xd53b
clr!GetMetaDataPublicInterfaceFromInternal+0x18a26
mscorlib_ni+0x559c79
mscorlib_ni+0x4b313e
mscorlib_ni+0x4b30c6
mscorlib_ni+0x4bccd2
0x7ffe`fd33064c
0x7ffe`fd3305ff
0x7ffe`fd33f6bd
clr!LogHelp_LogAssert+0x1bf3
clr!LogHelp_LogAssert+0x1ac5
clr!MetaDataGetDispenser+0x7935b
clr!GetMetaDataPublicInterfaceFromInternal+0x19ff9
clr!GetMetaDataPublicInterfaceFromInternal+0x1d7f8
clr!GetMetaDataPublicInterfaceFromInternal+0x1d4b0
clr!GetMetaDataPublicInterfaceFromInternal+0x1bb37
clr!GetMetaDataPublicInterfaceFromInternal+0x1ba17
clr+0x4945
clr+0x21fe
Ax32Serv+0x2f4b31
Ax32Serv+0x2f51ed
Ax32Serv+0x2f55c2
Ax32Serv+0x2f640b
Ax32Serv+0x2f6494
Ax32Serv+0x5ce2b1
Ax32Serv+0x5cea65
Ax32Serv+0x24a012
Ax32Serv+0x1b4469
Ax32Serv+0x1b532b
Ax32Serv+0x1b613c
Ax32Serv+0x1b61bf
Ax32Serv+0x251a67
Ax32Serv+0x295d65
Ax32Serv+0x251a67
Ax32Serv+0x251ba8
Ax32Serv+0x2fbd63
Ax32Serv+0x1b18f3
Ax32Serv+0x1b452a
Ax32Serv+0x1b532b
Ax32Serv+0x1b6010
Ax32Serv+0x251a67
Ax32Serv+0x251ba8
Ax32Serv+0x2fbd63
Ax32Serv+0x1b18f3
Ax32Serv+0x1b452a
Ax32Serv+0x1b532b
Ax32Serv+0x1b6010
Ax32Serv+0x251a67
Ax32Serv+0x251ba8
Ax32Serv+0x2fbd63
Ax32Serv+0x1b18f3
Ax32Serv+0x1b452a
Ax32Serv+0x1b532b
Ax32Serv+0x1b6010
Ax32Serv+0x251a67
Ax32Serv+0x251ba8
Ax32Serv+0x2fbd63
Ax32Serv+0x1b18f3
Ax32Serv+0x1b452a
Ax32Serv+0x1b532b
Ax32Serv+0x1b6010
Ax32Serv+0x251a67
Ax32Serv+0x251ba8
Ax32Serv+0x2fbd63
Ax32Serv+0x1b18f3
Ax32Serv+0x1b452a
Ax32Serv+0x1b532b
Ax32Serv+0x1b6010
Ax32Serv+0x251a67
Ax32Serv+0x295663
Ax32Serv+0x251a67
Ax32Serv+0x251ba8
Ax32Serv+0x2fbd63
Ax32Serv+0x1b18f3
Ax32Serv+0x1b452a
Ax32Serv+0x1b532b
Ax32Serv+0x1b6010
Ax32Serv+0x251a67
Ax32Serv+0x251ba8
Ax32Serv+0x2fbd63
Ax32Serv+0x1b18f3
Ax32Serv+0x1b452a
Ax32Serv+0x1b532b
Ax32Serv+0x1b613c
Ax32Serv+0x1b6357
Ax32Serv+0x250eb8
Ax32Serv+0x173891
Ax32Serv+0x287237
Ax32Serv+0x2874f9
Ax32Serv+0x28761d
sechost!SubscribeServiceChangeNotifications+0x2ca
KERNEL32!BaseThreadInitThunk+0x22
ntdll!RtlUserThreadStart+0x34
Did anybody ran into this themselves and can shed some light on it? As I said I cannot run the tool with PageHeap Flags checked because it about kill AX performance, because the main menu can't even open, it just sits there with a grey screen.
If it was code related, then why would it crash even when I try to save X++ code in the AOT?