Skip to content

Fix panic at redraw event in non redraw phase#1422

Closed
filnet wants to merge 3 commits into
rust-windowing:masterfrom
filnet:fix-panic-at-redraw-event-in-non-redraw-phase
Closed

Fix panic at redraw event in non redraw phase#1422
filnet wants to merge 3 commits into
rust-windowing:masterfrom
filnet:fix-panic-at-redraw-event-in-non-redraw-phase

Conversation

@filnet
Copy link
Copy Markdown
Contributor

@filnet filnet commented Jan 28, 2020

  • Tested on all platforms changed
  • Compilation warnings were addressed
  • cargo fmt has been run on this branch
  • cargo doc builds successfully
  • Added an entry to CHANGELOG.md if knowledge of this change could be valuable to users
  • Updated documentation to reflect any user-facing changes, including notes of platform-specific behavior
  • Created or updated an example program if it would help users understand this functionality
  • Updated feature matrix, if new features were added or implemented

@goddessfreya goddessfreya added DS - win32 Affects the Win32/Windows backend C - waiting on maintainer A maintainer must review this code labels Jan 29, 2020
@goddessfreya goddessfreya requested a review from Osspial January 29, 2020 21:47
@Kethku
Copy link
Copy Markdown

Kethku commented Jan 30, 2020

I was wrong again. This does not fix the issue.

@filnet
Copy link
Copy Markdown
Contributor Author

filnet commented Jan 30, 2020

@Kethku this PR also has a change to provide more information when the panic happens.

Could you reproduce the issue with this fix and report back the panic message ?

@Kethku
Copy link
Copy Markdown

Kethku commented Feb 1, 2020

I just pulled the resent change and the error seems to have gone away. I am trying reverting the most recent change to confirm the issue reappears.

@Kethku
Copy link
Copy Markdown

Kethku commented Feb 1, 2020

Ok it looks like on this machine I don't encounter the error which is very concerning. Remoting in to try from my other machine now.

@Kethku
Copy link
Copy Markdown

Kethku commented Feb 1, 2020

Arg. I can't get the error to reproduce in any environment anymore...

@filnet
Copy link
Copy Markdown
Contributor Author

filnet commented Feb 1, 2020

I had the same problem. Sometimes I can reproduce the issue 3 times in a row and sometimes it just won't reproduce. Very frustrating.
Might depend on non obvious things like what other apps you are running, phases of the moon, etc...

@Kethku
Copy link
Copy Markdown

Kethku commented Feb 1, 2020

Alrighty then. I can neither confirm nor deny at this moment if this PR fixes the issue

@Kethku
Copy link
Copy Markdown

Kethku commented Feb 1, 2020

I have updated my app to target this hotfix and will run with it until I find the error. I will report back in a couple of days if I have not seen it

@filnet
Copy link
Copy Markdown
Contributor Author

filnet commented Feb 3, 2020

This PR needs to be reviewed thoroughly. Although it seems to fix the issue, it feels like a workaround of the symptom. The root cause of the issue might still be there.

One thing, for example, it that the panic cannot be reached anymore. So why keep it ?

@filnet filnet force-pushed the fix-panic-at-redraw-event-in-non-redraw-phase branch from 1ddd984 to 277e352 Compare February 5, 2020 22:32
@tmpvar
Copy link
Copy Markdown

tmpvar commented Feb 8, 2020

With this patch I was able to drag/resize a winit window (on Windows 10) and it did not panic.

I was able to consistently repro on master @ 4eddd1e using the resizable example

     Running `target\debug\examples\resizable.exe`
Resizable: true
thread 'main' panicked at 'redraw event in non-redraw phase', src\platform_impl\windows\event_loop\runner.rs:427:17
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace.
error: process didn't exit successfully: `target\debug\examples\resizable.exe` (exit code: 0xc0000409, STATUS_STACK_BUFFER_OVERRUN)

This may not be an apples to apples comparison though as this branch is based on 0.20.0 while master is on 0.21.0. As a test, I've rebased this branch on 4eddd1e and still cannot repro the panic!

@filnet
Copy link
Copy Markdown
Contributor Author

filnet commented Feb 13, 2020

Superseded by #1461

@filnet filnet closed this Feb 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

C - waiting on maintainer A maintainer must review this code DS - win32 Affects the Win32/Windows backend

Development

Successfully merging this pull request may close these issues.

4 participants