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

Crash in showAddFeedWindow: #897

Closed
brentsimmons opened this issue Aug 28, 2019 · 4 comments

Comments

@brentsimmons
Copy link
Owner

commented Aug 28, 2019

Apparently the window isn’t always loaded?

It crashes in AddFeedWindowController.swift:59:

	hostWindow.beginSheet(window!) { (returnCode: NSApplication.ModalResponse) -> Void in

My bet is that window! is the site of the crash. Why the window wouldn’t get loaded, I have no idea.

@brentsimmons brentsimmons added this to the 5.0.1 Beta milestone Aug 28, 2019

@danielpunkass

This comment has been minimized.

Copy link
Collaborator

commented Aug 28, 2019

This smells like an "app was moved after launching" bug to me. I was able to reprodude a crash on the same line of code by:

  1. Open NetNewsWire
  2. Move/rename the app in the Finder. Note that you get a warning from Finder if you try to rename it, but not if you drag it to another folder!
  3. In NNW, select New Feed.

At this point the nib loading infrastructure of the app is still pointing at the app's original bundle location, where it won't find the desired .nib file it tries to load for the window controller.

@danielpunkass

This comment has been minimized.

Copy link
Collaborator

commented Aug 28, 2019

Crash log from my reproduction of the bug:

NetNewsWire_2019-08-28-131206_Picante.txt

@danielpunkass

This comment has been minimized.

Copy link
Collaborator

commented Aug 28, 2019

The whole class of bugs is hard to avoid, except by detecting that an app has been moved since launch, and encouraging users to quit and restart the app.

@brentsimmons

This comment has been minimized.

Copy link
Owner Author

commented Aug 28, 2019

Let’s pre-load the window at launch and recycle it on each use.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.