Struggling to close Tropy on Mac

Basically what the topic title says. For around a year or so now Tropy struggles to close on Mac, I often have to either keep it open all the time or force close it (which I doubt is good for it) when I want to turn off my Macbook. I wasn’t sure if it was a problem with my computer, as it had other issues, so I wasn’t too bothered, but I just upgraded to the latest Macbook yesterday and the problem has followed me, making me think it is a Tropy issue. Is there a fix for this? I have a lot of files on there, as I go to archives a lot as a PhD student and use that to catalogue my images, so I love the software.

Can you elaborate on this? How are you trying to close Tropy? Does it work to close a project (without quitting Tropy) or does it hang also?

A log file might also help here. You can open the log folder via the help menu. Then try to quit Tropy, if it hangs, wait a minute or so and then make a copy of the tropy.log file and post it here. Thanks!

Just pressing x in the corner to close the program. I feel like I’m being stupid now, is there another way I should be doing it? I think I presumed it was like other applications - Word, Excel, even browsers. If that isn’t the way, please say, and I apologise. If it is, then I’m trying that, then it just freezes, and I have to force quit on Mac.

tropy.log (7.8 KB)
Log file

And now I’m trying to import images and I’m getting this error for every image I import.

‘buffer has corrupt header: source: bad seek to 3250754
heif: Invalid input: Unspecified: Metadata not correctly assigned to image (2.0)’

By closing the window, you’re closing the project. On macOS, even if the last project window is closed, Tropy will stay open (with no windows) but you can quit it via the menu or with Cmd+Q.

Having said, that, it sounds like closing the project window doesn’t work in your case. When a project is closed there are some clean-up/maintenance routines that are applied to the project database. Depending on the size of the project and the data at hand (e.g. if you deleted or changed a lot of data in the previous session) this can cause a noticeable delay – but normally it should not take more than a few seconds. Still, you could try leaving the window open for a few minutes just to see if it finally does close (unless you’ve tried that before already).

Regarding the log file, I think you copied it too soon (the shutdown sequence is not recorded in the log file). Could you try that again, making sure to copy the file only after the window hangs?

Also, could you try opening a different project, or just creating a new empty project, and closing it – for testing purposes, to see if the issue affects only a specific project.

Finally, before you proceed with any of this, I’d recommend making a backup copy of the .tpy file just to be save. If there’s indeed an issue running the maintenance tasks at shutdown it could be an indication of some integrity issues with the database file.

I’ve tried again and here it is. I hope this works this time?
tropy.log (8.4 KB)
Wait, it does close eventually, it took approx 3 minutes. It is a huge project. So perhaps I am too impatient? I haven’t tried the other suggestions due to that, sorry! Feel bad for bugging you now.

I know this is a different topic, but as you are a dev, a much more worrying (and important, I am a PhD student, so really rely on this) problem has now emerged. I can’t import photos. It just comes up with this error.

‘buffer has corrupt header: source: bad seek to 3250754
heif: Invalid input: Unspecified: Metadata not correctly assigned to image (2.0)’
This isn’t just one photo, this is a whole folder, tried importing both the folder and individual photos (there are around 500 in there). I’ve checked the metadata and it seems correct, so I don’t get what’s going on.

How many items/photos are in the project? Like I said, we run some routine tasks at shutdown to optimize the database file and these will take longer for larger projects. If it consistently takes three minutes that’s not ideal of course, but can you try closing it again to see if it’s quicker now that the tasks have completed once? It’s possible that it took longer because the tasks have been interrupted in the past.

Sorry, I forgot to respond to the import error earlier. Based on the error message it looks like there either might be an issue with the file at hand or something specific about the HEIC format that the library we use doesn’t support. Have you imported HEIC files like this before (assuming these were created by an iPhone)? Could you share the file in question with us so that we can take a look if we can reproduce this? When uploading the file here, it’s best to put it in a zip file to ensure the web server doesn’t alter the file to optimize it for the web.

You are going to think I’m mad, but 5,900. I probably should have made it a new project, now I think of it, I thought I could contain my PhD into one thing, but it might have got out of hand. It has been so useful for writing notes on the documents. You’ll see why when you view this file attached, as part of the separate issue.

I have imported many files like this, I mean the project has been going on for years, so I have had a couple of phones, but most of the files are of this type and this is the first time this issue has arose. I would upload the zip file, but apparently I’m not authorised to do so here?

Oh? Can you try that again? We recently had to tighten the rules here because of a bot invasion, but I think you should be able to upload zip files now.

5,900 shouldn’t be a big deal actually. I’d only expect the DB tasks to start taking longer if you’re closer to 100k images. Although it could vary if you have a lot of metadata and notes etc. In any case, can you confirm that it takes this long to close the window every time? Or is it improved now?

IMG_1393.HEIC.zip (3.1 MB)
Here is the photo that is causing the issue, one of many. But again, my project is filled with ones like this and I can’t see an obvious issue? Maybe it is something wrong with the photo, I’m not hugely technical, but I also did nothing different that time compered to before. I had a quick look at the data and compared it to ones I’ve successfully imported and I can’t see a difference either, yet it is a whole folder of ones from a trip to an archive.

I’ve just tried to close the program again and it is still taking ages, again now not a big deal in the scheme of things, as this importing issue is much bigger. Sorry to be a pain!

Do you think you know what the issue is? I can’t really do work on it until that is fixed. Thanks! Let me know if you need any more info.

Sorry it took me a while to respond, but I wanted to test this on different platforms. This is an issue in the libheif library with HEIC photos captured on iOS 18 or later. This has been fixed upstream, and we’ll have to rebuild our bundled libraries using the latest versions. So this is going to be fixed in the upcoming release. Until then, unfortunately, the only workaround is to convert the those files to a different format before importing. On macOS an easy way to do this is built-in: if you select a set of HEIC images you can select Convert Image from the Quick Actions context menu in Finder.

1 Like

Thank you so much, I just wanted to make sure it wasn’t a problem with my files. As you can guess by the photo, I can’t really go back and take it again, as I was given special permission to take it in the first place. I’m on a bit of a deadline too, but if there is a workaround, then that is great. It is going to be awkward, as I have a lot of photos (and I just took more, so I’m guessing they’ll have the same issue), but I’m so grateful. I’ll keep an eye out for an update and try the workaround. I presume converting to JPEG will work? I’ve had to do that a few times, as many things still don’t like HEIC.

Also thank you for the original problem, it was weird this came up during that, it sort of took over and became my priority.

Converting on macOS should be really easy to do after the fact, as I’ve outlined above:

HEIC has some benefits of course, but you can also set your iPhone to save new photos as JPEGs – this way you could skip the conversion for new photos.

Those are impressive photos for sure! Do you use handwriting recognition on them?

Thank you, I think all iPhones just changed to HEIC a while back, but I have no problem changing back to JPEG if it enables me to use this. Sorry for all the questions and I’m glad we worked out a fix!

Unfortunately, I haven’t found anything reliable enough to decipher 16th century handwriting, so I do it all myself. It takes a lot of time, which is why I really appreciate your software. Being able to write notes as I go, tag them, sort them by type etc. Beforehand, I was opening up Preview and a Word document and trying to cross-reference between the two. Not practical at all!

I just realised that I didn’t tell you that it fixed the problem - so thank you! I went through and converted them to JPEG and they work fine now, no problem at all importing. Hopefully a later update enables HEIC to work again, but for now that’s really helped.

As for the other issue, it is still slow closing, but it does close, so I just put up with it. I was so preoccupied with the main issue and getting that fixed. Everything else in it is really fast, importing is almost instant, especially now I have upgraded to a new Macbook, so it is a bit of an odd issue that has moved from one computer to another.

Would you be able to share your project file with us? Just the .tpy file would be fine (if this is a standard project you can see its contents by selecting 'show package contents in Finder).