Post

Replies

Boosts

Views

Activity

How to determine why my spotlight importer is not working?
I have a SpotLight importer for my custom document type. At one point it was working, but apparently it stopped working a while ago. After rebuilding the SpotLight index (-E) in the course of debugging, the few documents that previously worked no longer work. I have tested the importer using mdimport -t -d3 and the output looks reasonable. However, if I do a simple search such as mdfind 'kMDItemTextContent == "gasoline or propane"', the text is not found, even though it is present in the importer output. In fact, if I save the importer output to a file, the text is found in that file. The console log contains many instances of this error from mdworker_shared: All kCFPreferencesCurrentUser domains in this process will be volatile, because homeDirPath starts with /var/empty Is there anything I can do to figure out what is going wrong? I'm running on macOS 11.5.1.
10
0
2.5k
Aug ’21
Can the Emoji & Symbols panel deliver an event to the active window?
I would like my application to receive an event when the user clicks on an emoji or symbol in the macOS Emoji & Symbols panel and my application window is the key window. I need an event because I am not using an AppKit text component. Is this possible? For extra credit, is there a way may application can position the panel at a particular location in the window the way TextEdit does?
1
0
729
Dec ’21
problems opening dialog windows since macOS 12.2
Starting with macOS 12.2 (I believe), I have encountered problems when applications try to open dialogs, especially file dialogs. My hunch is that the problem is some kind of resource leak in the window manager. The system will run fine for a while (a day or two), then suddenly get very slow or applications will hang trying to open a dialog. The most interesting failure occurs when I try to use a Save dialog from Firefox. A file dialog is displayed that is almost completely invisible. The only visible component is the file format menu button. Usually I can dismiss the dialog with ESC, but sometimes that does not work. I have found that quitting an application sometimes fixes the problem temporarily, but generally a restart is needed. Given the seriousness of the problems, I wonder why I am not hearing about other people having this problem and why the problem has not been fixed. One possibility is that I am using an application that is not widely used and it is triggering the problem be not releasing resources. (I won't name the application now without having more evidence.) As an experiment, I have stopped using that application to see if the problems go away. Even if that is the explanation, I think the window manager should do better at preventing one application from causing problems with other applications. FB9937157 submitted two months ago
2
0
821
May ’22
Unexpected .DS_Store files?
I have occasionally encountered unexpected problems deleting directory trees (using rm -rf in a shell script). Recently, I encountered a similar problem using a third party application that failed to delete a directory tree using Java APIs. In both situations, the problem turned out to be a failure to remove a directory because it was not empty, and the file it contained was a .DS_Store file. This is odd for two reasons: The directory was not one I had viewed using Finder, so why was a .DS_Store file created? The .DS_store file was not protected, so why wasn't it deleted along with the other files in the directory? The only explanation I can think of is that the .DS_Store file was created by a background thread, which is possible, but what would a background thread be doing that would cause a .DS_Store file to be created?
6
0
3.9k
Jun ’22
problems with the list of windows in the dock menu for an application
I have several applications (written in Java, although I doubt that matters). Some of these applications define custom dock menus and some do not. None of them are NSDocument based. Most of the time, the dock menus for these applications include at the top a list of the document's windows. Windows that are hidden (minimized?) are included in the list with a diamond icon. I don't think that my applications or Java are creating these menu items. What I don't understand is that when the application is hidden, sometimes these menu items disappear from the dock menu and sometimes they remain. Is this a bug, or is there some rational explanation? (I would prefer that the menu items remain.) I'm running macOS 13.3.1 (Ventura).
0
0
552
May ’23
tapi generates .tbd lacking expected UUIDs
I'm trying to use tapi to generate a .tbd for a multi-arch dynamic library. The dynamic library has LC_UUIDs for both architectures, but the generated .tbd does not have a uuids section. I have tried generating .tbd versions 2, 3, and 4. (Which version should I use if I want to support older macOS releases?) I'm using the command tools from Xcode 15.0.1 on macOS 14.1 on arm64.
5
0
1k
Nov ’23
Unexpected Permission denied error on file sharing volume
I am getting recurring errors running code on macOS 15.1 on arm that is using a volume mounted from a machine running macOS 14.7.1 on x86. The code I am running copies files to the remote volume and deletes files and directories on the remote volume. The files and directories it deletes are typically files it previously had copied. The problem is that I get permission failures trying to delete certain directories. After this happens, if I try to list the directory using Terminal on the 15.1 system, I get a strange error: ls -lA TestVAppearances.app/Contents/runtime-arm/Contents total 0 ls: fts_read: Permission denied If I try to list the directory on the target (14.7.1) system, there is no error: TestVAppearances.app/Contents/runtime-arm/Contents: total 0
42
0
2.4k
Mar ’25
What is a reasonable way for a script that runs otool to handle the need to agree to a new license?
I run otool from a script (actually from a program) and find it annoying that otool fails if I need to agree to a new version of the Xcode and SDKs license. Is there a way to test ahead of time whether this will happen, or detect when this problem occurs, so that I can display a dialog to tell me what I need to do? This happened after upgrading from macOS Tahoe beta 1 to beta 3.
4
0
160
Jul ’25
Java remote debugging stymied by connection refused on local network
I am trying to setup remote Java debugging between two machines running macOS (15.6 and 26). I am able to get the Java program to listen on a socket. However, I can connect to that socket only from the same machine, not from another machine on my local network. I use nc to test the connection. It reports Connection refused when trying to connect from the other machine. This issue sounds like it could be caused by the Java program lacking Local Network system permission. I am familiar with that issue arising when a program attempts to connect to a port on the local network. In that case, a dialog is displayed and System Settings can be used to grant Local Network permission to the client program. I don't know whether the same permission is required on the program that is receiving client requests. If it is, then I don't know how to grant that permission. There is no dialog, and System Settings does not provide any obvious way to grant permission to a program that I specify. Note that a Java application is a program run by the java command, not a bundled application. The java command contains a hard-wired Info.plist which, annoyingly, requests permission to use the microphone, but not Local Network access.
5
1
405
Aug ’25