sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: storybook
Issue: [Bug]: Current version (v7.0.18) crashes React-Form-Hooks demos when using controls
Labels: bug,react,sev:S2

### Describe the bug

There seems to be a crash when using React hook form in interaction with Storybook's controls. As far as I've seen so far, it's somehow related to the interaction with the refs that RHF sets on the native input element.

The browser (Chrome and Safari) hangs relatively quickly or reports a maximum call stack error after a short time.

![image](https://github.com/storybookjs/storybook/assets/145201/c24e370e-4461-4d13-b0b9-c26617fddde6)



### To Reproduce

https://stackblitz.com/edit/github-9tkagt?file=tsconfig.json,src%2Fstories%2FForm.stories.tsx&preset=node

Then click on one of the controls to change the `width`.

### System

```shell
Environment Info:

  System:
    OS: macOS 13.4
    CPU: (20) arm64 Apple M1 Ultra
  Binaries:
    Node: 18.16.0 - /opt/homebrew/opt/node@18/bin/node
    npm: 9.5.1 - /opt/homebrew/opt/node@18/bin/npm
  Browsers:
    Chrome: 113.0.5672.126
    Firefox: 112.0.2
    Safari: 16.5
```


### Additional context

This was not an issue with Storybook v6 as far as we know.
Repository: flutter
Issue: Codelabs - Copy icon not present next to code snippet
Labels: team-codelabs,P3,triaged-codelabs

### Is there an existing issue for this?

- [X] I have searched the [existing issues](https://github.com/flutter/flutter/issues)
- [X] I have read the [guide to filing a bug](https://flutter.dev/docs/resources/bug-reports)

### Steps to reproduce

Adaptive Apps in Flutter and a few other codelabs do not not copy icon next to the sample code, some instances
https://codelabs.developers.google.com/codelabs/flutter-adaptive-app?hl=en#3
https://codelabs.developers.google.com/codelabs/flutter-adaptive-app?hl=en#6

### Expected results

Copy icon along with dark/light mode toggle should be present

### Actual results

Copy icon not present

### Code sample

NA

### Screenshots or Video

_No response_

### Logs

<details><summary>Logs</summary>

```console
[Paste your logs here]
```

</details>


### Flutter Doctor output

NA
Repository: rust
Issue: strip does not work on rust 1.70 binaries
Labels: C-bug,E-needs-mcve,-Cprefer-dynamic

Compiling any code with the standard library as shared.

env RUSTFLAGS="-C prefer-dynamic" cargo build -v --release

strip -s target/release/hello

I expected to see this happen: 

the stripped version must have a smaller executable and have all symbols removed

Instead, this happened: 

the size of the executable increased to 2.1 M and all symbols were there

`rustc --version --verbose`:
```
rustc 1.70.0 (90c541806 2023-05-31)
binary: rustc
commit-hash: 90c541806f23a127002de5b4038be731ba1458ca
commit-date: 2023-05-31
host: x86_64-unknown-linux-gnu
release: 1.70.0
LLVM version: 16.0.2
```

compiling as static or with musl works correctly

Worked as expected in all previous releases

I suspect LLVM 16 is the cause but cannot pinpoint the cause really.

tested on:
1) Red Hat Enterprise Linux release 8.8 (Ootpa)
2) CentOS Linux release 7.9.2009 (Core)
3) Rocky Linux 8.8
Repository: electron
Issue: [Feature Request]: ipcMain.handle() support methods (for testing)
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

Since `ipcMain` extends Node's `EventEmitter` class, we inherit methods such as `ipcMain.getEventListeners()` in order to query what has been registered and `ipcMain.emit()` to trigger them.

However, because `ipcMain.handle()` creates its own registry, there are no methods to query or trigger these listeners during testing.

### Proposed Solution

How about a new method of `ipcMain.getInvokeHandlers()`, which would return some variation of the internal `_invokeHandlers` Map? Either returning the Map itself (which would allow manipulation) or an Object keyed with the method string.

If we're returning a Map, maybe call it `ipcMain.getInvokeHandlerMap()`? … though that's a bit of a roller-coaster ride of a method name.

I also propose an `ipcMain.getHandlerFunction(method)` method which would return the single function registered for this method. But this would be just a convenience… for a method that probably doesn't need to be all that convenient.

So testing would look like:

```JS
const fakeEvent = new Event()
const func = ipcMain.getInvokeHandlers().get('my-method')
if (!func) throw "'my-method' not registered"
const result = await func(fakeEvent, 'arg1', 'arg2', 'arg3')
assert(result)
assert(result === 'correct value')
```

### Alternatives Considered

Right now the only way to do this is to force some Typescript, hold your breath, query `_invokeHandlers`, and hope this private property won't change in a future version of Electron.

Another alternative to the above proposal is something like `ipcMain.triggerHandler(method, event, …args)`, but that feels a little dangerous and doesn't really follow the patterns of `EventEmitter`. I think it would probably serve to confuse developers more than help them.

I suppose an even simpler solution would be to make the `_invokeHandlers` property public.

```JS
const func = ipcMain.invokeHandlers.get('my-method')
```

### Additional Information

I believe, recent changes to the IPC system, allow us to call the registered `_invokeHandlers` functions directly. And since we can only register one function per `.handle` method, we don't really need a counterpart to `.emit()`.
Repository: godot
Issue: VisualShader node window closes when main window is in focus, breaks tiling WMs
Labels: bug,platform:linuxbsd,topic:editor,topic:porting

### Godot version

v4.0.2.stable

### System information

Linux NixOS, using Sway as a tiling WM

### Issue description

When using the VisualShader system, if I try to add a node using either the "Add Node..." button or right-clicking on the graph, the new menu briefly appears as a new window but instantly closes when the main window is in focus.

This especially breaks on Linux tiling window managers such as Sway or i3 (when not using floating-layout) as the main window stays focused to prevent popups from forcibly grabbing focus.

Other types of windows, such as Editor Settings, do not have this issue as they stay open even if focus switches back to the main window.

I'd like to change this behavior to prevent the window from closing if the main window is in focus.

### Steps to reproduce

1. Open up any project that has a VisualShader resource.
2. Either click on "Add Node..." or right-click on the visual graph to make the node selector menu appear.
3. Bring your mouse back to the main window.
4. The node selector menu disappears without any other input.

### Minimal reproduction project

N/A
Repository: angular
Issue: Audit usage of navigator.userAgent, navigator.appVersion, and navigator.platform
Labels: area: zones

### Which @angular/* package(s) are the source of the bug?

zone.js

### Is this a regression?

No

### Description

This is getting really, really nitpicky but I am trying to keep our code base very clean.

Strong linting rules, style guidelines, acccessability and no browser errors/breaking changes/improvement notifications.

Due to what [seems to be this line of code](https://github.com/angular/angular/blob/c3205d0962f1ff0d2dd4fa26c70372f6fe80f5e3/packages/zone.js/lib/common/utils.ts#L489-L515) in zone.js, Chrome warns on:

> Audit usage of navigator.userAgent, navigator.appVersion, and navigator.platform

![image](https://github.com/angular/angular/assets/18640860/104664a8-f3df-45cb-9fcb-b9fc3cb0036d)

Is it possible to update zone.js in any way so as to not check `navigator.userAgent` and avoid this?

### Please provide a link to a minimal reproduction of the bug

Any Angular site using zone.js using Chrome

### Please provide the exception or error you saw

```true
Audit usage of navigator.userAgent, navigator.appVersion, and navigator.platform

A page or script is accessing at least one of navigator.userAgent, navigator.appVersion, and navigator.platform. Starting in Chrome 101, the amount of information available in the User Agent string will be reduced.

To fix this issue, replace the usage of navigator.userAgent, navigator.appVersion, and navigator.platform with feature detection, progressive enhancement, or migrate to navigator.userAgentData.

Note that for performance reasons, only the first access to one of the properties is shown.
```


### Please provide the environment you discovered this bug in (run `ng version`)

```true
Angular CLI: 16.0.3
Node: 18.16.0
Package Manager: npm 9.6.7
OS: win32 x64

Angular: 16.0.3
... animations, cli, common, compiler, compiler-cli, core, forms
... platform-browser, platform-browser-dynamic, router

Package                         Version
---------------------------------------------------------
@angular-devkit/architect       0.1600.3
@angular-devkit/build-angular   16.0.3
@angular-devkit/core            16.0.3
@angular-devkit/schematics      16.0.3
@angular/cdk                    16.0.2
@schematics/angular             16.0.3
rxjs                            7.8.1
typescript                      5.0.4
```


### Anything else?

_No response_
Repository: pytorch
Issue: Do smarter layout decisions with concatenate.
Labels: feature,triaged,oncall: pt2,module: inductor

### 🚀 The feature, motivation and pitch

Today, we always decide to turn the result of a concatenate into a contiguous layout (see https://github.com/pytorch/pytorch/blob/main/torch/_inductor/ir.py#L2578).

This makes sense if we're concatenating along the last dim, since all of our data is stored in contiguous tensors.

However, if we're concatenating along outer dims, and particularly if that outer dim is very small (like with stack, which lowers into a concatenate with dim size 1), then this will result in each element being stored in noncontiguous memory layouts, which may be quite unperformant to write into.

Instead of always making it contiguous, we could do some more intelligent decisions on the output layout depending on the shape of the concatenate.

### Alternatives

_No response_

### Additional context

_No response_

cc @ezyang @msaroufim @wconstab @bdhirsh @anijain2305 @zou3519 @voznesenskym @penguinwu @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @peterbell10 @ipiszy @yf225 @chenyang78 @kadeng @muchulee8 @aakhundov @ColinPeppler @Xia-Weiwen @ngimel
Repository: neovim
Issue: force enable mouse forwarding in :terminal
Labels: enhancement,terminal,mouse,events

### Problem

Mouse is currently not supported on terminal. This could be patched in an easy way.

### Expected behavior

We should provide an option 

    mouse_terminal=true

100% mouse functionality require the next steps.

## When terminal is focused
```sh
# Make the mouse behave like in a regular terminal
set mouse=""
printf "\x1b[?1000l"
```

## Before a program is executed
```sh
# Enable mouse support for terminal programs
set mouse=a
printf "\x1b[?1000h"
```
## When the program ends
```sh
# Restore regular mouse behavior for the terminal
set mouse=""
printf "\x1b[?1000l"
```
## When terminal is unfocused
```sh
# Restore regular mouse behavior for neovim
set mouse=a|h|n  #   the value the user had  setted
```

We should clarify in the docs that one requires to have TERM=xterm256color for this to work, which is used by most modern terminals.

Optionally, we could add 2 more options to let the user set their own termcodes to use instead of the default \x1b[?1000h and \x1b[?1000l.
Repository: rust
Issue: Support wasm exception handling for Emscripten target
Labels: O-wasm,A-panic,O-emscripten

Currently the Rust Emscripten target supports js exception handling. I've been trying to get it to support also wasm exception handling. The patch to get it to exclusively use wasm exception handling is quite small. The following suffices:

<details>
<summary>Patch</summary>

```patch
diff --git a/compiler/rustc_codegen_llvm/src/llvm_util.rs b/compiler/rustc_codegen_llvm/src/llvm_util.rs
index a0a640473eb..cd88648911a 100644
--- a/compiler/rustc_codegen_llvm/src/llvm_util.rs
+++ b/compiler/rustc_codegen_llvm/src/llvm_util.rs
@@ -110,7 +110,7 @@ fn llvm_arg_to_arg_name(full_arg: &str) -> &str {
         }
 
         if sess.target.os == "emscripten" && sess.panic_strategy() == PanicStrategy::Unwind {
-            add("-enable-emscripten-cxx-exceptions", false);
+            add("-wasm-enable-sjlj", false);
         }
 
         // HACK(eddyb) LLVM inserts `llvm.assume` calls to preserve align attributes
diff --git a/compiler/rustc_codegen_ssa/src/back/link.rs b/compiler/rustc_codegen_ssa/src/back/link.rs
index 94acdea894b..2909401836d 100644
--- a/compiler/rustc_codegen_ssa/src/back/link.rs
+++ b/compiler/rustc_codegen_ssa/src/back/link.rs
@@ -2057,12 +2057,11 @@ fn add_order_independent_options(
     }
 
     if sess.target.os == "emscripten" {
-        cmd.arg("-s");
-        cmd.arg(if sess.panic_strategy() == PanicStrategy::Abort {
-            "DISABLE_EXCEPTION_CATCHING=1"
+        if sess.panic_strategy() == PanicStrategy::Abort {
+            cmd.arg("-sDISABLE_EXCEPTION_CATCHING=1");
         } else {
-            "DISABLE_EXCEPTION_CATCHING=0"
-        });
+            cmd.arg("-fwasm-exceptions");
+        }
     }
 
     if flavor == LinkerFlavor::PtxLinker {
```

</details>

I'm not sure what the best way is to add support for a choice between these two options.

@aheejin Is there any way to turn `-enable-emscripten-cxx-exceptions` back off by adding another argument? It would be convenient to be able to inject `-mllvm -disable-emscripten-cxx-exceptions -mllvm -wasm-enable-sjlj` and get wasm exceptions to work...
Repository: stable-diffusion-webui
Issue: [Bug]: when i start the webui.bat command or press it it just freeze's after saying torch is getting finished and then stop's right there and i can't even move my mouse indictor or any action's in my computor is it because i don't have nvidia or if that's the case how to work this without the use of Nvidia
Labels: asking-for-help-with-local-system-issues

### Is there an existing issue for this?

- [X] I have searched the existing issues and checked the recent builds/commits

### What happened?

i completed and finished every part of the installation untill this very one at the last .

### Steps to reproduce the problem

i don't know i think it's my computer's is lack of "Nvidia issue"

### What should have happened?

i finished every installation bit's untill this very last one .

### Commit where the problem happens

at very the final stage it happens

### What Python version are you running on ?

Python 3.10.x

### What platforms do you use to access the UI ?

Windows

### What device are you running WebUI on?

CPU

### What browsers do you use to access the UI ?

_No response_

### Command Line Arguments

```Shell
no .
```


### List of extensions

no .

### Console logs

```Shell
right now i can not give you the console log's because when it happen's it instantley crashe's my pc and if i even don't i could usee my obs for this but if i have the time or luck to copy the log and post it down here i think would  .
```


### Additional information

"when starting Webui.bat after completeting all the steps"
Repository: flutter
Issue: (Willing to PR) "RSS" memory becomes >1GB while other parts are small - is there any utilities to debug this?
Labels: framework,d: devtools,perf: memory,has reproducible steps,P2,found in release: 3.10,found in release: 3.11,team-framework,triaged-framework

When scrolling a ListView in my app, I see memory going up to 1.3GB. Flutter already has good doc about memory view and profiling in https://docs.flutter.dev/tools/devtools/memory. However, it only talks about how to deal with Dart memory leaks etc, and does not talk about when RSS is huge while Dart memory is small.

I am happy to make PRs (for Flutter tools, Dart tools, or just add docs, etc) if there is a way to examine the RSS memory problem!

![image](https://github.com/flutter/flutter/assets/5236035/52896224-ba80-4420-b631-0201cfaaac30)

As can be seen, the "Profile Memory" and "Diff snapshots" does not help:

![image](https://github.com/flutter/flutter/assets/5236035/f502f219-fecb-4842-9ad6-b3348009b189)
![image](https://github.com/flutter/flutter/assets/5236035/3eccfb28-1427-4ddb-b585-ae0a41eaa3a3)

I have also googled, e.g. "flutter rss high memory". What I found does not seem to be very related, e.g. https://github.com/flutter/flutter/issues/90547.

UPDATE:

1. The bug (of my app) reproduces on Android (profile mode), while not reproducing on iOS (profile mode) - it always uses 200-300MB memory without such monotonic increasing. Therefore, I suspect it can be a bug of Flutter framework, and is happy to make a PR for that bug as well.
2. Android studio says it is "Graphics" memory. I am happy to enhance Flutter tooling to further examine this.

![image](https://github.com/flutter/flutter/assets/5236035/9839afe9-e0ac-4267-94dc-e1e733a2ba96)

UPDATE:

Possibly related (though this issue is more general than that): https://github.com/flutter/flutter/issues/128105

UPDATE:

I suspect my scenario is because of #128105 (will update later after fixing my app). If so, I guess it is helpful to update the Flutter documentation, explaining possible scenarios of "high RSS memory". Surely, it is still helpful if the "high RSS" can be directly debugged using Flutter tools - e.g. debugging it is as simple as debugging normal Dart memory leaks in DevTools.
Repository: pytorch
Issue: `torch.poisson(torch.tensor([torch.inf))` returns 0
Labels: module: distributions,module: error checking,triaged,module: edge cases

### 🐛 Describe the bug

For `torch.poisson`,  `torch.inf` results `0`

```python
torch.poisson(torch.tensor([torch.inf]))
```
Output:
```
tensor([0.])
```
And interestingly
```python
torch.poisson(torch.tensor([torch.inf - 1]))
```
Output:
```
tensor([9.2234e+18])
```
While for `torch.binomial`
```python
torch.binomial(torch.tensor([torch.inf]), torch.tensor([0.5]))
```
Output:
```
tensor([nan])
```
Seems that torch would like to return `nan` for `inf` ? But `binomial` is some what inconsistent with `poisson`, and I believe for `inf` lambda or rate, `0` is not a good return value, since it's valid but nearly impossible for *large* rate.
I don't know it's a bug or work as intended, so I tag bug for now.

### Versions

PyTorch version: 2.0.1
Is debug build: False
CUDA used to build PyTorch: None
ROCM used to build PyTorch: N/A

OS: macOS 13.2 (arm64)
GCC version: Could not collect
Clang version: 12.0.1
CMake version: version 3.24.1
Libc version: N/A

Python version: 3.9.12 (main, Jun  1 2022, 06:34:44)  [Clang 12.0.0 ] (64-bit runtime)
Python platform: macOS-13.2-arm64-arm-64bit
Is CUDA available: False
CUDA runtime version: No CUDA
CUDA_MODULE_LOADING set to: N/A
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
Is XNNPACK available: True

CPU:
Apple M1 Pro

cc @fritzo @neerajprad @alicanb @nikitaved @malfet
Repository: tensorflow
Issue: Check fail can be triggered in `tf.raw_ops.GatherV2` under jit compile mode.
Labels: stat:awaiting tensorflower,type:bug,comp:ops,TF 2.13

<details><summary>Click to expand!</summary> 
 
 ### Issue Type

Bug

### Have you reproduced the bug with TF nightly?

Yes

### Source

source

### Tensorflow Version

2.14.0

### Custom Code

Yes

### OS Platform and Distribution

Ubuntu 20.04

### Mobile device

Ubuntu 20.04

### Python version

3.8.10

### Bazel version

_No response_

### GCC/Compiler version

_No response_

### CUDA/cuDNN version

_No response_

### GPU model and memory

_No response_

### Current Behaviour?

Check fail can be triggered in `tf.raw_ops.GatherV2` under jit compile mode. While in normal mode, it won't be triggered but through an `InvalidArgumentError`.

### Standalone code to reproduce the issue

```shell
import os 
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2'
import tensorflow as tf
import numpy as np

params=tf.random.uniform([4], dtype=tf.dtypes.float32, maxval=100000000)
indices=tf.random.uniform([4, 0], dtype=tf.dtypes.int32, minval=-10000, maxval=60000)
axis=tf.random.uniform([], dtype=tf.dtypes.int64, minval=-100000000, maxval=1000000000)
batch_dims=11282

@tf.function(jit_compile=True)
def fuzz_jit():
    y = tf.raw_ops.GatherV2(params=params, indices=indices, axis=axis, batch_dims=batch_dims)
    return y

def fuzz_normal():
    y = tf.raw_ops.GatherV2(params=params, indices=indices, axis=axis, batch_dims=batch_dims)
    return y

y1 = fuzz_jit()  # trigger the check fail under jit compile mode.
print('[+] JIT ok')
y2 = fuzz_normal()  # if you run y2 first, it will through error rather than check fail.
print('[+] Normal ok')
```


### Relevant log output

```shell
% python test.py
2023-06-02 11:10:06.042625: F tensorflow/core/framework/shape_inference.cc:705] Check failed: rank >= 0 (0 vs. -11280)rank must not be negative
zsh: abort (core dumped)  python test.py
```
</details>