Crash unless procedure window is open

I seem to remember another post about this but couldn’t find it. Anyway, I have a proc that crashes Pan X, unless that proc window is open, then it runs fine. I’ve tried narrowing it down using zlog statements, and it seemed to be a removesummaries 7 statement, but when I commented that out, it crashed on the NEXT proc that ran, that also coincidentally has a removesummaries 7 statement.

I tried replacing it (in the first proc) with a removeAllsummaries, but still had a crash.

So, just wondering if there is some advice on this odd behavior, or on debugging it. I assume Jim can see my crash logs.

Your recent crashes are occurring in code that updates a text display object. The Text Display object is being updated as part of the removesummaries statement. The Text Display formula contains a lookup( function, and that is where the crash is actually occurring.

There is a known bug when using removesummaries with a form. I suspect you may be running into this bug. I have not yet tracked this one down.

I wonder if you might have luck by putting a firstrecord statement in front of the removesummaries statement. Just an educated guess, no guarantees. If it works, please let me know.

Back in May or June 2021 when Panorama X was frequently crashing (without data loss), someone on the forum claimed that he was able to reduce the number of crashes by replacing:

RemoveSummaries 7

with:

OutlineLevel “Data”
RemoveAllSummaries

in his/her procedures.

After making this change I observed fewer crashes but that may be more of a subjective feeling that a hard fact.

Ok, inserting a firstrecord just before RemoveAllSummaries seems to have fixed the problem. No crashes so far. Thank you!

Great, that may be a good clue towards fixing the problem.