You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug]: Crash on attaching the file using generic input type="file" form control #30858
changed the title [-][Bug]: Coredump on attaching the file to draft email using ElectronMail v4.12.6[/-][+][Bug]: Crash on attaching the file to draft email using ElectronMail v4.12.6[/+]on Sep 6, 2021
Hey @vladimiry, thanks for reporting this issue! Sorry, I know this is easier said than done, but is there any way for you to make a minimal repro of the issue for our maintainers to use for testing? I tried to create a minimal Fiddle repro using a native dialog to open file attachments, but haven't been able to reproduce the issue; even if you could point me to where in ElectronMail you handle dialogs, that would be very appreciated 🙇♀️
One other question: could you try downgrading from 15.0.0-beta.2 to 15.0.0-alpha.9? We have a similar report on Windows that seems to appear beginning in 15.0.0-alpha.10, and I'm curious if this could have the same root cause.
Hi @VerteDinde, thanks for thorough clarifying questions. Not promising that I will be able to provide a minimal isolated repro project but I should be able to address rest of the points you raised within the next 3 days.
even if you could point me to where in ElectronMail you handle dialogs, that would be very appreciated
The ElectronMail itself triggers the file system-related dialog I think only in one place - selecting a destination folder for batch emails exporting (being handled in the main process here). This requires the account to be added into the app and the local store option to be enabled for that account (so you then switch to the "local store" mode and do export stuff).
But the app comes with an embedded https://github.com/ProtonMail/WebClients web clients stack which might potentially have a lot of file system-related dialog opening entry points. One of such entry points is adding the attachment to the draft email - you just compose a new email and attach any file and it gets crashed without showing the dialog (yes I've initially noticed that some dialog things are mentioned in the stack trace). This entry point, just composing new email and adding the attachment, is how the issue got noticed by the end-user. It's by the way unclear yet what system was used by that user (I've asked for details). For that user that could potentially be Windows, but I was able to reproduce the issue on Linux.
The ElectronMail itself triggers the file system-related dialog I think only in one place - selecting a destination folder for batch emails exporting
I've just tested the above-quoted case using https://github.com/vladimiry/ElectronMail/releases/tag/v4.12.6 on Linux and there is no crash when I select the destination folder via file system dialog (this code). So for now I can only say that it crashes during adding an attachment to email - so file selecting dialog triggered from the embedded into webview WebClients client/page. So not folder selecting, but file, and also might potentially be webview-specific. I understand that this information is not very helpful but still believe it narrows down the scope.
you just compose a new email and attach any file and it gets crashed without showing the dialog
I was of course wrong here. It of course shows the dialog and crashes after the file/files get selected.
One other question: could you try downgrading from 15.0.0-beta.2 to 15.0.0-alpha.9? We have a similar report on Windows that seems to appear beginning in 15.0.0-alpha.10, and I'm curious if this could have the same root cause.
Can confirm that 15.0.0-alpha.9 doesn't crash but 15.0.0-alpha.10 does.
@VerteDinde it crashes even for the following simple snippet (even without webview involving), so should be easy to reproduce. I didn't compare the stacktraces though but it's likely the same issue (crashes starting from 15.0.0-alpha.10).
I think this Chromium roll between 15.0.0-beta.9 and 15.0.0-beta.10 broke it, since it seems to be broken on both Windows and Linux. Mac is unaffected: #30370 Trying to find a fix now. (FWIW, the above repro doesn't work for me in Fiddle on Windows).
changed the title [-][Bug]: Crash on attaching the file to draft email using ElectronMail v4.12.6[/-][+][Bug]: Crash on attaching the file using generic input type="file" form control[/+]on Sep 9, 2021
@vladimiry I think my merging the fix PR automatically closed this issue, but should be addressed in 15-beta.5, which will release in a few hours! Could you let me know if you still see the behavior after beta.5 is released? If it persists, I'll reopen the issue.
Activity
[-][Bug]: Coredump on attaching the file to draft email using ElectronMail v4.12.6[/-][+][Bug]: Crash on attaching the file to draft email using ElectronMail v4.12.6[/+]VerteDinde commentedon Sep 7, 2021
Hey @vladimiry, thanks for reporting this issue! Sorry, I know this is easier said than done, but is there any way for you to make a minimal repro of the issue for our maintainers to use for testing? I tried to create a minimal Fiddle repro using a native dialog to open file attachments, but haven't been able to reproduce the issue; even if you could point me to where in ElectronMail you handle dialogs, that would be very appreciated 🙇♀️
One other question: could you try downgrading from 15.0.0-beta.2 to 15.0.0-alpha.9? We have a similar report on Windows that seems to appear beginning in 15.0.0-alpha.10, and I'm curious if this could have the same root cause.
Thanks so much!
vladimiry commentedon Sep 7, 2021
Hi @VerteDinde, thanks for thorough clarifying questions. Not promising that I will be able to provide a minimal isolated repro project but I should be able to address rest of the points you raised within the next 3 days.
The ElectronMail itself triggers the file system-related dialog I think only in one place - selecting a destination folder for batch emails exporting (being handled in the main process here). This requires the account to be added into the app and the local store option to be enabled for that account (so you then switch to the "local store" mode and do export stuff).
But the app comes with an embedded https://github.com/ProtonMail/WebClients web clients stack which might potentially have a lot of file system-related dialog opening entry points. One of such entry points is adding the attachment to the draft email - you just compose a new email and attach any file and it gets crashed without showing the dialog (yes I've initially noticed that some dialog things are mentioned in the stack trace). This entry point, just composing new email and adding the attachment, is how the issue got noticed by the end-user. It's by the way unclear yet what system was used by that user (I've asked for details). For that user that could potentially be Windows, but I was able to reproduce the issue on Linux.
vladimiry commentedon Sep 7, 2021
I've just tested the above-quoted case using https://github.com/vladimiry/ElectronMail/releases/tag/v4.12.6 on Linux and there is no crash when I select the destination folder via file system dialog (this code). So for now I can only say that it crashes during adding an attachment to email - so file selecting dialog triggered from the embedded into webview WebClients client/page. So not folder selecting, but file, and also might potentially be webview-specific. I understand that this information is not very helpful but still believe it narrows down the scope.
vladimiry commentedon Sep 8, 2021
I was of course wrong here. It of course shows the dialog and crashes after the file/files get selected.
Can confirm that 15.0.0-alpha.9 doesn't crash but 15.0.0-alpha.10 does.
vladimiry commentedon Sep 8, 2021
@VerteDinde it crashes even for the following simple snippet (even without webview involving), so should be easy to reproduce. I didn't compare the stacktraces though but it's likely the same issue (crashes starting from 15.0.0-alpha.10).
nornagon commentedon Sep 8, 2021
cc @codebytere. Possibly #30663 is relevant (might fix this issue?).
codebytere commentedon Sep 8, 2021
@nornagon i imagine it might though it might be a pain/unwise to backport so I can look to fix this as a one-off pending that larger PR being merged
VerteDinde commentedon Sep 8, 2021
@codebytere The root of the issue seems to be in this block within
FileSelectHelper::OnOpenDialogDone:I think this Chromium roll between 15.0.0-beta.9 and 15.0.0-beta.10 broke it, since it seems to be broken on both Windows and Linux. Mac is unaffected: #30370 Trying to find a fix now. (FWIW, the above repro doesn't work for me in Fiddle on Windows).
vladimiry commentedon Sep 8, 2021
I ran it on Linux only.
codebytere commentedon Sep 8, 2021
@vladimiry also reproduces on Linux for me, thanks!
[-][Bug]: Crash on attaching the file to draft email using ElectronMail v4.12.6[/-][+][Bug]: Crash on attaching the file using generic input type="file" form control[/+]VerteDinde commentedon Sep 13, 2021
@vladimiry I think my merging the fix PR automatically closed this issue, but should be addressed in 15-beta.5, which will release in a few hours! Could you let me know if you still see the behavior after beta.5 is released? If it persists, I'll reopen the issue.
Thanks again for reporting this! 🙇♀️
vladimiry commentedon Sep 13, 2021
@VerteDinde the issue appears to be fixed for me in 15-beta.5 on Linux. Thanks everyone involved into fixing it.