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] Browser crash on Hyatt sign in page #224

Open
Wowfunhappy opened this issue May 19, 2024 · 5 comments
Open

[CRASH] Browser crash on Hyatt sign in page #224

Wowfunhappy opened this issue May 19, 2024 · 5 comments
Labels
bug Something isn't working

Comments

@Wowfunhappy
Copy link

Wowfunhappy commented May 19, 2024

Upon going to https://www.hyatt.com/en-US/member/sign-in, Chromium Legacy 124.0.6367.207.1 will crash.

Desktop (please complete the following information):

  • OS: Mac OS X 10.9.5.

A backtrace is attached.

_Chromium_2024-05-19-191918_Jonathans-Mac-Pro.crash.txt

A couple notes about the backtrace:

• It seems to implicate WebBluetooth, which AFAIK has never worked in Chromium Legacy anyway.
• It mentions a function called OnPropertyListFileChangedOnFileThread, which I believe is here.
• It says the problem is doesNotRecognizeSelector, which is usually easy to polyfill via Objective-C swizzling. However, in this case, I can't tell what selector it doesn't recognize, it seems to be all C++ code as opposed to Objective-C. (@krackers, can you tell what's happening here?)

@Wowfunhappy Wowfunhappy added the bug Something isn't working label May 19, 2024
@Wowfunhappy
Copy link
Author

Oh, this appears in the system console right before the crash:

5/19/24 7:30:52.166 PM _Chromium[66294]: +[NSDictionary dictionaryWithContentsOfURL:error:]: unrecognized selector sent to class 0x7fff7c5c3b60

Okay, so the selector is [NSDictionary dictionaryWithContentsOfURL:error:], which appears to be exactly the same as the older method [NSDictionary dictionaryWithContentsOfURL:]. So that's stupid...

@Wowfunhappy
Copy link
Author

Yep, that worked!

#import "ZKSwizzle.h"


@interface myNSDictionary : NSDictionary
@end

@implementation myNSDictionary

+ (NSDictionary *)dictionaryWithContentsOfURL:(NSURL *)url error:(NSError *)error {
	return [NSDictionary dictionaryWithContentsOfURL: url];
}

@end


@implementation NSObject (main)

+ (void)load {
	ZKSwizzle(myNSDictionary, NSDictionary);
}

@end

@Wowfunhappy
Copy link
Author

Wowfunhappy commented May 20, 2024

Okay, this is now fixed if you use #25. (And now I can book my hotel reservation!)

In terms of fixing in Chromium Legacy... while I'm sure there's a way to alter this in the original source, I would encourage/suggest making some type of compatibility library for functions like this, since I imagine this will come up again and it's an easy way to minimize divergence from upstream.

@RJVB
Copy link

RJVB commented May 20, 2024

Probably a bit tricky for ObjC methods (aka selectors) which are looked up by the runtime, if you have to add them conditionally on the OS version?

EDIT: ahem, what's the download location for the prefpane again? :-/

@Wowfunhappy
Copy link
Author

Wowfunhappy commented May 26, 2024

Notably, it looks like Bluebox tried to avoid using [NSDictionary dictionaryWithContentsOfURL:error:] already:

5bd5b20

But he must have missed one... unless this commit didn't make it into the latest release? I still think using some sort of compatibility library is better long-term.

Probably a bit tricky for ObjC methods (aka selectors) which are looked up by the runtime, if you have to add them conditionally on the OS version?

Well, you don't have to do it conditionally, since the old method still works. (Indeed, the commit linked above applies the change to all OS versions.) However, I think it should also be pretty simple to only perform the swizzle if (! __builtin_available(macOS 10.13, *)).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants