"Error: Invalid Parameter" when launching from Windows File Explorer (commas in file name)

I have recently developed a problem launching Dorico files from File Explorer in Windows 10. If Dorico is not running and I double-click a Dorico file in File Explorer, everything launches fine.

But if Dorico is already running when I double-click the file, I receive :“Error: Invalid Parameter” followed by “Error opening file”. If I drag from File Explorer into Dorico, the file loads fine.

I have completely uninstalled Dorico and reinstalled. That didn’t help. I have changed the default app association in Windows from Dorico to Notepad, then changed it back to Dorico. That didn’t help.

Anybody have any clues?

Could you do Help > Create Diagnostic Report and attach the resulting zip file here so I can take a look?

Thank you.
Dorico Diagnostics.zip (2.2 MB)

Sorry for the delay in coming back to you. The issue is that your project names have commas in them, which causes a problem with the interpretation of the arguments passed to the application on start-up. Basically, before Dorico gets a chance to try and open the files, the argument string is split at commas, so that instead of being told to open one file, it’s now told to open two files, neither of which is a complete file name.

At some point we will figure out a selection for this problem, but until then, I recommend you run Dorico, then open the project from the Hub. I know it’s less convenient, and I’m sorry for the inconvenience caused.

Thanks for that. This has been a frustrating one for me, not because of Dorico, but because I kept falling into the “coincidence trap.” Our human brains are very heavily wired to find correlations, to the degree that complete coincidences immediately seem like causation. If one time you see the grass rustling and then see a snake, the brain will be trained to assume there is a snake every time the grass rustles. The brain over-correlates as a matter of self-preservation. If it was really just the wind, then no harm done. But you really need to know if there is a snake out there, even if you over-estimate the snakes by 90%. That’s what the brain does.

In this case, the “only change” was that I had changed the fonts to use Bopmusic. I tried to resist the temptation to jump to that conclusion, but every experiment I did reinforced that original belief.

Part of this genetic tendency toward over-estimating coincidence is that the brain tries very hard to confirm those assumptions, and subconsciously I was drawn to test cases that reinforced the completely wrong initial correlation.

And now when I read your message, my initial reaction was “No that can’t possibly be true because I tried this on a whole bunch of Dorico files and got the same error. I know they didn’t all have commas.”

So I went back to the computer just to confirm I was right. Nope. Somehow every single case I tried must have had a comma in it (which is odd because I probably have commas in only 15% of my files.)

So you are right. Glad to know the cause. I can easily work around this, and I assume there will be an opportunity at some point for Dorico to crack that parameter string better.

Just a point of clarification: You said “project names have commas”. Did you mean the project’s file name as shown in File Explorer or are you talking about the “Project Name” stored internally (i,e, {@projecttitle@} )?

Sorry for being unclear: I do mean the file name.

I’ve also spent the last hour or so looking carefully at exactly what happens to a filename with a comma in it when it arrives by way of an argument passed to the application on the command line, and I think we can actually handle this case a little better, so that you shouldn’t encounter this error in future. Hopefully this will be included in the next update when it arrives.