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

HookMain crash when using extractInfo #17

Open
joshgare opened this issue Oct 17, 2023 · 4 comments
Open

HookMain crash when using extractInfo #17

joshgare opened this issue Oct 17, 2023 · 4 comments
Labels
question Further information is requested

Comments

@joshgare
Copy link

Example project works without any issues and all unit tests working as expected too. However when I run the following code in a fresh project I get crash.

Code example:

        Task { @MainActor in
            let youtubeDL = YoutubeDL()
            let (formats, info) = try await youtubeDL.extractInfo(url: URL(string: "https://www.youtube.com/watch?v=WdFj7fUnmC0")!)
            print(formats, info)
        }

Crash info

Thread 5: EXC_BAD_ACCESS (code=2, address=0x2800001100)

Crash occurs on:

Hook.m

Line 55:

    ret = realMain(argc, argv);
    NSLog(@"%s: realMain=%d", __func__, ret);

When the following is called in YoutubeDL.swift:576

pythonObject = try await makePythonObject()

Fully expecting this to be something I am doing incorrectly.

@kewlbear kewlbear added the question Further information is requested label Oct 18, 2023
@kewlbear
Copy link
Owner

I don't get it. Hook.m is from FFmpeg-iOS package, but just extracting info doesn't need FFmpeg. Maybe yt-dlp is checking if FFmpeg is available?

@joshgare
Copy link
Author

joshgare commented Nov 1, 2023

Yep, that confused me when I was trying to debug. I've attached a very simple example project that has the crash in it. Hopefully it's of some help @kewlbear.

ExampleCrash.zip

@kewlbear
Copy link
Owner

kewlbear commented Nov 2, 2023

@joshgare Unfortunately, your example doesn't crash on my simulator. But I've noticed some issues and fixed YoutubeDL-iOS package. Please update to the latest version and let me know.

@HamstyDeveloper
Copy link

@joshgare Unfortunately, your example doesn't crash on my simulator. But I've noticed some issues and fixed YoutubeDL-iOS package. Please update to the latest version and let me know.

it work fine on simulator. but when we create a release versions it get stuck on extra info

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants