I have a form that is crashing CPS 10 with this message:
"Error occurred in class , method Window::event - WMsg = 273"
Does anyone know what could be causing this problem?
Hi Justin,
I've never seen this before. Are you able to reproduce this error on different machines? If this is a custom form, have you tried rebuilding/reimporting the clinical kit?
This is a test system so I only have one machine. Yes it's a custom form, and I have rebuilt/reimported multiple times in trying different things. The form opens fine and some of the functionality works. It only crashes when I fire a certain function that does some calculations, changes document variables, and then toggles a few visibility fields.
More than likely, you are doing something in the code that Centricity doesn't like. Have you checked the mel trace for any errors? You can also upload your .dlg if you want us to take look.
More than likely, you are doing something in the code that Centricity doesn't like.
Yes, that does seem to be the problem.
There are no errors in the MEL trace. I'm pretty experienced with MEL debugging and haven't found any problems looking at the code. It's rather extensive so I am going to refrain from uploading it.
This is an unusual case; AFAIK there is no documented way that MEL should be able to crash CPS. I was distantly hopeful that somewould would have a list of internal CPS Error codes...
Yeah, when it doesn't log the error in Mel Trace, I have to do trial and error to figure out what Centricity doesn't like about my code. If only we had a debugger.
I'd be happy to write one if someone has any ideas about how to attach to the process...
Is the crash consistent? Always at the same place using the same workflow? I've had these and the only way I could troubleshoot them was to go to end of the MEL trace where the trace just stops when the app crashed. At this point you work backwards in the trace to find out out what code was executing when the crash occurs. For me, it usually involves a bad index into an array (no these don't always throw BAD INDEX errors) or unexpected characters in the data set. I've seen both of these crash the EMR without warning or error.
Thanks mallenbrand, this is useful information. I have never seen a bad array index crash the EMR but it is helpful to know that could happen. I will give it another look at the point where the MEL trace stops.
SOLVED. You can not have a drop-down box within a visibility region whose visibility is dependent on the value of the drop-down. If you select a value with the drop-down arrow that causes the region to be hidden, CPS will crash.
Note that typing the value into the drop-down box is OK, the region becomes hidden as expected. Only when using the arrow and list does this problem occur. This is an internal problem to CPS involving the selection of an item in a drop-down list and the triggered hiding of a parent visibility region.