Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Seized: comics open, but can't be moved or swapped or added or closed #97

Open
val-hall opened this issue Apr 18, 2023 · 6 comments
Open
Labels

Comments

@val-hall
Copy link

I seem to have a situation where Simple Comic has a list somewhere of all the opened comics. Unfortunately one (or more) may be corrupted, or some other problem is happening.

Symptom:
At launch, Simple Comic opens the last list of comics that were opened. Unfortunately, once the comics are opened, nothing can be done, the app seizes up. Open windows cannot be dragged, the layer order cannot be changed, open comics cannot be closed either by keyboard or mouse, the menus do not drop down, opening a cbr or cbz in the Finder does not work, and it cannot be Quit. The only way out is by the Force Quit, which shows application not responding.

Attmped remedies:
I figured I could just delete the list of open comics, but I have tried:
A simple Finder search: no luck
Using App Zapper to delete Simple Comic, which should delete associated support files: no luck
Searching the /System /Library ~/Library folder for any simplecomic files or folders using both locate and find in the Terminal: no luck

Environment:
Simple Comic v 1.9.6 (346)
MacBook Air M2 16GB RAM 1 TB HD
Mac OS Monterey v 12.6

Also:
The app works fine on an old Intel MacBook Pro running 10.14.5 Mojave.

How do I fix this? Is this a Monterey issue vs. Ventura issue? Where does Simple Comic keep its preference files, or list of open files? I figure if I could just delete those I could start fresh.

Thanks!

@nickv2002
Copy link
Collaborator

nickv2002 commented Apr 18, 2023

You've tried all the stuff I would do initially.

Maybe try turning off window restoration in the Finder (see this) temporarily to see if that stops SimpleComic from freezing at launch.

@DavidPhillipOster
Copy link

DavidPhillipOster commented Apr 19, 2023

Look in your Library (hold down the option key while looking at the Finder’s View menu ) from there, look at:

Containers/SimpleComic/Data/Library/Application Support/Simple Comic

the actual files are in that directory: SimpleComic.sql SimpleComic.sql-shm SimpleComic.sql-wal
Those files hold what Simple Comic uses to know what to open when it is launched

@val-hall
Copy link
Author

Thanks!

Something I did worked. I don't have a Containers folder in ~/Library, but I found that at ~/Library/Containers/Simple Comic where Library is a hidden directory. Maybe it's different with Monterey, or maybe I inherited an older structure because I've been updating in place since forever.

So I relaunched Simple Comic, and it came up empty. I opened a selection of cbz/cbr files, and it seemed to work as usual. I could swap between windows, open additional files, close files, all seemed good.

I then quit SC.

When I relaunched, the same selection of files opened, but the old problem returned. When the mouse pointer moves over a comic, it turns to the spinning beachball. The menubar is unresponsive, I cannot quit using Cmd-Q, the force quit dialog shows Simple Comic (not responding), double clicking a cbr/z file in the Finder does not open it. I can however click different windows to bring them to the front.

In the ~/Library/Containers/Simple Comic folder are two items: Data which is a directory that appears to be be a symlink to my home folder, and .com.apple.containermanagerd.metadata.plist.

When I open that file it does contain the string simplecomic, usually in combination with a variation of ~/users/val/library/containers/com.towatchlist.simplecomic/data/.

However, there is no such file/folder in my ~/Library.

So now I'm confused again. Where is Simple Comic pulling its list of opened files from?

Ah! I did a deep search again, and found the towatchlist file on one of my backup volumes.

It's actually at ~/Library/Containers/Simple Comic/Data/Library/Preferences/ and the three files in there are com.ToWatchList.SimpleComic.plist
com.apple.security.plist
com.apple.security_common.plist

However, when I open com.ToWatchList.SimpleComic.plist it does NOT contain a list of open files.

Ah. This might be it, although it doesn't explain why SC freezes after it opens.

In ~/Library/Containers/Simple Comic/Data/Library/Application Support/Simple Comic/ there are three files
SimpleComic.sql-wal
SimpleComic.sql-shm
SimpleComic.sql

And in ~/Library/Containers/Simple Comic/Data/Library/Saved Application State/com.ToWatchList.SimpleComic.savedState/ there are
data.data
restorecount.plist
window_1.data
windows.plist

Both directories and all 7 of those files were created today.

The windows.plist includes a list of files that were open with, I assume, coordinates.

So it seems something is getting corrupted or broken, either in the sql files or in the saved state files.

I'm pretty sure if I deleted all of that stuff SC would relaunch in a blank state, but it didn't solve the problem the last time I did that (yesterday). I would prefer SC to "just work".

What should I try now?

@nickv2002
Copy link
Collaborator

I would delete any and all *simplecomic* and *simple\ comic* (case-insensitive) files/folder you can find and start over.

Also, I don't know if it will fix anything but I'd be curious what effect this setting I mentioned earlier has:

You've tried all the stuff I would do initially.

Maybe try turning off window restoration in the Finder (see this) temporarily to see if that stops SimpleComic from freezing at launch.

@DavidPhillipOster
Copy link

When I was writing the OCR enhancements to Simple Comic, I wanted to run Simple Comic on my old High Sierra (OS X 10.13) Mac to make sure my new code would not break the app when run on old macOS. As I remember, I got the same, repeatable hang on startup that you've been experiencing. I fixed it by recompiling from source, and in my local copy of the Xcode project removing Resources/V1ToV2.xcmappingmodel and Sessions_DataModel.xcdatamodeld/Sessions_DataModel.xcdatamodel but I didn't not send an official patch to the master copy of Simple Comic, because I thought that that would be too radical a change. And because I barely know Core Data.

Once I'd verified that my OCR enhancements would not break Simple Comic, I dropped any attempt to make the official Simple Comic run on old macOS, and I believe the official maintainers restricted even further the versions it would run on.

One possible workaround: There is code in SimpleComicAppDelegate.m in the method:
- (void)application:(NSApplication *)sender openFiles:(NSArray *)filenames (line 394)
if you launch Simple Comic by clicking on a .cbz file (or using the contextual menu on, say, a .pdf file, and choosing Simple Comic) with the option key held down that Simple Comic skips some of the Core Data initialization that I think is causing your problem.

@nickv2002
Copy link
Collaborator

We do keep older builds around on the releases page of this GH project for older OS compatibility.
Specifically you might try https://github.com/MaddTheSane/Simple-Comic/releases/tag/App-Store-1.9.2 which is the release before we added the OCR code contributed by @DavidPhillipOster

@nickv2002 nickv2002 added the bug label Apr 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants