sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: flutter
Issue: Intercept android back button when the keyboard is open
Labels: c: new feature,platform-android,engine,c: proposal,P3,team-android,triaged-android

<!-- Thank you for using Flutter!

     If you are looking for support, please check out our documentation
     or consider asking a question on Stack Overflow:
      * https://flutter.dev/
      * https://api.flutter.dev/
      * https://stackoverflow.com/questions/tagged/flutter?sort=frequent

     If you have found a bug or if our documentation doesn't have an answer
     to what you're looking for, then fill out the template below. Please read
     our guide to filing a bug first: https://flutter.dev/docs/resources/bug-reports
-->

## Use case

<!--
     Please tell us the problem you are running into that led to you wanting
     a new feature.

     Is your feature request related to a problem? Please give a clear and
     concise description of what the problem is.

     Describe the alternative solutions you've considered. Is there a package
     on pub.dev/flutter that already solves this?
-->

As far as I know there is no way in flutter to intercept the back button event when the keyboard is open, flutter will always close the keyboard first. (I've looked into [WillPopScope](https://api.flutter.dev/flutter/widgets/WillPopScope-class.html) and [back_button_interceptor](https://pub.dev/packages/back_button_interceptor))

I have a [package](https://github.com/PegasisForever/keep_keyboard_popup_menu) that shows popup using overlay. (If I use the normal flutter popup, the keyboard will close itself when opening the popup)

I need to close the popup before closing the keyboard when the user presses the backbutton. (Because that's the default android behaviour) To implement this, I have to intercept the back button event when the keyboard is open and prevent the default flutter behaviour. Issue: PegasisForever/keep_keyboard_popup_menu#4

## Proposal

<!--
     Briefly but precisely describe what you would like Flutter to be able to do.

     Consider attaching images showing what you are imagining.

     Does this have to be provided by Flutter directly, or can it be provided
     by a package on pub.dev/flutter? If so, maybe consider implementing and
     publishing such a package rather than filing a bug.
-->

I would like flutter to implement a callback that will be fired when the user presses the back button, no matter the keyboard is opened or not.
Repository: go
Issue: all: replace os.Setenv with T.Setenv in tests
Labels: Testing,NeedsInvestigation

`TB.Setenv` was added recently, but no changes have been submitted to update the tests.

Here is a list of all tests using `os.Setenv` (obtained using `grep -F -l "os.Setenv" **/*_test.go`):

## std

```
crypto/x509/root_unix_test.go
go/build/build_test.go
go/internal/srcimporter/srcimporter_test.go
internal/execabs/execabs_test.go
net/http/transport_test.go
net/parse_test.go
os/exec/lp_unix_test.go
syscall/exec_unix_test.go
testing/testing_test.go
time/zoneinfo_test.go
time/zoneinfo_unix_test.go
```

## cmd

```
cmd/cover/cover_test.go
cmd/go/go_test.go
cmd/go/internal/cache/cache_test.go
cmd/go/internal/generate/generate_test.go
cmd/go/internal/modload/query_test.go
cmd/go/internal/vcs/vcs_test.go
cmd/go/internal/work/security_test.go
cmd/internal/pkgpath/pkgpath_test.go
cmd/objdump/objdump_test.go
```

For the `cmd` module, however, no tests actually restore the original environment variable, so I will not touch them.

For the `std` module I plan to only use `T.Setenv` on this pattern:

```go
defer os.Setenv(key, origValue)
os.Setenv(key, value)
```

There are some other cases like:
  - https://github.com/golang/go/blob/master/src/crypto/x509/root_unix_test.go#L84
  - https://github.com/golang/go/blob/master/src/crypto/x509/root_unix_test.go#L134
  - https://github.com/golang/go/blob/master/src/time/zoneinfo_unix_test.go#L16

I'm not sure if `T.Setenv` should be used in a sub test.

There are a few case when the environment variables are not restored, like `testing/testing_test.go` and `net/http/transport_test.go`, but probably it is ok.
Repository: rust
Issue: Docs for `CStr.as_ptr()` are describing `CString`
Labels: T-libs-api,A-docs,C-bug

The documentation for [CStr.as_ptr()](https://doc.rust-lang.org/std/ffi/struct.CStr.html#method.as_ptr) is identical to docs for [CString.as_ptr()](https://doc.rust-lang.org/std/ffi/struct.CString.html#method.as_ptr) and does not work for `CStr`. For instance, the provided code samples don't even create a `CStr`.

<!-- TRIAGEBOT_START -->

<!-- TRIAGEBOT_ASSIGN_START -->

<!-- TRIAGEBOT_ASSIGN_DATA_START$${"user":"hkBst"}$$TRIAGEBOT_ASSIGN_DATA_END -->

<!-- TRIAGEBOT_ASSIGN_END -->
<!-- TRIAGEBOT_END -->
Repository: flutter
Issue: [video_player] can't seek() while video is stopped on iOS 
Labels: platform-ios,p: video_player,package,has reproducible steps,P2,found in release: 2.2,found in release: 2.4,team-ios,triaged-ios

We are using video_player: ^1.0.1.
We have functionality when user have to seek while video is stopped. It works fine in Android.
But it doesn't work well in iOS. Frames doesn't change properly in this case.
We have custom control panel and using method _player.seek(to: value)_  to have seek functionality

So it's critical for us, please fix it ASAP
Repository: go
Issue: proposal: encoding/json: add support of wrapped error in addErrorContext function 
Labels: Proposal,Proposal-Hold

### What version of Go are you using (`go version`)?
<pre>
$ go version
go version go1.15.5 darwin/amd64
</pre>
### Does this issue reproduce with the latest release?
Yes

### What operating system and processor architecture are you using (`go env`)?

<details><summary><code>go env</code> Output</summary><br><pre>
$ go env
GOARCH="amd64"
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOTOOLDIR="/usr/local/opt/go/libexec/pkg/tool/darwin_amd64"
</pre></details>

### What did you do?
https://play.golang.org/p/fwgQFqafa3S

### What did you expect to see?
Expected to see proper values set to **err.Field** and **err.Struct** even if error was wrapped by `fmt.Errorf()` in UnmarshalJSON of custom structure.

### What did you see instead?
In decode.go in **addErrorContext** function, `switch` won't work as expected because type mismatch.
So **err.Field** and **err.Struct** will be empty even if `d.errorContext.Struct != nil || len(d.errorContext.FieldStack) > 0` condition was passed.

### What did you propose?
Maybe it is better to use `errors.As()` instead of `switch`?
Like this:
```
// addErrorContext returns a new error enhanced with information from d.errorContext
func (d *decodeState) addErrorContext(err error) error {
	if d.errorContext.Struct != nil || len(d.errorContext.FieldStack) > 0 {
		var e *UnmarshalTypeError
		if errors.As(err, &e) {
			e.Struct = d.errorContext.Struct.Name()
			e.Field = strings.Join(d.errorContext.FieldStack, ".")
		}
	}
	return err
}
```
Repository: neovim
Issue: Neovim should ignore commands entered in the post-execution command mode pager
Labels: bug-vim,pager

<!-- Before reporting: search existing issues and check the FAQ. -->

- `nvim --version`: 0.5.0-dev
- `vim -u DEFAULTS` (version: ) behaves differently? No
- Operating system/version: N/A
- Terminal name/version: N/A 
- `$TERM`: N/A

### Steps to reproduce using `nvim -u NORC`

```
nvim -u NORC
:! yes
^C
```

`yes` is executed and the pager is shown. It takes up the entire screen, there is absolutely nothing from the previously active buffer (or any buffer, for that matter) visible. 

### Actual behaviour

If you press enter, the output pane closes and you are returned to the previously active buffer. If you press `q`, the buffer also closes and returns to the previously active buffer *but* it also leaves the editor with a `q` pushed onto the command stack, and will interpret the next keypress as the name of the macro to begin recording.

**However**, if you scroll through the command output (for example, hit `PgUp`) then your keystrokes will be interpreted as pager commands and a `q` here will exit the pager without pushing a `q` onto the command stack (more sensible behavior).

The problem is that this destroys muscle memory. Visibly, you have the same state (pager shown with output of command) and depending on whether or not you interacted with the pager, a `q` will either cleanly exit the pager and return to the active buffer, or it will *appear* to cleanly close the pager and return to the active buffer but will actually soon begin recording a macro.

### Expected behaviour

Given that the buffer is completely hidden when the full-screen pager is active, it is extremely unlikely that there are any command keystrokes (except in ex mode, obviously) that a user could sanely be expected to enter at this point. IMHO, it should be something with the meaning of "enter navigation keystrokes to scroll through the command output in the pager, press enter or any other key to exit the pager and return to the active buffer".

In particular and at the very least, assigning two different meanings to `q` depending on whether or not the pager has been interacted with is extremely non-intuitive. Given that a pager *is* active and that `q` is always used to leave pagers in general and is even used to leave a pager within (n)vim itself *some of the time*, I feel that entering either `q` or enter should suffice to close the pager without pushing a `q` onto the command stack.

I'm not sure this can be fixed with a plugin, unless there is some function along the lines of `HitEnterPending()` that be used in a keybinding to conditionally map `q` to `<CR>`.
Repository: godot
Issue: Multiple opened scenes are not treated independently when switching between them in the editor
Labels: discussion,topic:editor

**Godot version:**
Godot Engine v3.2.3.stable.official - https://godotengine.org
OpenGL ES 3.0 Renderer: NVIDIA GeForce GT 650M OpenGL Engine
Mac OS X Catalina

**Issue description:**
If I have opened 2 or more scenes n the editor and switch to one and open the script, then when I go back to the other scene and that is also opened in the first script. If I click on a node and go back to the scene I had opened the script in, then that scene shows the node.
![sceneswitch](https://user-images.githubusercontent.com/930478/114071937-af9c9b00-986f-11eb-88d1-99b5294b21db.gif)

**Steps to reproduce:**
Open two scenes with scripts attached.
Click between them to view the scene editors
Now on one of them open a script.
Click back to the other scene you will see that one also opens up a script
Now click on a node to view scene editor
Switch to the other scene where script had been opened. You will see it went to showing scene editor

Very annoying when dealing with multiple scenes.  This case is a general case of issue #47580
Repository: rust
Issue: LLVM ERROR: fixup value too large for data type
Labels: A-LLVM,O-macos,T-compiler,C-bug,O-AArch64

Moving from user forum: https://users.rust-lang.org/t/llvm-error-fixup-value-too-large-for-data-type/58059

---

Platform: Apple M1 (Mac Mini & Macbook Air)
Operating System: Mac OS X Big Sur 11.2.2
Host: aarch64-apple-darwin
Rust: 1.51.0 (stable)

Works fine on other systems such as Ubuntu with x86_64.

---

To reproduce, open [vimwiki-rs RefactorToEntity branch](https://github.com/chipsenkbeil/vimwiki-rs/tree/RefactorToEntity), navigate to the **vimwiki-server** directory, and run `cargo build --release`. This will fail on the final step with the LLVM error.

<img width="1077" alt="Screen Shot 2021-04-08 at 12 52 18 PM" src="https://user-images.githubusercontent.com/2481802/114073799-4dd93280-9869-11eb-9683-2df762b0850e.png">

--- 

When building a release version of my binary, I'm encountering, "LLVM ERROR: fixup value too large for data type!" This only happens with release, which is configured with these settings:

```toml
[profile.release]
opt-level = 'z'
lto = true
codegen-units = 1
```

These settings worked fine until I recently refactored my binary to use a new library I wrote that generates a lot of code using a mixture of derive and attribute macros, so I'm assuming it has something to do with that, but this error message doesn't tell me anything that I can do to try to fix it myself.

For reference, the project being compiled is **vimwiki-server** of [vimwiki-rs RefactorToEntity branch](https://github.com/chipsenkbeil/vimwiki-rs/tree/RefactorToEntity). It's a lot of code, so trying to undo changes one at a time is going to be difficult.

Has anyone seen this error before? What kinds of Rust code can lead to this?
Repository: pytorch
Issue: torch.arctanh not implemented for torch.float16
Labels: triaged,module: half

## 🐛 Bug

<!-- A clear and concise description of what the bug is. -->

Passing the following tensor into `torch.arctanh` raises the error `RuntimeError: "atanh_cpu" not implemented for 'Half''

```
x = tensor([[-0.2998,  0.0601, -0.0596, -0.2354, -0.9971,  0.5371,  0.4917, -0.8896,
          0.2407,  0.0967,  0.3950,  0.9170, -0.5732,  0.6201, -0.0596,  0.5112,
         -0.2969, -0.1533, -0.7598, -0.0820,  0.9722,  0.5176, -0.5000, -0.9805,
          0.9800]], dtype=torch.float16)
```

## Expected behavior

Compute arctanh of the given tensor. If numpy can do it, why can't PyTorch?

## Environment

PyTorch version: 1.7.1
Is debug build: False
CUDA used to build PyTorch: 10.2
ROCM used to build PyTorch: N/A

OS: Ubuntu 18.04.5 LTS (x86_64)
GCC version: (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0
Clang version: Could not collect
CMake version: version 3.10.2

Python version: 3.6 (64-bit runtime)
Is CUDA available: False
CUDA runtime version: No CUDA
GPU models and configuration: No CUDA
Nvidia driver version: No CUDA
cuDNN version: No CUDA
HIP runtime version: N/A
MIOpen runtime version: N/A

Versions of relevant libraries:
[pip3] numpy==1.18.5
[pip3] numpyro==0.5.0
[pip3] torch==1.7.1
[conda] Could not collect
Repository: create-react-app
Issue: apple-touch-icon "logo192.png" misleading?
Labels: needs triage

When creating a new react app, `index.html` contains this line of code:
```html
    <link rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png" />
```
which confuses me a bit. If an example file is named `logo192.png` I expect an image with 192x192px to be used here. The recommended size for an apple-touch-icon stated in[ the apple docs](https://developer.apple.com/design/human-interface-guidelines/ios/icons-and-images/app-icon/#app-icon-sizes) and this [stack overflow answer](https://stackoverflow.com/a/19933647/12340711) is 180px.

While [this google post](https://developers.google.com/web/fundamentals/design-and-ux/browser-customization#:~:text=A%20non-transparent%20PNG%20that's,the%20apple-touch-icon) says that _both 180px and 192px are ideal_.

If my assumptions are correct, this means: The file should be named `logo180.png` instead.

 I want to make sure that the `192` does not stand for something else and would open a submission on validation!
Repository: rust
Issue: rustdoc: Rename `--show-coverage` to `--output-format coverage` (and `coverage-json`)
Labels: T-rustdoc,A-doc-coverage,C-discussion

Right now, `--output-format` is greatly overloaded (as seen by https://github.com/rust-lang/rust/pull/82497). `--output-format json` is unstable, except when you use it with  `--show-coverage`. Also, `--show-coverage` is not great at conveying that it stops documentation from being generated at all.

I suggest that we rename `--show-coverage` to `--output-format coverage` and `--show-coverage --output-format json` to `--output-format coverage-json`, deprecate the old uses for a few releases, and then remove them.
Repository: godot
Issue: Godot 3.2.3 crashing on startup (Access violation - code c0000005)
Labels: bug,platform:windows,topic:core,needs testing,crash

<!-- Please search existing issues for potential duplicates before filing yours:
https://github.com/godotengine/godot/issues?q=is%3Aissue
-->

**Godot version:** 3.2.3
<!-- Specify commit hash if using non-official build. -->


**OS/device including version:** Windows 10
<!-- Specify GPU model, drivers, and the backend (GLES2, GLES3, Vulkan) if graphics-related. -->


**Issue description:**
Godot 3.2.3 crashing on startup. It is running into issue

Access violation - code c0000005

I only see the issue when I started godot using windbg without it I see a command windows pop up and disappear when I click on godot exe. I started running into this issue after installing docker and other components that come with it. I did uninstall docker and WSL2 but it didn't solve the problem.

I build godot 3.3 which failed to start as well.
I build godot 4.0 (current master 8th April 2021) and that started successfully.
<!-- What happened, and what was expected. -->


**Steps to reproduce:**


**Minimal reproduction project:**
<!-- A small Godot project which reproduces the issue. Drag and drop a zip archive to upload it. -->
Repository: flutter
Issue: Linux desktop doesn't wire up the persistent cache
Labels: engine,platform-linux,a: desktop,P2,team-linux,triaged-linux

For example, `--dump-skp-on-shader-compilation` doesn't work on Linux:
```
[ERROR:flutter/common/graphics/persistent_cache.cc(359)] Could not dump SKP from read-only or invalid persistent cache.
```
Repository: pytorch
Issue: at::globalContext().hasCUDA()'s forked tongue tells lies
Labels: module: multiprocessing,module: cuda,triaged

`at::globalContext().hasCUDA()` (when Pytorch is built with CUDA support) drills down to [`c10::cuda::device_count() > 0`](https://github.com/pytorch/pytorch/blob/eb5e1fc7137aee8810ff14819e98fa2a4fd7419e/aten/src/ATen/cuda/CUDAContext.h#L56).
Here's [`c10::cuda::device_count()`](https://github.com/pytorch/pytorch/blob/eb5e1fc7137aee8810ff14819e98fa2a4fd7419e/c10/cuda/CUDAFunctions.cpp#L99-L114):
```c++
DeviceIndex device_count() noexcept {
  // initialize number of devices only once
  static int count = []() {
    try {
      auto result = device_count_impl(/*fail_if_no_driver=*/false);
      TORCH_INTERNAL_ASSERT(result <= std::numeric_limits<DeviceIndex>::max(), "Too many CUDA devices, DeviceIndex overflowed");
      return result;
    } catch (const c10::Error& ex) {
      // We don't want to fail, but still log the warning
      // msg() returns the message without the stack trace
      TORCH_WARN("CUDA initialization: ", ex.msg());
      return 0;
    }
  }();
  return static_cast<DeviceIndex>(count);
}
```
`device_count` statically initializes `count` just once.

fork() copies a parent process's current address space to make a child process. If the parent has called `device_count` one or more times (such that `count` is already initialized) before calling fork(), the child _won't try to initialize_ `count` _again_.

Cuda is not fork safe. [If you issue a Cuda call in a parent process, fork, then issue another Cuda call in a child process, you get a driver error.](https://stackoverflow.com/questions/22950047/cuda-initialization-error-after-fork) If the child tried to reinitialize `count`, it should get an error, realize CUDA is not available, reset count to 0, and `at::globalContext().hasCUDA()` in the child would accurately return `false`. But the child doesn't try to reinitialize `count`,** so `at::globalContext().hasCUDA()` in the child misleadingly returns `true`.

I [consulted the oracles on stackoverflow](https://stackoverflow.com/questions/67011485/can-i-cause-a-meyers-singleton-to-reinitialize-in-forked-child-processes/67011644#67011644) and I don't think there's an easy way to fix the meyers-singleton pattern to force reinitialization after a fork.

@albanD suggested using something like autograd's [in_bad_autograd_fork logic](https://github.com/pytorch/pytorch/blob/305abde976d232494c6b5252111ce15523511ffe/torch/csrc/autograd/engine.cpp#L41-L56), see also https://github.com/pytorch/pytorch/wiki/Autograd-and-Fork. Maybe we could register a pthread_atfork to force reinitialization of `count` in forked children.

cc @ngimel @albanD 

** a couple times, i found that even if i changed `device_count` to aggressively refresh `count` on every call, `device_count_impl's cudaGetDeviceCount in the forked child succeeded, and some later cuda call exposed the fact that cuda was in a bad fork. But that's a followon issue.
Repository: react
Issue: Bug: iOS VoiceOver announces stale content in headings
Labels: Type: Bug,Browser: Safari,Component: DOM,Status: Unconfirmed

<!--
  Please provide a clear and concise description of what the bug is. Include
  screenshots if needed. Please test using the latest version of the relevant
  React packages to make sure your issue has not already been fixed.
-->

React version: 17.0.2

## Steps To Reproduce

1. Go to https://jeffreyatw.com/static/voiceover-react using iOS, enable VoiceOver
2. Swipe to first "Not clicked" h2, observe VoiceOver reads content correctly
3. Click the first "click me" button
4. Move VoiceOver's focus back to first h2, which is now "Clicked"
5. VoiceOver **incorrectly** reads it as "Not clicked, heading level 2"
6. Swipe to the second "Not clicked" h2, observe VoiceOver reads content correctly
7. Click the second "click me" button
8. Move VoiceOver's focus back to second h2, which is now "Clicked"
9. VoiceOver correctly reads it as "Clicked, heading level 2"

<!--



  Your bug will get fixed much faster if we can run your code and it doesn't
  have dependencies other than React. Issues without reproduction steps or
  code examples may be immediately closed as not actionable.
-->

Link to code example: https://jeffreyatw.com/static/voiceover-react

<!--
  Please provide a CodeSandbox (https://codesandbox.io/s/new), a link to a
  repository on GitHub, or provide a minimal code example that reproduces the
  problem. You may provide a screenshot of the application if you think it is
  relevant to your bug report. Here are some tips for providing a minimal
  example: https://stackoverflow.com/help/mcve.
-->

## The current behavior
VoiceOver reads the first h2 as "Not clicked, heading level 2". See attached video for more details:
https://user-images.githubusercontent.com/266170/114103859-b4b51680-987e-11eb-82b9-0d785442c3ae.mp4

## The expected behavior
VoiceOver should read the first h2 as "Clicked, heading level 2"