Formula workshop crashing program

I’ve been using the formula workshop to try out formulas and PanX frequently crashes when I change something in the formula. I’ve seen this before and I noticed that Bill Shaw had a similar problem back in February. I don’t have to reinstall PanX to solve it, but I do have to restart. Inconvenient.

I would not be able to do anything with a vague report like this. I use the formula workshop CONSTANTLY, really I created it for my own use in testing. I often use it dozens of times per day. It never crashes unless there is a bug in a particular function, which would crash no matter how that function was used (of course this is rare).

If there is a specific problem you can report, I’ll be happy to look into it, but I do not believe there is any general problem with the Formula Workshop wizard.

Sorry to be vague, Jim. Here’s the exact situation, which I just replicated 3 times in a row:
A database is open. In the Formula Workshop I type this formula:

arraybuild(", ","",{«First Name»})

I see what I expect to see in the results window. I select the word First and type Last (thus attempting to change fields). Panorama instantly crashes. By way of variation I deleted First and tried to type Last in its place. Again the crash.

Another variation: I delete the whole function and retype it from scratch with Last Name instead of First Name, and no crash.

Hope that helps.
Bill

So it appears that a syntax error is not crashing it, but a field or variable that does not exist is. When you type it from scratch, you have a syntax error until the last parenthesis is typed. When you select the word First and start to type Last, your first keystroke changes that to

arraybuild(", ","",{«L Name»})

There is no syntax error, so it tries to evaluate that, and that’s when it crashes.

With a database that had First Name and Last Name fields, but no L Name field, I tried running the following procedure.

Local theName
theName = arraybuild(", ","",{«L Name»})
message theName

When I used the Run button in the procedure window to run it, the data sheet came to the front, and then nothing happened. There was no error alert, no message, and no crash. I then closed the procedure window, and ran it from the Action menu. It crashed. There seems to be a problem with arraybuild( crashing, but it doesn’t have to be in the Formula Workshop for it to happen.

Thanks, Dave, that’s very clear and makes good sense, though I wouldn’t have thought of it. Interesting that it crashes the program rather than just throwing an error…

Well, it’s a newly discovered bug.

After filing it, I went ahead and fixed it. As I suspected, this didn’t have anything to do specifically with the Formula Workshop, it was a bug in the code that scans a database with a formula. However, it is true that you are more likely to run into a bug like this with the Formula Workshop than you might be otherwise. Since the Formula Workshop runs the formula every time a key is pressed, it makes it more likely that you will try to run a formula that is incomplete and has errors. Normally, of course, this just causes an error message, but in this case there was a bug and the error wasn’t properly handled, causing the crash.