Switching to any layout or one specific layout? Damaged layout?
Happens in a known good backup or a new test database?
It is "random", sometimes a specific lay out, one I just changed, and sometimes if I enter a lay out I haven't changed. Sometimes if I changed little things in a script. And it happens in a known good functioning database. (But a database I am updating for a new release). I already posted an issue, because the first time it happened it was crashing when entering a layout with a dialog box. I separated the script in two pieces and in the second script I first use "Refresh Window" (clearing the cash and memory) before opening the dialog box, and then it works. In another layout I only changed one icon, not more, and Filemaker crashes. It feels like memory conflicts. It is not a lack of memory, I have the maximum of 16Gb. And further I only have mail and internet open at he same time.
I forgot to mention that I already restored the database several times. No errors occur when restoring the database.
"Restored" means "Recovered".
While this makes it less likely to be due to latent file damage, it does not conclusively rule out that possibility.
Recover can correct a problem without reporting that it did so--especially since it "resets" certain details to "factory spec" and rebuilds all field indexes without ever checking them for issues so that can sometimes correct an issue without ever telling you that it did so.
Did you test any of your recovered copies to see if they still have this issue?
And Recover is not always able to detect a problem with the file. I can think of several cases where a file had a damaged layout. Nothing was detected or corrected by Recover, but removing the suspect layout eliminated the problem.
Finally: This can get very confusing for some people: Just as File Damage can cause a crash so can a crash damage a file--particularly when you have a crash while making design changes to the file. So you need to consider the possibility that one of these crashes may have damaged or further damaged your file.
Thanks for your everlasting time and patience.
Sorry for the translation error, it is "recovered" indeed. And I understand your conclusion, that a crash can also damage other files. And yes, the recovered copies still have the same issue. But I found something out, related to this issue. (I reported an issue). See this post:
The interesting thing is, the specific layout that is crashing always, is a layout with a dialog box, and this is a layout that wasn't changed. Until version 13.0v4 I did not have this problem. This layout is crashing on a dialog box when entering the layout. If I add a script step "refresh window" everything is working fine. But there should be no need for a refresh because it happens directly after opening the layout.
Layouts don't "have" dialog boxes. Scripts do. I still think that a damaged layout is the most likely cause of your trouble, but it also could be damage to your script.
It's not unheard of for latent (hidden) damage to a file to produce a crash once the FileMaker application or OS version is updated to a newer version.
I'd test copies of your file where this layout has been removed. I'd test much older back up copies to see if any of them do not show this issue. I'd test copies using brand new scripts put in place of your current script.
And yes, this is frustrating and a lot of work. If you have the funds to do so, you might try FMDiff as an alternate means of checking your file for issues that might spot something that recover is missing.
You are right of course. What I mend is the first script step is opening the layout, the second script step is checking if there has been a change in a previous selection. If yes, then open a dialog box. And on this dialog box Filemaker is crashing. If the condition is not met, there is no dialog box and everything is working normal.
I think I will try some of your suggestions. I prefer to try it myself, that is the best way to learn something. Although I found a work around, I am going to try to find it.
Thanks for your support Phil, and if I found out what is was, I will let you know.