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

[Bug]: Crash on Mac when viewDidBecomeFirstResponder #33908

Closed
3 tasks done
mrchaofan opened this issue Apr 25, 2022 · 3 comments
Closed
3 tasks done

[Bug]: Crash on Mac when viewDidBecomeFirstResponder #33908

mrchaofan opened this issue Apr 25, 2022 · 3 comments
Labels
blocked/need-repro Needs a test case to reproduce the bug bug 🪲 crash 💥

Comments

@mrchaofan
Copy link

mrchaofan commented Apr 25, 2022

Preflight Checklist

Electron Version

17.4.0

What operating system are you using?

macOS

Operating System Version

10.13.6

What arch are you using?

x64

Last Known Working Electron version

No response

Expected Behavior

No crash.

Actual Behavior

A user of our app said that the app crashes frequently when first launched or when switching windows. We can't reproduce locally but the crashlog I added at additional information. I tried to change several lines of electron source code and send the new app to the user. He said he didn't meet crash so far.

The crash seems to be caused by a handle which called gfx::NativeView pointing to a nullptr and then call a method of the nullptr. But in objc, sending message to nil may be legal??? I'm not sure. I didn't take a formal programming class, I pretended to know JavaScript just for dinner😂😂😂

My changes:
mrchaofan@abe8c87

Testcase Gist URL

No response

Additional Information

guo.crashlog.txt

@mrchaofan
Copy link
Author

I've noticed the pr #33063

We update electron from 16.0.8 to 17.4.0. It crashes too but crash at the next line of change.

@jkleinsc jkleinsc added crash 💥 blocked/need-repro Needs a test case to reproduce the bug labels May 2, 2022
@jkleinsc
Copy link
Contributor

jkleinsc commented May 2, 2022

Thanks for reporting this and helping to make Electron better!

Based on your description above, I am not sure this is possible, but would it be possible for you to make a standalone testcase with only the code necessary to reproduce the issue? Electron Fiddle is a great tool for making small testcases and publishing them as gists that Electron maintainers can use.

If the bug you've found can be tested with a pass / fail test, please make the testcase exit 0 on success or nonzero on failure. The lets Electron's issue bot see what releases are affected by the bug by checking your test against different OSes and Electron versions.

I'm adding the blocked/need-repro label for this reason. After you make a test case, please link to it in a followup comment.

Thanks in advance! Your help is appreciated.

@mrchaofan
Copy link
Author

Thank you. I can't reproduce locally. The crashlog is reported from a client computer and the user is the only user met the problem. We have 200,000 daily active users. I close the issue if I can reproduce it or have new progress, I'll open it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked/need-repro Needs a test case to reproduce the bug bug 🪲 crash 💥
Projects
None yet
Development

No branches or pull requests

2 participants