sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: godot
Issue: Separate thread for saving png's with while loop has abnormal behaviour
Labels: bug,topic:core

### Godot version

3.4

### System information

Kubuntu 21.04

### Issue description

I tried to create a threaded version of [Calinou's video rendering demo](https://github.com/Calinou/godot-video-rendering-demo) and I offloaded all of the image saving logic to a separate thread. Although with that I realized that using while loops had weird results with `Engine.get_frames_drawn()` and the entire image saving process.

### Steps to reproduce

Create a new `Thread` and in it's function create a while loop with `print(Engine.get_frames_drawn())`, You will immediately see weird skippy behavior compared to doing the same thing in '_process`.

Now add 
```godot
  var image := get_viewport().get_texture().get_data()
  image.generate_mipmaps()
  image.resize(
    get_viewport().size.x,
    get_viewport().size.y,
    Image.INTERPOLATE_TRILINEAR
  )

  # The viewport must be flipped to match the rendered window
  image.flip_y()
  #
  var error := image.save_png("~/render/" + str(Engine.get_frames_drawn()) + ".png")
```
to the same `Thread`, if you go and look in the render folder (you'll need to change it from "~" if you're on windows), out of the hundreds of frames drawn, about 4/5 images (in my case) are actually saved.

### Minimal reproduction project

[godot-video-rendering-demo-master.zip](https://github.com/godotengine/godot/files/7492569/godot-video-rendering-demo-master.zip)

You will need to change the render path if you're on windows, sorry.
Repository: neovim
Issue: on_lines callback called on deletion of empty buffer after nvim_buf_set_lines(0, 0, -1, true, { '' }) 
Labels: bug

### Neovim version (nvim -v)

0.6.0 commit b74916cfd

### Vim (not Nvim) behaves the same?

N/A

### Operating system/version

Fedora 34

### Terminal name/version

kitty

### $TERM environment variable

xterm-kitty

### Installation

source build

### How to reproduce the issue

```lua
local edit_buf = vim.api.nvim_create_buf(true, true)

vim.api.nvim_set_current_buf(edit_buf)

vim.api.nvim_buf_set_lines(edit_buf, 0, -1, true, { '' })

local prev_lines = vim.api.nvim_buf_get_lines(edit_buf, 0, -1, true)
local curr_lines = prev_lines

local callback = function(buf)
  curr_lines = vim.api.nvim_buf_get_lines(buf, 0, -1, true)
  print('on_lines callback occured')
  print(vim.inspect(prev_lines))
  print(vim.inspect(curr_lines))
  prev_lines=curr_lines
end

vim.api.nvim_buf_attach(edit_buf, false, { on_bytes = callback })
vim.api.nvim_feedkeys('ggdd', 'n', false)
```
prints "on_lines callback occured"


```lua
local edit_buf = vim.api.nvim_create_buf(true, true)

vim.api.nvim_set_current_buf(edit_buf)

--vim.api.nvim_buf_set_lines(edit_buf, 0, -1, true, { '' })

local prev_lines = vim.api.nvim_buf_get_lines(edit_buf, 0, -1, true)
local curr_lines = prev_lines

local callback = function(buf)
  curr_lines = vim.api.nvim_buf_get_lines(buf, 0, -1, true)
  print('on_lines callback occured')
  print(vim.inspect(prev_lines))
  print(vim.inspect(curr_lines))
  prev_lines=curr_lines
end

vim.api.nvim_buf_attach(edit_buf, false, { on_bytes = callback })
vim.api.nvim_feedkeys('ggdd', 'n', false)
```
Does not print on_lines callback occured. The former seems more correct to me, as this should be a no-op.

### Expected behavior

on_lines callback should not be called on deletion of an empty buffer.

### Actual behavior

on_lines callback is called on deletion of an empty buffer.

This impacts the new incremental sync implementation I'm working on [here](https://github.com/mjlbach/neovim/blob/b2c398025edaeadc971506fc36a4558f78b27c73/runtime/lua/vim/lsp/sync.lua#L177-L179)
Repository: next.js
Issue: Asset Import: 404 when url includes space
Labels: Image (next/image)

### What version of Next.js are you using?

12.0.3-canary.10

### What version of Node.js are you using?

14.18.1

### What browser are you using?

Chrome

### What operating system are you using?

Linux

### How are you deploying your application?

next start

### Describe the Bug

When importing a url using the new asset import and the url includes a space (real space and encoded as `%20`), the returned URL object cannot be used to load the asset.

The imported images:
![image](https://user-images.githubusercontent.com/1972314/140656657-9aa0e522-2a99-4a36-a6e0-015fcddf1e5b.png)

The returned URL objects:
```
/_next/static/media/test.5da736b2.jpg  (works)
/_next/static/media/test%20copy.5da736b2.jpg (does not work)
/_next/static/media/test%20copy.5da736b2.jpg (does not work)
```

So the bug must be in the server.

### Expected Behavior

`/_next/static/media/test%20copy.5da736b2.jpg` does not return a 404.

### To Reproduce

```tsx
const medias = [
  new URL("https://kv.skirsten.dev/test.jpg", import.meta.url), // works
  new URL("https://kv.skirsten.dev/test copy.jpg", import.meta.url), // does not work
  new URL("https://kv.skirsten.dev/test%20copy.jpg", import.meta.url), // does not work
];

const Home: NextPage = () => {
  return (
    <main>
      {medias.map((media, i) => (
        <article key={i}>
          <img src={media.pathname} width="200px" />
        </article>
      ))}
    </main>
  );
};
```
Repository: flutter
Issue: [Proposal] Add Inactive Track & Inactive Thumb color in Switch Theme
Labels: c: new feature,framework,f: material design,c: proposal,team-design,triaged-design

The switch in normal can have two states on and off . Right not the switch theme contains only one state color change.

Please add Inactive track and Thumb color in switch theme data.
Repository: react
Issue: Bug: Parent <details> onToggle handler called when child <details> onToggle handler is triggered
Labels: Type: Bug,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. Declare a `<details>` element nested inside another `<details>` element.
2. Add a handler for the `onToggle` event for each `<details>` element.
3. Toggle the nested `<details>` element.
4. Observe that its handler and its parent's handler are both called.

<!--
  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://codepen.io/jordanbtucker/pen/oNedvvE?editors=0010

<!--
  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
The `onToggle` event for child `<details>` elements triggers handlers for parent `<details>` elements. This behavior does not occur in normal DOM environments.

## The expected behavior
The `onToggle` event should only trigger its own handler.
Repository: deno
Issue: Make MagicBuffer and ZeroCopyBuf work with SharedArrayBuffers
Labels: feat,ext/web

denoland/deno#11040 is currently in the process of implementing the ability to share `SharedArrayBuffer`s across workers, and code implemented in JS and WASM will be able to immediately benefit from it. However, as per https://github.com/denoland/deno/pull/11040#issuecomment-865119521, many of the ops that use `MagicBuffer` are written assuming that the buffer can only be modified from the current thread/worker, and need to be reviewed and fixed before those APIs can be used with shared memory. Even worse, as per denoland/rusty_v8#711 it seems that the Rust binding for `BackingStore` is unsound when the backing store is shared, so `ZeroCopyBuf` would be unsound too.

Therefore, it seems like we should disable the deserialization of shared typed arrays into `MagicBuffer`s for the time being, and at some later point we can figure how to rewrite `MagicBuffer` and `ZeroCopyBuf` using the new `BackingStore` API.
Repository: pytorch
Issue: Distributed.TCPStore
Labels: oncall: distributed

I am trying to communicate some information between processes in different machines. I use the following code to set up a TCP store and then pass messages. However it hangs at random times. Can sb explain me how to resolve it?

    
    if rank == 0:
        store = dist.TCPStore(os.getenv('MASTER_ADDR'), int(os.getenv('MASTER_PORT')) + 1, -1, True,
                              datetime.timedelta(seconds=1))
    else:
        store = dist.TCPStore(os.getenv('MASTER_ADDR'), int(os.getenv('MASTER_PORT')) + 1, -1, False)
    store.set_timeout(0.1)
    
Then later in each process I do 
```
    store.set(f'dummy_key{rank}', current_weights)
    get_key = f'dummy_key{np.random.randint(0, __MAX_RANK__, 1)[0]}'
    other_net_g, other_id, other_iter = pickle.loads(store.get(get_key)
```
    


cc @pietern @mrshenli @pritamdamania87 @zhaojuanmao @satgera @rohan-varma @gqchen @aazzolini @osalpekar @jiayisuse @SciPioneer @H-Huang
Repository: TypeScript
Issue: Optional parameter makes the compiler resolve types prematurely for declaration
Labels: Bug

# Bug Report

### 🔎 Search Terms
optional parameter, resolution of types, declaration, optimization

### 🕗 Version & Regression Information
v4.4.4

### ⏯ Playground Link

[Playground for `test1.ts`](https://www.typescriptlang.org/play?ts=4.4.4#code/KYDwDg9gTgLgBASwHY2FAZgQwMbDgFQE8xgBnOAbwF8AoOOGmYvAaWELgF4H6iTzQqJABNyFOAGt2ALjgBXJBKQQA7kgDaAXTi169APwFmpdQCIphU5rp7ZCpao3WaoSLDjYISUvGwAbYEwoLjgACgtZdQA6GLZCTQBKLgA+SiogA) [Playground for `test2.ts`](https://www.typescriptlang.org/play?ts=4.4.4#code/KYDwDg9gTgLgBASwHY2FAZgQwMbDgFQE8xgBnOAbwF8AoOOGmYvAaWELgF4H6iTzQqJABNyFOAGt2ALjgBXJBKQQA7kgDaAXTi169APwFmpdQCIphU5rp7ZCpao3WaoSLDjYISUvGwAbYEwoLjgACgt9WXUAOli2Qk0ASi4APkoqIA)

### 💻 Code

```ts
// @file test1.ts
export interface Types {}
  
type Key = 
  Types extends { key: unknown[] }
    ? Types["key"]
    : unknown[]

export const clear = (key: [...Key]) => {}
```

```ts
// @file test2.ts
export interface Types {}
  
type Key = 
  Types extends { key: unknown[] }
    ? Types["key"]
    : unknown[]

export const clear = (key?: [...Key]) => {} // change here, key is optional
```

### 🙁 Actual behavior

```ts
// @file test1.d.ts
export interface Types {
}
declare type Key = Types extends {
    key: unknown[];
} ? Types["key"] : unknown[];
export declare const clear: (key: [...Key]) => void;
export {};
``` 

```ts
// @file test2.d.ts
export interface Types {
}
export declare const clear: (key?: unknown[] | undefined) => void;
```

Compiler prematurely resolves `Key` to `unknown[]` in test2

### 🙂 Expected behavior

Compiler should emit declaration of test2 same as test1 (except the "?" part of course), it should not prematurely resolve `Key` to `unknown[]` because one could add a `key` property to `Types` via module augmentation which makes the `Key` type no longer `unknown[]`
Repository: godot
Issue: Internal Script Error! - opcode #24 (report please).
Labels: bug,topic:gdscript,confirmed,crash

### Godot version

v3.3.4.stable.official

### System information

Windows 10, GLES3, Intel HD Graphics 2500

### Issue description


Godot rarely prints the error: "Internal Script Error! - opcode #24 (report please)." and crashes the game, when you create a timer using yield(get_tree()) in a function and then recalling the function inside itself.

I call the function inside itself to make an infinity loop. Now I know that it crashes, so I replace it with a while(true) loop.
I couldn't find the same error at GitHub so I'm reporting it.


### Steps to reproduce

This is my function, it seems to crash, I hope it isn't only in my project, but looks like yield(get_tree().create_timer(1), "timeout") has been causing similar errors. #42379 or #45224

```gdscript
func Idling():
	var cooldown= 13
	cooldown+= rand_range(-2, 6)
	yield(get_tree().create_timer(cooldown), "timeout")
	yield($Sprite, "animation_finished")
	$Sprite.animation = "Idling" 
	Idling()
```
I replaced the function with a while loop and nothing seems to append since.

```gdscript
func Idling():
	while(true):
		var cooldown = 13
		cooldown += rand_range(-2, 6)
		yield(get_tree().create_timer(cooldown), "timeout")
		yield($Sprite, "animation_finished")
		$Sprite.animation = "Idling" 
```

"HOW TO:"
Create a script with this code inside:
"it crashes my game without the message, but It should work"

```gdscript
func _ready():
        Function()

func Function():
	yield(get_tree().create_timer(5), "timeout")
        Fuction()
```





### Minimal reproduction project

_No response_
Repository: godot
Issue: if add a small Area2D in a big Area2D by code  ,the big Area2D can't detect the small Area2D in 3.4
Labels: bug,topic:physics,topic:2d

### Godot version

3.4.stable

### System information

win7, gles2

### Issue description

if add a small Area2D in a big Area2D **by code** ,the big Area2D can't detect the small Area2D

### Steps to reproduce

There are three situations：
1.Already has a node tree:
```
-Node2D:
-- BigArea
-- SmallArea
```
BigArea can detect SmallArea.

2.add a SmallArea by code,like :
```
var small_area = SmallArea.instance()
add_child(small_area)
small_area.position = big_area.position
```
BigArea can't detect SmallArea.

3.if the SamllArea is moving,it can work,it like:
```
small_area.position = Vector2.ZERO
func _process(delta: float) -> void:
	small_area.position += $BigArea2D.position /100.0
```


See the following project for details.

### Minimal reproduction project


[AreaBug.zip](https://github.com/godotengine/godot/files/7493972/AreaBug.zip)
Repository: pytorch
Issue: Feature Request: Support prelu_cuda for BFloat16
Labels: module: bootcamp,module: nn,module: cuda,triaged,enhancement,module: bfloat16

## 🚀 Feature
<!-- A clear and concise description of the feature proposal -->

## Motivation

If you invoke `torch.nn.functional.prelu()` on `BFloat16` in version 1.10 you will get the following error:

`"prelu_cuda" not implemented for 'BFloat16'`.

Please add CUDA support for `torch.nn.functional.prelu()` on `BFloat16`.

cc @albanD @mruberry @jbschlosser @walterddr @ngimel
Repository: react
Issue: How to resuse same component without remounting it and access anywhere in dom tree?
Labels: Type: Discussion,React 18

i am creating a streaming app in react js my use case is this there is a camera component which is defined on the top level in App.js i want that component to be rendered at top level as well as inside any child component everywhere in dom which same component instance and state so that camera should not be remount and mount again in child component 

i have tried some solutions like react portals and react dom(deprecated can't use anymore)

but none of them work accoridngly

the camera component needs to mounted only one time in the APP.js so it wont rerender if i use in anywhere inside other component
Repository: vscode
Issue: [json] Explorer Outline view shows wrong int values when viewing JSON document
Labels: bug,json


Issue Type: <b>Bug</b>

1. Open a JSON file (observed issue with the JSON output retrieved from Twitter's API)
2. In Explorer, expand the outline for the file
3. Observe that not all values shown actually match those in the file (specifically, 'id' and 'id_str' in the file are identical for each item in statuses, but Outline shows them as two different values on almost all with 'id' not being accurate)

VS Code version: Code 1.61.2 (6cba118ac49a1b88332f312a8f67186f7f3c1643, 2021-10-19T14:57:20.575Z)
OS version: Windows_NT x64 10.0.19043
Restricted Mode: Yes

<details>
<summary>System Info</summary>

|Item|Value|
|---|---|
|CPUs|Intel(R) Core(TM) i5-4670 CPU @ 3.40GHz (4 x 3392)|
|GPU Status|2d_canvas: enabled<br>gpu_compositing: enabled<br>multiple_raster_threads: enabled_on<br>oop_rasterization: enabled<br>opengl: enabled_on<br>rasterization: enabled<br>skia_renderer: enabled_on<br>video_decode: enabled<br>vulkan: disabled_off<br>webgl: enabled<br>webgl2: enabled|
|Load (avg)|undefined|
|Memory (System)|15.91GB (9.69GB free)|
|Process Argv|--crash-reporter-id a8b09d6d-25a7-465e-9bcf-4dcca82a0ffc|
|Screen Reader|no|
|VM|0%|
</details><details><summary>Extensions (4)</summary>

Extension|Author (truncated)|Version
---|---|---
gitlens|eam|11.6.1
vscode-pull-request-github|Git|0.32.0
jupyter|ms-|2021.9.1101343141
jupyter-keymap|ms-|1.0.0


</details><details>
<summary>A/B Experiments</summary>

```
vsliv368:30146709
vsreu685:30147344
python383:30185418
vspor879:30202332
vspor708:30202333
vspor363:30204092
pythontb:30283811
pythonptprofiler:30281270
vsdfh931cf:30280410
vshan820:30294714
vstes263:30335439
vscoreces:30384385
pythondataviewer:30285071
vscod805cf:30301675
pythonvspyt200:30340761
binariesv615:30325510
vsccppwt:30382697
bridge0708:30335490
pygetstartedt3:30385195
dockerwalkthru:30377721
bridge0723:30353136
pythonrunftest32:30373476
pythonf5test824:30373475
javagetstartedt:30391933
pythonvspyt187:30373474
vsqsis300:30386381
vsaa593cf:30376535
vssld246:30386377

```

</details>

<!-- generated by issue reporter -->
Repository: vscode
Issue: Feature request: Option to colorize only active bracket pairs
Labels: help wanted,feature-request,bracket-pair-colorization

<!-- ⚠️⚠️ Do Not Delete This! feature_request_template ⚠️⚠️ -->
<!-- Please read our Rules of Conduct: https://opensource.microsoft.com/codeofconduct/ -->
<!-- Please search existing issues to avoid creating duplicates. -->

<!-- Describe the feature you'd like. -->
Maybe this isn't typical use, but for a long time I've been using the bracket pair colorizer extension to color the brackets and show guides only for the current scope, and always in the same color. It looks like this:
![image](https://user-images.githubusercontent.com/4338251/140689928-8a008848-e581-4f57-bf3f-d70a46bf313b.png)
![image](https://user-images.githubusercontent.com/4338251/140689249-43761504-174d-4a14-ad2a-a8de41d9e864.png)

Now that VS Code has been implementing this functionality directly, I can get halfway there by setting `editor.guides.bracketPairs` and `editor.guides.bracketPairsHorizontal` to `"active"`, and using a single color for `editorBracketPairGuide.activeBackground{1-6}`:
![image](https://user-images.githubusercontent.com/4338251/140690699-ff3fb381-7f59-4306-a316-e98809783268.png)

However I can't find a way to color the brackets themselves without turning on bracket pair colorization for *all* brackets. If there was an `"active"` setting for bracket pair colorization like there is for the guides, I would be able to achieve what I want. 

Alternatively, a color override akin to `editorBracketMatch.background` and `editorBracketMatch.border` for the text color could be added (#85775). However the mechanism that these settings represent seems to operate a little differently, because unlike the guides it considers "inline" brackets, and is affected by the `editor.matchBrackets` setting - it's kind of tangential to the other stuff currently (and I think I like it better that way).
Repository: pytorch
Issue: torch.jit.export does not working
Labels: oncall: jit

## 🐛 Bug

I'm going to port a Pytroch model to Android，but Android can not read method in model.ptl。My torch version is 1.10.0+cpu.

## To Reproduce

Steps to reproduce the behavior:

1. This is my main
 ```
if __name__ == '__main__':
    print(torch. __version__)
    model = SuperPointNet()
    model.load_state_dict(torch.load("./superpoint_v1.pth"))
    model.eval()
    traced_script_module = torch.jit.script(model)
    traced_script_module_optimized = optimize_for_mobile(traced_script_module)
    print(traced_script_module_optimized.code)
```
1.my net
```
class SuperPointNet(torch.nn.Module):
   def __init__(self):
      print()
   def forward(self, x):
      print()

   @torch.jit.export
   def other(self):
      print()
```
1. and I would not read other() in my Android. @torch.jit.export says is inconsistent with the documentation
Repository: storybook
Issue: Is there any addon to copy the template of a component 
Labels: feature request,needs triage

**Is your feature request related to a problem? Please describe**
I'm looking for an addon that allows you to directly copy the html template of a component that you can view in the storybook.

**Describe the solution you'd like**
I would like to be able to view the html code in a tab of a component.
Repository: neovim
Issue: Add ability to set window-local mappings
Labels: enhancement,core,mappings

### Feature already in Vim?

Not that I know of

### Feature description

# Motivation
With the advent of floating windows I found myself yearning for the ability to set window-local mappings.
I am aware of buffer-local mappings, i.e `nnoremap <buffer> q :q<CR>` but window-local mappings would provide an extra layer of control.
If I happen to open a floating window that has the same buffer as another already existing non-floating window, I am currently not able to set different mappings for each of the windows, and while there are workarounds, this feature would make it more straightforward.

# Desired feature:
`:nnoremap <window> q :q<CR>`

## Behaviour
Setting a window-local mapping would behave exactly like `<buffer>` but window-bound instead of buffer-bound.
I imagine the precedence being `buffer > window > global`.

## Use-case
https://github.com/rmagatti/goto-preview/issues/7
In this use-case one wants to map `q` for closing preview (floating) window instead of triggering a macro recording through a provided hook function for when a preview window is opened, but if that floating window ends up having the same buffer as the main window, the mapping is also applied there.

### Showcase
#### Current behaviour

```lua
require('goto-preview').setup {
  post_open_hook = function()
    vim.cmd[[nnoremap <buffer> q :q<CR>]]
  end
}
```
![2021-11-08 01 58 41](https://user-images.githubusercontent.com/2881382/140713097-c569d66b-340b-4b53-8b46-e4f165cc9b32.gif)

#### Desired behaviour (simulated by previewing a separate buffer)

```lua
require('goto-preview').setup {
  post_open_hook = function()
    vim.cmd[[nnoremap <window> q :q<CR>]]
  end
}
```
![2021-11-08 02 03 27](https://user-images.githubusercontent.com/2881382/140713700-57d9ce68-ed6d-4a37-a6b8-3bbf9cf15fe2.gif)
Repository: rustdesk
Issue: Remote Printer?
Labels: good first issue

Is there a way we could remote print a file to our local printer?
Repository: pytorch
Issue: the abnormal display of bottleneck of resnet in tensorboard
Labels: triaged,module: tensorboard

on the basis of resnet in torchvision.models.resnet, I use tensorboard to visualize the network.
for resnet50, it is [3, 4, 6, 3], for each block after the first block, it looks abnormal, as the image shows
![1](https://user-images.githubusercontent.com/51914854/140724298-7ad2679e-2e53-4cac-8689-f18f7ee6a29c.png)
![2](https://user-images.githubusercontent.com/51914854/140724308-80d4c48d-838a-4838-9611-dd5cc31577ef.png)

it seems that the output of the first block is input to each layer of the second block