I tried the first file you uploaded and it crashes for me every time. Sometimes it crashes in a few seconds and other times it takes up to a minute to crash.
Since most of your code is overcomplicated for my liking, I find it very difficult to follow.
One thing is your use of globals for your error handling
Code:
Global gError As Variant, gErr As Byte
Global gSp(11) As Variant ' 0 for control, send/return 1-9 for needed parameters, 10 for special code to use upon return like function value
Global gDoErr As Boolean
You have no error handling in your error handling routines. If they encounter an unhandled error wouldn't that make your globals go out of scope?
In my windows event viewer it shows exception code c0000005.
Exception code c0000005 is the code for an access violation. That means that your program is accessing (either reading or writing) a memory address to which it does not have rights. Most
commonly this is caused by:
- Accessing a stale pointer. That is accessing memory that has already been deallocated. Note that such stale pointer accesses do not always result in access violations. Only if the memory manager has returned the memory to the system do you get an access violation.
- Reading off the end of an array. This is when you have an array of length N and you access elements with index >=N.
I have no clue what that means. Wonder if it has something to do with you using a form instance rather than just the form itself.
If this helped, please click the star * at the bottom left and add to my reputation- Thanks