sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: electron
Issue: [Feature Request]: Listening for file upload events
Labels: enhancement :sparkles:

### Preflight Checklist

- [X] I have read the [Contributing Guidelines](https://github.com/electron/electron/blob/main/CONTRIBUTING.md) for this project.
- [X] I agree to follow the [Code of Conduct](https://github.com/electron/electron/blob/main/CODE_OF_CONDUCT.md) that this project adheres to.
- [X] I have searched the [issue tracker](https://www.github.com/electron/electron/issues) for a feature request that matches the one I want to file, without success.

### Problem Description

I want to make an automatic tool, when users want to upload files, there is no need to pop up the file selection box and I can automatically upload the specified file with code processing.Unfortunately, there are no similar events in the Electron to monitor the actions uploaded by users.

### Proposed Solution

Provide an event that can listen to the actions uploaded by the user and handle them without popping up  the file selection box.There are related events for the download action in the Electron,similar codes are as follows.

session.defaultSession.on('will-download', (event, item, webContents) => {
  event.preventDefault();
  //your code
})

### Alternatives Considered

Not currently

### Additional Information

Electron Version 12.2.2
Repository: pytorch
Issue: Bug about Dropout CUDA Kernel
Labels: module: nn,module: cuda,triaged

In `Dropout.cu` (https://github.com/pytorch/pytorch/blob/master/aten/src/ATen/native/cuda/Dropout.cu#L35)

In 56 lines， you set `bool gridxvec_loop_state = 0`。

When the `gridxvec_loop_state` is 0, you generate 4 rand numbers。and in other case，you want to use the last 2 rand values：
```cpp
    if ((VEC == 4) || (gridxvec_loop_state == 0)) {
      rand = curand_uniform4(&state);
    } else {
      // sets up the last two values we generated last iteration to be used this iteration.
      rand.x = rand.z;
      rand.y = rand.w;
      gridxvec_loop_state ^= 1;
    }
```
Since you set loop_state as 0, it enter the `if` branch and generate 4 random numbers，you didn't change the `loop_state` so you never enter the `else branch` and cannot use the last 2 rand values. 

In my opinion, it should be like this: 
```cpp
    if ((VEC == 4) || (gridxvec_loop_state == 0)) {
      rand = curand_uniform4(&state);
      gridxvec_loop_state ^= 1;
    } else {
      // sets up the last two values we generated last iteration to be used this iteration.
      rand.x = rand.z;
      rand.y = rand.w;
      gridxvec_loop_state ^= 1;
    }
```

cc @albanD @mruberry @jbschlosser @walterddr @ngimel
Repository: flutter
Issue: [MacOS] Unable to load assets with cyrillic characters in path
Labels: framework,engine,platform-mac,a: internationalization,a: assets,has reproducible steps,P2,found in release: 2.5,found in release: 2.6,team-engine,triaged-engine

Unable to load assets with "ё" or "й" characters in path on iOS. The same assets are successfully loaded on Android.
Unit-test passed on Windows, but failed on MacOS, All other cyrillc characters can be used without error.

## Steps to Reproduce

1. Create new flutter project
2. Create text asset 'assets/data/ё.txt' with 'ok' text in it
3. include asset in pubspec.yml
```
  assets:
    - assets/data/
```
4. Create unit-test test/asset_test.dart
5. 
```dart
import 'package:flutter/services.dart';
import 'package:flutter_test/flutter_test.dart';

void main() {
  TestWidgetsFlutterBinding.ensureInitialized();
    test('Check ё', () async {
      expect(await rootBundle.loadString('assets/data/ё.txt'), 'ok');
    });
  });
}
```
5. Execute `flutter test` on MacOS

**Expected results:**
Test passed

**Actual results:**
Test failed with error: unable to load asset

MacOS: BigSur
XCode: 12.4
Flutter: 2.5.3 stable

<details>
<summary>Code sample</summary>
Sample project to reproduce with app on iOS or with unit-test on MacOS:<be>

[assets_ru.zip](https://github.com/flutter/flutter/files/7601145/assets_ru.zip)

</details>

<details>
<summary>Logs</summary>

```console
[+11135 ms] [VERBOSE-2:ui_dart_state.cc(209)] Unhandled Exception: Unable to
load asset: assets/data/2. ё.txt
[   +2 ms] #0      PlatformAssetBundle.load
(package:flutter/src/services/asset_bundle.dart:224:7)
[        ] <asynchronous suspension>
[        ] #1      AssetBundle.loadString
(package:flutter/src/services/asset_bundle.dart:68:27)
[        ] <asynchronous suspension>
[        ] #2      MyHomePage.build.<anonymous closure>.<anonymous closure>
(package:assets_ru/main.dart:43:23)
[        ] <asynchronous suspension>
```
</details>
Repository: terminal
Issue: Process.CloseMainWindow() and Process.Close() are ignored for processes running in terminal
Labels: Product-Conpty,Area-Server,Issue-Bug,Priority-2

### Windows Terminal version

1.11.2921.0

### Windows build number

10.0.22000.258

### Other Software

.NET Framework 4.7.1

### Steps to reproduce

Configure Terminal as default terminal application.
Write application (in our case .NET framework 4.7.1 WPF application) that starts some other console process:
`var startInfo = new ProcessStartInfo {
  UseShellExecute = false
};
var process = new Process {
  EnableRaisingEvents = true,
  StartInfo = startInfo
};
process.Start();`

then try to stop this process with the following code:
`Process process = Process.GetProcessById(processId);
if (!process.HasExited) {
  process.CloseMainWindow();
  if (!process.HasExited) {
    if (!process.WaitForExit(5000)) {
      process.Close();
    }
  }
}`

### Expected Behavior

Process is stopped and the terminal tab is closed (same as in the case cmd.exe is the default terminal application).

### Actual Behavior

Nothing happens.
Repository: material-ui
Issue: [Popover] Changes position when typing in a text field in iOS Safari
Labels: bug 🐛,component: Popover,package: material-ui

### Duplicates

- [X] I have searched the existing issues

### Latest version

- [X] I have tested the latest version

### Current behavior 😯

When typing in the text field the Popover goes up

https://user-images.githubusercontent.com/51082730/143415025-a621e9cf-f8b7-43ab-a638-738823979f1f.MP4



### Expected behavior 🤔

It should stay on the anchor position I set

### Steps to reproduce 🕹

Steps:
Example: https://codesandbox.io/s/basicmenu-material-demo-forked-8dyxn?file=/demo.tsx 
1. Open `https://8dyxn.csb.app/` in iPhone
2. Click on textfield
3. Type something

Also try with safari address bar on bottom position

### Context 🔦

I want to add a `TextField` in the dropdown menu, I tried to use `Menu` and `Popover`, but I got the same issue.

### Your environment 🌎



Tech | Version
-- | --
Material-UI | v5.2.0
React | v17.0.2
browser | Safari
device | iPhone
Repository: bitcoin
Issue: init: torcontrol argument should be validated
Labels: P2P,good first issue

I accidentally `-torcontrol=1` today (instead of `-listenonion=1`) and was confused that it was accepted, as the argument needs to be `host:port`.

Expected outcome would be an error message and exiting.

#### Useful skills:

- C++
- Understanding of bitcoin core's initialization sequence

#### Want to work on this issue?

For guidance on contributing, please read [CONTRIBUTING.md](https://github.com/bitcoin/bitcoin/blob/master/CONTRIBUTING.md) before opening your pull request.
Repository: opencv
Issue: Python: sporadic failures of `get_cache_dir_test`
Labels: bug,test,category: python bindings

Python tests are launched in parallel (different processes for Python 2.7 / 3.x).

```
======================================================================
ERROR: test_get_cache_dir_imread_interop_jpeg (test_fs_cache_dir.get_cache_dir_test)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "C:\build\precommit_custom_windows\4.x\opencv\modules\python\test\test_fs_cache_dir.py", line 35, in test_get_cache_dir_imread_interop_jpeg
    self.get_cache_dir_imread_interop("jpg")
  File "C:\build\precommit_custom_windows\4.x\opencv\modules\python\test\test_fs_cache_dir.py", line 27, in get_cache_dir_imread_interop
    os.remove(test_file_name)
WindowsError: [Error 32] The process cannot access the file because it is being used by another process: 'C:\\build\\precommit_custom_windows\\build\\_ocl_tmp\\opencv\\4.5-dev\\downloads\\test.jpg'

======================================================================
ERROR: test_get_cache_dir_imread_interop_png (test_fs_cache_dir.get_cache_dir_test)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "C:\build\precommit_custom_windows\4.x\opencv\modules\python\test\test_fs_cache_dir.py", line 32, in test_get_cache_dir_imread_interop_png
    self.get_cache_dir_imread_interop("png")
  File "C:\build\precommit_custom_windows\4.x\opencv\modules\python\test\test_fs_cache_dir.py", line 27, in get_cache_dir_imread_interop
    os.remove(test_file_name)
WindowsError: [Error 5] Access is denied: 'C:\\build\\precommit_custom_windows\\build\\_ocl_tmp\\opencv\\4.5-dev\\downloads\\test.png'
```
Repository: material-ui
Issue: [TextField] Clipped label when used as first child in DialogContent
Labels: component: dialog,component: text field,package: material-ui

### Duplicates

- [X] I have searched the existing issues

### Latest version

- [X] I have tested the latest version

### Current behavior 😯

When using a `TextField` as the first child in a `DialogContent`, the top part of the label is clipped and not readable.

![image](https://user-images.githubusercontent.com/1771450/143437375-65f55ceb-f6d8-49d0-9eab-b29519fec9f4.png)


### Expected behavior 🤔

It shouldn't be clipped, and instead be visible.

### Steps to reproduce 🕹

Simple demo here: https://codesandbox.io/s/still-surf-tweos

```jsx
      <Dialog open>
        <DialogTitle>Title</DialogTitle>
        <DialogContent>
          <TextField value="test" label="Label" />
        </DialogContent>
      </Dialog>
```

### Context 🔦

_No response_

### Your environment 🌎

<details>
  <summary>`npx @mui/envinfo`</summary>

```
The sandbox uses 5.2.0
Browser that I tested: chrome and safari, both have the issue
```
</details>
Repository: ant-design
Issue: scrollToFirstError不能捕获Form.List抛出的错误做滚动
Labels: Inactive

- [ ] I have searched the [issues](https://github.com/ant-design/ant-design/issues) of this repository and believe that this is not a duplicate.

### Reproduction link
[![Edit on CodeSandbox](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/embed/dong-tai-zeng-jian-biao-dan-xiang-antd-4-17-0-forked-49lwc?fontsize=14&hidenavigation=1&theme=dark)

### Steps to reproduce
把窗口高度拉低，不要添加字段，拉到最下面点submit。将会抛出错误，但滚动条并没有发生改变。

### What is expected?
捕获到Form.List抛出的错误，浏览器滚动至错误提示

### What is actually happening?
抛出错误，但滚动条并没有发生改变。

| Environment | Info |
|---|---|
| antd | 4.17.0 |
| React | 16.14.0 |
| System | codesandbox |
| Browser | chrome |


<!-- generated by ant-design-issue-helper. DO NOT REMOVE -->
Repository: electron
Issue: [Bug]: Wrong initial window size, when using multiple monitors with different resolution and scaling
Labels: bug :beetle:,has-repro-comment,15-x-y

### Preflight Checklist

- [X] I have read the [Contributing Guidelines](https://github.com/electron/electron/blob/main/CONTRIBUTING.md) for this project.
- [X] I agree to follow the [Code of Conduct](https://github.com/electron/electron/blob/main/CODE_OF_CONDUCT.md) that this project adheres to.
- [X] I have searched the [issue tracker](https://www.github.com/electron/electron/issues) for a feature request that matches the one I want to file, without success.

### Electron Version

15.0.0

### What operating system are you using?

Windows

### Operating System Version

Windows 10 Enterprise 20H2

### What arch are you using?

x64

### Last Known Working Electron version

_No response_

### Expected Behavior

The initial effectiv window size is correct in various screen and scaling combinations.

### Actual Behavior

My setup:
Two screens with different resolutions (external + laptop) side by side.
The main monitor is the laptop screen. With 150% OS scaling.
Secondary monitor is the external screen. With 100% OS scaling.
The secondary (external) monitor is arranged on the left side of the primary monitor (laptop).

Open an new BrowserWindow on the secondary screen with
`    new BrowserWindow({
        show: true,
        width: 1500,
        height: 750,
        x: -1500,
        y: 150
    });`
results in a effective width of 987 and the effective height of 494.
**Thats wrong.** 

Open an new BrowserWindow on the primary screen with
`    new BrowserWindow({
        show: true,
        width: 1500,
        height: 750,
        x: -1500,
        y: 150
    });`
results in a effective width of 2233 and the effective height of 1118.
Thats ok, because the main screen is scalled (150%).

Using 100% OS scaling on both screens both new BrowserWindows calls will have width of 1468 and height of 743. Thats also ok.


### Testcase Gist URL

_No response_

### Additional Information

_No response_
Repository: kubernetes
Issue: Liveness Probe with an invalid command doesn't trigger container restarts and ContainersReady remains True 
Labels: kind/bug,sig/node,triage/accepted

### What happened?

Create a deployment with an invalid liveness probe and you'll see events like

> Liveness probe errored: rpc error: code = Unknown desc = failed to exec in container: failed to start exec "184850d48d723924f62e815706ee39ce8ff8b1d36abbb78552cfe634ccbc1276": OCI runtime exec failed: exec failed: container_linux.go:380: starting container process caused: exec: "invalid": executable file not found in $PATH: unknown

But the container did not restart and `ContainersReady` status is `True`

### What did you expect to happen?

ContainersReady is `False`
Container is restarted

### How can we reproduce it (as minimally and precisely as possible)?

Create a deployment with an invalid liveness probe

```
apiVersion: apps/v1
kind: Deployment
metadata:
  name: test
  namespace: default
spec:
  progressDeadlineSeconds: 10
  replicas: 1
  selector:
    matchLabels:
      app: test
  template:
    metadata:
      labels:
        app: test
    spec:
        containers:
        - name: liveness
          image: k8s.gcr.io/busybox
          args:
          - /bin/sh
          - -c
          - touch /tmp/healthy; sleep 10; rm -rf /tmp/healthy; sleep 600
          livenessProbe:
            exec:
              command:
                - "invalid"
            initialDelaySeconds: 5
            periodSeconds: 5
```


### Anything else we need to know?

_No response_

### Kubernetes version

<details>

```console
$ kubectl version
Client Version: version.Info{Major:"1", Minor:"22", GitVersion:"v1.22.1", GitCommit:"632ed300f2c34f6d6d15ca4cef3d3c7073412212", GitTreeState:"clean", BuildDate:"2021-08-19T15:45:37Z", GoVersion:"go1.16.7", Compiler:"gc", Platform:"darwin/amd64"}
Server Version: version.Info{Major:"1", Minor:"21", GitVersion:"v1.21.1", GitCommit:"5e58841cce77d4bc13713ad2b91fa0d961e69192", GitTreeState:"clean", BuildDate:"2021-05-21T23:01:33Z", GoVersion:"go1.16.4", Compiler:"gc", Platform:"linux/amd64"}
```

</details>


### Cloud provider

<details>
Kind
</details>


### OS version

<details>

```console
# On Linux:
$ cat /etc/os-release
# paste output here
$ uname -a
# paste output here

# On Windows:
C:\> wmic os get Caption, Version, BuildNumber, OSArchitecture
# paste output here
```

</details>


### Install tools

<details>

</details>


### Container runtime (CRI) and and version (if applicable)

<details>

</details>


### Related plugins (CNI, CSI, ...) and versions (if applicable)

<details>

</details>
Repository: godot
Issue: Cannot record audio on Linux when compiled with -fPIC
Labels: bug,topic:audio,regression

### Godot version

3.4.stable

### System information

Linux 5.15.4-arch1-1

### Issue description

The following code captures audio from a mic and plays it back:

```
extends Node

var capture := AudioEffectCapture.new()
var playback: AudioStreamGeneratorPlayback

func _ready():
	var idx := AudioServer.get_bus_count()
	AudioServer.add_bus(idx)
	AudioServer.set_bus_mute(idx, true)
	AudioServer.add_bus_effect(idx, capture)

	var mic := AudioStreamPlayer.new()
	mic.stream = AudioStreamMicrophone.new()
	mic.bus = AudioServer.get_bus_name(idx)
	add_child(mic)
	mic.play()

	var player := AudioStreamPlayer.new()
	player.stream = AudioStreamGenerator.new()
	playback = player.get_stream_playback()
	add_child(player)
	player.play()

func _physics_process(_delta: float):
	var n := capture.get_frames_available()
	var recorded := capture.get_buffer(n)
	var maxval := 0.0
	for i in range(n):
		playback.push_frame(recorded[i])

	capture.clear_buffer()
```

In godot 3.3.4, it works as expected. In godot 3.4, I hear nothing.

### Steps to reproduce

1. Run the example project with godot 3.3.4
2. Talk into your mic
3. Verify you hear your voice played back
4. Run the example project with Godot 3.4
5. Talk into your mic
6. Hear nothing played back

### Minimal reproduction project

[example.zip](https://github.com/godotengine/godot/files/7604719/example.zip)
Repository: electron
Issue: [Bug]: Paint events do not fire when window is initially hidden on Windows or Linux
Labels: bug :beetle:,has-repro-gist,16-x-y,21-x-y

### Preflight Checklist

- [X] I have read the [Contributing Guidelines](https://github.com/electron/electron/blob/main/CONTRIBUTING.md) for this project.
- [X] I agree to follow the [Code of Conduct](https://github.com/electron/electron/blob/main/CODE_OF_CONDUCT.md) that this project adheres to.
- [X] I have searched the [issue tracker](https://www.github.com/electron/electron/issues) for a feature request that matches the one I want to file, without success.

### Electron Version

16.0.0

### What operating system are you using?

Other (specify below)

### Operating System Version

Windows 11, macOS 12, Fedora 35

### What arch are you using?

Other (specify below)

### Last Known Working Electron version

11.5.0

### Expected Behavior

A hidden window with this configuration should still paint:

```ts
  const mainWindow = new BrowserWindow({
    width: 800,
    height: 600,
    show: false,
    paintWhenInitiallyHidden: true,
  })
```

The page should fire paint events that can be picked up by `PerformanceObserver`.

```ts
const observer = new PerformanceObserver((performance) => {
  console.log("Paint event:", performance.getEntries(), new Date().toString());
});
observer.observe({ entryTypes: ["paint"] });
```

### Actual Behavior

On Windows and Linux, paint events do not fire while the window is hidden. It is unclear whether any painting is happening while the window is hidden.

On macOS, it works as expected.

Windows console output in renderer:

````
Contentful element added to DOM: <h1>​Paint me!!​</h1>​
Showing window after timeout: Thu Nov 25 2021 13:26:28 GMT-0500 (Eastern Standard Time)
Paint event: Array(2) Thu Nov 25 2021 13:26:28 GMT-0500 (Eastern Standard Time)
````

Mac console output in renderer:

```
Contentful element added to DOM: <h1>​Paint me!!​</h1>​
Paint event: Array(2) Thu Nov 25 2021 13:25:10 GMT-0500 (Eastern Standard Time)
Showing window after timeout: Thu Nov 25 2021 13:25:13 GMT-0500 (Eastern Standard Time)
````

### Testcase Gist URL

https://gist.github.com/062c602a24a5f72a1f00d05285fdac68

### Additional Information

This behaviour seemed to regress gradually over the course of several Electron versions. In 11.x, the paint events reliably fire when the window is hidden. Around 13-14, they sometimes do, and sometimes do not. As of 16.0, they never fire on Windows or Linux, but continue to fire on macOS.
Repository: gin
Issue: With RedirectFixedPath enabled, the request execution panics when a 404 is expected
Labels: bug

## Description

When a request to a path doesn't match any registered patterns and the `RedirectFixedPath` flag is set to true, the request execution panics (invalid node type). This is the line throwing the panic: https://github.com/gin-gonic/gin/blob/v1.7.7/tree.go#L851 

If the panic is commented, everything seems to work as expected with the exception of the test `TestTreeInvalidNodeType`.

## How to reproduce

Add this function to the `gin_integration_test.go` file

```
func TestRedirectFixedPath(t *testing.T) {
	router := Default()

	router.RedirectFixedPath = true

	router.GET("/aa/aa", func(c *Context) { c.String(http.StatusOK, "/aa/aa") })
	router.GET("/:bb/aa", func(c *Context) { c.String(http.StatusOK, "/:bb/aa") })

	ts := httptest.NewServer(router)
	defer ts.Close()

	testRequest(t, ts.URL+"/aa/aa", "", "/aa/aa")
	testRequest(t, ts.URL+"/bb/aa", "", "/:bb/aa")

	testRequest(t, ts.URL+"/aa", "404 Not Found") // this request makes the router panic
}
```

## Expectations

The router should return a 404

## Actual result

The router panics and the client (curl) returns

```
curl: (52) Empty reply from server
```

## Environment

- go version: 1.17.3
- gin version (or commit ref): 1.7.7
- operating system: linux
Repository: pytorch
Issue: Breakes with -OO flag in script
Labels: needs reproduction,triaged,module: regression

## 🐛 Bug

I installed the latest PyTorch (CPU only) in a virtual environment using pip.
However, using Python optimization flag is not allowed, but it was in previous versions.

## To Reproduce

Running `python -OO -c "import torch"` yields the following error:

```
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/home/ramuri01/venv/lib/python3.9/site-packages/torch/__init__.py", line 643, in <module>
    from .functional import *  # noqa: F403
  File "/home/ramuri01/venv/lib/python3.9/site-packages/torch/functional.py", line 6, in <module>
    import torch.nn.functional as F
  File "/home/ramuri01/venv/lib/python3.9/site-packages/torch/nn/__init__.py", line 1, in <module>
    from .modules import *  # noqa: F403
  File "/home/ramuri01/venv/lib/python3.9/site-packages/torch/nn/modules/__init__.py", line 2, in <module>
    from .linear import Identity, Linear, Bilinear, LazyLinear
  File "/home/ramuri01/venv/lib/python3.9/site-packages/torch/nn/modules/linear.py", line 6, in <module>
    from .. import functional as F
  File "/home/ramuri01/venv/lib/python3.9/site-packages/torch/nn/functional.py", line 2231, in <module>
    embedding_bag.__doc__ = embedding_bag.__doc__.format(**reproducibility_notes)
AttributeError: 'NoneType' object has no attribute 'format'
```

Using a single `-O` or no optimization flag, the import does not fail.

## Environment

Using Python 3.9.5 in Ubuntu 21.04 x86_64.

cc @ezyang @gchanan @zou3519 @bdhirsh @jbschlosser
Repository: godot
Issue: [Bullet] Wonky long thin RigidBody collisions
Labels: bug,topic:physics,topic:3d

### Godot version

3.4

### System information

Windows 10

### Issue description

A long thin rigidbody stops and jitters before coming into contact with another body (static or otherwise):

![uk0UTHDskg](https://user-images.githubusercontent.com/47012977/143495267-54f2af82-f0ec-4b69-a7e4-8ae95f454428.gif)


### Steps to reproduce

Open the attached project and hit F5.

Or make a thin falling RigidBody object and a StaticBody floor in your own project.

### Minimal reproduction project

Here is the minimal project used in the gif. All project settings are default.
[WonkyBeamCollision.zip](https://github.com/godotengine/godot/files/7605057/WonkyBeamCollision.zip)
Repository: opencv
Issue: ARM SVE enablement
Labels: optimization,RFC,evolution,effort: ∞

This ticket tracks progress and other issues of "SVE enablement" feature.

[ARM C Language Extensions for SVE](https://developer.arm.com/documentation/100987/latest)

Initial discussion: #20562 (PR)