"The application xyz is not open anymore"

I’ve now got the third report about a really odd error message “The application Mail Archiver X . app isn’t open anymore.” “Mail Archiver X” is the name of the main app. The helper app has a space at the end. The error message showed up in the middle of adding data to the database. The helper app is a stay alive app. I’ve done the needful and goggled the error. But there are only vague ideas how to solve the problem like restarting and quitting the app.

Does anyone have another idea how to solve this?

Xojo 2020r2 and Xojo 2021r1. The user from today used 10.13.

I would name the application MAX Helper.app and when it fire (activate), test for the Mail Archiver X application (is it running ?) and launch it when needed, with a user interface dialog or panel that nform the user smething is running (no crash).

Now, how this can be is a different story.

The name of the helper app has historical reasons. Notifications showed up with the app of the helper name. Renaming the app is on the to-do list anyways because apps that end up with a space are recognised as spam app in enterprise environments.

But the current setup with app and helper app has been in place for at least half a dozen years.

Can you find anything about the helper app in the logs (Console)? Is it crashed because of an exception?

If you have a long loop in the helper try adding App.DoEvents(10) every iteration of (iteration mod 1000) = 0 so that the system knows the helper is responsive.

1 Like

I’ll ask the users.

No DoEvents. Ever. The helper app basically is a timer.

I once got the same error message (“The application Finder isn’t open anymore”). IIRC, I solved it temporarily by duplicating the Finder (E.g. to the desktop or to a temporary folder) and launching the copy. The original would never launch until I restarted the computer (as I couldn’t restart the computer at the moment and needed the Finder, copying it was an acceptable solution).

Do you mean the app was open and stayed that way?
In my case, the message would show when I tried to open the app (Finder), not in the middle of nothing. Not sure there’s only one cause, then… :thinking:

No, the main app was open and stayed that way. The error message is from the helper app which isn’t much more than a timer.

[trying to understand :thinking:]
The helper app triggered the dialog “the main app is not open anymore” (while it was of course open), correct?

In my, albeit short, experience with this issue (with the Finder), I got this message after the Finder crashed and I couldn’t launch it again.
It’s of course fairly possible a different cause leads to the same symptom (especially since this error message is weird and misleading at best), but I can only speak about what I’ve seen, obviously.

Is it the helper or the main app which does that?
As the dialog may take some seconds to show up and I assume adding the items to your database should be fast, I also wonder how you know this database command is the right culprit.

The dialog is from the helper app. Just got a video from a customer. He started the main app and immediately got the dialog that the helper app isn’t open anymore. He opened activity viewer and the helper app was running.

Ah, your first message led me to think the opposite:

I can confirm when this message happens, the app is in a “weird” state. I’m guessing it’s a bug in Launch Services, like some resources/files not being released correctly.

I’m waiting for your clarification about which process is concerned by the error.

The space isn’t very visible:

Mail Archiver X.app: main app
Mail Archiver X .app: helper app with space at the end.

The error message is from the helper app.

Why has the msg box the Finder icon?

Or, more precisely, from the OS about the helper.
Does this message appear always at the same step (when adding something to a database)? If yes, always the same location in the app?
Is the problem reproducible at will, on that computer or just random?

Have you tried opening the helper by other means (Shell, Launch/Open method, AppleScript, Declares), even if the problem happens after the helper has launched?
And copying the helper app to a temporary folder and launching it from there? (as a test, for now)

It’s a hard-to-track issue, that’s why I ask all these questions (and I’d be curious and happy to find an answer too). It’d be good to first pinpoint the call or pattern

Very good questions.

I have videos on the error message showing up when starting the main app and in the middle of adding data.

I’ve never seen the error message myself when working on the app.

I’ve changed from Folderitem.Launch to Folderitem.Open at some point. Folderitem.Open makes really odd errors. See feedback://showreport?report_id=64682 . I’ll change that back.

I’ll try copying the app to a different location, too.

Does the helper application make use of “Automatic Termination” or “Sudden Termination”. Plist settings or NSProcess API?

It is one of those good ideas previous Apple had, that’s become broken over the years and now Apple don’t even talk about Automatic Termination.

Nope, the app is basically a timer.

Did you put a loop with its DoEvents and a Actual Timer?

No DoEvents, just a regular timer.

How does it do timing if there is no eventloop?
You say basicly a timer then how does it do the timing?

Forum for Xojo Programming Language and IDE. Copyright © 2021 Xojo, Inc.