sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: godot
Issue: Moving KinematicBody2D One Way Collision Inaccuracy
Labels: bug,topic:physics,topic:2d

### Godot version

3.4.stable

### System information

Mac OSX

### Issue description

I'm working on an infinite runner with moving platforms.

The platforms are KinematicBody2Ds, with a CollisionShape2D with a Rectangle resource. Their collision is set to one way with a margin of 5 pixels. I have `sync_to_physics` enabled (but this issue persists when this is disabled). I use the `position` property to move these KinematicBody2Ds from right to left.

When the platforms leave the screen, I free them using `queue_free`. I create these platforms dynamically every 0.3 - 2 seconds.

**Edit:** I've attempted to find a workaround by pooling them (I don't know why I thought this would make a difference) but the issue persists.

**Edit 2:** I thought maybe using `move_and_collide` instead of changing the position would work (also made sure to turn of `sync_to_physics`) the behavior is not what I wanted but I wanted to test it out. With this "workaround", now the player almost certainly lands on all platforms, the collision is still completely messed up in other areas. As in, I still hand on invisible platforms for like a split second, and falling off certain platforms doesn't seem to work. This is on top of using the pool solution (no nodes are leaving the tree, the only thing that happens is their position is reset off screen).

**Edit 3:** The `move_and_slide` by default moves the player on top of the platforms is on. To negate this, I lock the player to the X axis by setting its position there every frame. Maybe this is causing the issue? If I'm working on a platformer and I don't want my player to stick to the moving ground, how do I stop it? 

When starting the game, the collision works very well. My character is able to jump on the platforms just fine. However, after maybe 15-30 seconds, I start falling through platforms that I've obviously landed on. Sometimes, my character seems to fall on an invisible floating platform. Sometimes my character doesn't fall off a platform for about a half-second even though they're clearly not on it anymore.

After another 15-30 seconds, the collision accuracy seems to be fine again. However... After another 15-30 seconds, the issue resumes again.

### Steps to reproduce

1. Start the `game.tscn` scene
2. Play the game for 15-30 seconds

Expected: Player lands on platforms
Actual: Player falls through the platforms sometimes

### Minimal reproduction project

I am not exactly sure how to make a minimal reproduction project for this, so I'll just put up the game.

It's in its very, very early stages, so it's extremely simple anyways.

`platform_mover.gd` adds nodes to each platform to move them
`platform.gd` are the platfrom nodes, and it creates its collision shape dynamically when added to the scene tree.
`level_generator.gd` spawns the platforms

The rest I think is irrelevant, mostly helper methods and player code.

[Here's the .zip for the godot project.](https://drive.google.com/file/d/1_wdpKzf0Wk59GNDKlBNwfkFfsA8y20FN/view?usp=sharing)
Repository: flutter
Issue: [Linux] Texture free out buffer release callback 
Labels: engine,platform-linux,a: desktop,P2,team-linux,triaged-linux

我在windows上可以使用 FlutterDesktopPixelBuffer  release_callback 来释放我的上一帧buffer。
但是在linux上好像并没有相关的方法。

_translated using Google Translate_ 

I can use FlutterDesktopPixelBuffer release_callback on windows to release my last frame buffer.
But there doesn't seem to be a related method on linux.
Repository: rust
Issue: `Allocator::grow` does not verify all safety conditions of `GlobalAlloc::realloc`
Labels: A-allocators,T-libs-api,C-bug

`Allocator::grow` does not verify that the new allocation size, when rounded up to a multiple of `align`, does not overflow `isize::MAX`. This can cause it to call `realloc` with invalid arguments:

```rust
#![deny(unsafe_op_in_unsafe_fn, clippy::missing_safety_doc, clippy::undocumented_unsafe_blocks)]
#![feature(allocator_api)]

use std::alloc::{Allocator, Global, GlobalAlloc, Layout, System};

struct MyGlobalAlloc;

unsafe impl GlobalAlloc for MyGlobalAlloc {
    unsafe fn alloc(&self, layout: Layout) -> *mut u8 {
        // SAFETY: The safety requirements for `alloc` match the safety docs for `System.alloc`.
        unsafe { System.alloc(layout) }
    }

    unsafe fn dealloc(&self, ptr: *mut u8, layout: Layout) {
        // SAFETY: The safety requirements for `dealloc` match the safety docs for `System.dealloc`.
        unsafe {
            System.dealloc(ptr, layout);
        }
    }

    unsafe fn realloc(&self, ptr: *mut u8, layout: Layout, new_size: usize) -> *mut u8 {
        let new_layout = Layout::from_size_align(new_size, layout.align()).unwrap();
        // Uh oh! The safety guarantees for `realloc` have been violated!
        assert!(new_layout.pad_to_align().size() <= isize::MAX as usize);

        // SAFETY: The safety requirements for `realloc` match the safety docs for `System.realloc`.
        unsafe { System.realloc(ptr, layout, new_size) }
    }
}

#[global_allocator]
static GLOBAL: MyGlobalAlloc = MyGlobalAlloc;

fn main() {
    let initial_layout = Layout::from_size_align(2, 2).unwrap();
    let final_layout = Layout::from_size_align(isize::MAX as usize, 2).unwrap();
    let ptr = Global.allocate(initial_layout).unwrap();

    // SAFETY:
    // - `ptr` is allocated from `Global` with layout `initial_layout`.
    // - `final_layout.size()` is `isize::MAX` which is greater than `initial_layout.size()`, which
    //   is 2.
    let ptr = unsafe { Global.grow(ptr.cast(), initial_layout, final_layout).unwrap() };
    // SAFETY: `ptr` is allocated from `Global` with `final_layout`.
    unsafe {
        Global.deallocate(ptr.cast(), final_layout);
    }
}
```

This sample panics at the assertion in `<MyGlobalAlloc as GlobalAlloc>::realloc`. It's not clear whether:

- The safety requirements of `Allocator::grow` need to include the missing clause from `realloc`.
- `realloc` should be relaxed to allow for allocations larger than `isize::MAX`.
- The implementation of `Allocator::grow` should check for this situation and return `AllocError`.

### Meta

`rustc --version --verbose`:
```
rustc 1.61.0-nightly (0677edc86 2022-03-31)
binary: rustc
commit-hash: 0677edc86e342f333d4828b0ee1ef395a4e70fe5
commit-date: 2022-03-31
host: x86_64-pc-windows-msvc
release: 1.61.0-nightly
LLVM version: 14.0.0
```
Repository: material-ui
Issue: [docs] FormControl's API page doesn't show `label` as required
Labels: docs,component: FormControl

The docs do not show `label` as required, the typing seems fine but there should be a required asterisk next to it on this page https://mui.com/api/form-control-label/#main-content

_Originally posted by @CWSites in https://github.com/mui/material-ui/issues/29301#issuecomment-1079403582_
Repository: three.js
Issue: Feature request: Add premultiplied alpha control in `WebGLBackground`
Labels: Enhancement

<!-- Ignoring this template may result in your feature request getting deleted -->

**Is your feature request related to a problem? Please describe.**

Currently `WebGLBackground` always uses the `premultipliedAlpha` setting of the back buffer. We'd like to enable `premultipliedAlpha` for the back buffer (because it's what the browser wants) and disable it for framebuffers (because srgb textures don't work with premultiplied alpha).

This setting renders `WebGLBackground` unusable becuase it always premultiplies the background color no matter what the current render target is.

**Describe the solution you'd like**

In `WebGLBackground.render`, check current render target. If it's null, apply the back buffer setting, otherwise apply the render target texture's setting.

**Describe alternatives you've considered**

1. Add an option to `WebGLBackground` and let user change it before rendering to a framebuffer.
2. Let user implement their own `premultipliedAlpha`-aware background.

EDIT: A reference implementation https://github.com/oppenfuture/three.js/pull/97.
Repository: ant-design
Issue: tree 组件的 titleRender 的参数能融合信息更丰富的 EventDataNode  中的数据么
Labels: Inactive

### What problem does this feature solve?

通过 EventDataNode  中的 pos 可以计算出当前渲染的结点在树中的深度，从而可以方便的实现**根据结点深度来渲染结点样式**的需求，当然EventDataNode中的其他信息也能满足很多其他的需求，如果方便实现的话希望可以改一下，否则需要自己在结点数据中维护相关信息。

### What does the proposed API look like?

titleRender?: (node: TreeDataType) => React.ReactNode;

改为：

titleRender?: (node: TreeDataType & EventDataNode) => React.ReactNode;

<!-- generated by ant-design-issue-helper. DO NOT REMOVE -->
Repository: flutter
Issue: Text height is different on HTML renderer
Labels: engine,a: typography,platform-web,e: web_html,has reproducible steps,P3,found in release: 2.10,found in release: 2.13,team-web,triaged-web

Flutter Web (canvaskit renderer) on the left, Flutter Web (html renderer) on the right.
<img width="552" alt="image" src="https://user-images.githubusercontent.com/351125/161596955-2a154578-895c-4e50-bcd0-99209140aede.png">

`height: 0` from TextStyle causes this difference. It is probably because web behaves differently than Flutter, but it still feels like a bug behaving differently. Flutter should map that value to something else.

```dart
import 'package:flutter/material.dart';

const Color darkBlue = Color.fromARGB(255, 18, 32, 47);

void main() {
  runApp(MyApp());
}

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      theme: ThemeData.dark().copyWith(
        scaffoldBackgroundColor: darkBlue,
      ),
      debugShowCheckedModeBanner: false,
      home: Scaffold(
        body: Center(
          child: MyWidget(),
        ),
      ),
    );
  }
}

class MyWidget extends StatelessWidget {
  const MyWidget({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return SizedBox(
      width: 172,
      height: 115,
      child: Text(
        'Lorem ipsum dolor sit amet, consectetur adipiscing elit.',
        style: TextStyle(
          fontSize: 18,
          height: 0,
        ),
      ),
    );
  }
}
```

```
➜ flutter doctor -v
[✓] Flutter (Channel stable, 2.10.4, on macOS 11.4 20F71 darwin-x64, locale
    en-BR)
    • Flutter version 2.10.4 at /usr/local/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision c860cba910 (11 days ago), 2022-03-25 00:23:12 -0500
    • Engine revision 57d3bac3dd
    • Dart version 2.16.2
    • DevTools version 2.9.2
```
Extension of https://github.com/flutter/flutter/issues/101303.
Repository: rust
Issue: assertion failed at compiler\rustc_middle\src\mir\mod.rs:520:13
Labels: I-ICE,T-compiler,A-MIR,C-bug,E-needs-mcve

This is on rustc 1.61.0-nightly (76d770ac2 2022-04-02). I am running out of free time so I haven't had time to reduce, but here is a branch with the last commit having the ICE: https://github.com/AaronKutch/awint/tree/ice1. When running `cargo t consts` I get some normal errors but then get:
```
thread 'rustc' panicked at 'assertion failed: `(left == right)`
  left: `4`,
 right: `1`', compiler\rustc_middle\src\mir\mod.rs:520:13
stack backtrace:
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

error: internal compiler error: unexpected panic

note: the compiler unexpectedly panicked. this is a bug.

note: we would appreciate a bug report: https://github.com/rust-lang/rust/issues/new?labels=C-bug%2C+I-ICE%2C+T-compiler&template=ice.md

note: rustc 1.61.0-nightly (76d770ac2 2022-04-02) running on x86_64-pc-windows-msvc

note: compiler flags: -C embed-bitcode=no -C debuginfo=2 -C incremental

note: some of the compiler flags provided by cargo are hidden

query stack during panic:
#0 [mir_drops_elaborated_and_const_checked] elaborating drops for `consts`
#1 [analysis] running analysis passes on this crate
end of query stack
```
Repository: flutter
Issue: [Proposal]Generate screenshot using `flutter test integration_test` command
Labels: c: new feature,tool,c: proposal,f: integration_test,P3,team-tool,triaged-tool

## Use case

Hi team, we're currently building a Flutter project, and we have integration test additional requirements as below:

1. Generating JUnit report for all integration test case
2. Generating screenshot on the last frame of each integration test case

## Proposal

For generating JUnit report, we are using [junitreport](https://pub.dev/packages/junitreport) and it works as intended using `flutter test` command.

But for generating screenshot, we can only do that using `flutter drive` command based on this [article](https://blog.codemagic.io/flutter-automated-screenshot-testing/).

So, in order to generate screenshot and to generate the JUnit report, we need to run the integration tests **twice**, using `flutter test` and `flutter drive`. But, it will surely cause flakiness because the data we provide for integration test is real data from backend.

Is there any way for us to generate the screenshot using `flutter test` only? So we only run the test once and get the JUnit report and the screenshot in one shot.

Thanks! we hope you guys consider our proposal.
Repository: flutter
Issue: Move the material and cupertino packages outside of Flutter
Labels: framework,f: material design,f: cupertino,customer: crowd,c: proposal,P3,team-design,triaged-design

## Use case

- Long update cycle
- To get the new version - you need to update the version of Flutter
- Random imports
- Components for other platforms are separate from Flutter ([fluent](https://pub.dev/packages/fluent), [macos_ui](https://pub.dev/packages/macos_ui), [yaru](https://pub.dev/packages/yaru), ...)

## Proposal

Move `material` and `cupertino` packages from Flutter

It can be done along with this issue (https://github.com/flutter/flutter/issues/91605)
Repository: flutter
Issue: Can we remove the duplicate 1 or 2 of three same apk files with different name in build dir after `flutter build apk`?
Labels: platform-android,tool,a: build,P3,team-android,triaged-android

```bash
$ flutter build apk --debug
Running "flutter pub get" in example...                            987ms
Building with sound null safety
Running Gradle task 'assembleDebug'...                             21.6s
√  Built build\app\outputs\flutter-apk\app-debug.apk.
$ find . -name "*.apk" | xargs ls -l
-rw-r--r-- 1 eggfly 197121 69170450 Apr  7 15:10 ./build/app/outputs/apk/debug/app-debug.apk
-rw-r--r-- 1 eggfly 197121 69170450 Apr  7 15:10 ./build/app/outputs/flutter-apk/app-debug.apk
-rw-r--r-- 1 eggfly 197121 69170450 Apr  7 15:10 ./build/app/outputs/flutter-apk/app.apk
```

![image](https://user-images.githubusercontent.com/922837/162141620-bdbc20bb-11d3-4177-b4db-718b54c05958.png)

As I know, the `./build/app/outputs/apk/debug/app-debug.apk` one is the Android Gradle standard apk output path.

What are they three individually used for?

Related: 
* https://github.com/flutter/flutter/issues/90580
Repository: electron
Issue: [Feature Request]: File.path equivalent for the File System Access API
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

In an Electron environment, the `File` interface is extended with a `path` attribute containing the real filesystem path.

At the moment, there is no equivalent for file or directory handles returned by the File System Access API.
Furthermore, a `File` returned by [FileSystemFileHandle.getFile](https://developer.mozilla.org/en-US/docs/Web/API/FileSystemFileHandle/getFile) has an empty `path`.

### Proposed Solution

- Add a `path` attribute to the `FileSystemHandle` interface containing the real filesystem path
- Ensure the `path` attribute is populated on the `File` returned by [FileSystemFileHandle.getFile](https://developer.mozilla.org/en-US/docs/Web/API/FileSystemFileHandle/getFile)

### Alternatives Considered

Using the node `fs` module in an Electron environment is a completely viable approach.
The downside is increased complexity for applications that share code between web and electron.

### Additional Information

See:
- https://github.com/electron/electron/blob/v1.2.8/docs/api/file-object.md
- https://developer.mozilla.org/en-US/docs/Web/API/FileSystemFileHandle
- https://developer.mozilla.org/en-US/docs/Web/API/FileSystemDirectoryHandle
- https://github.com/electron/electron/issues/28422#issuecomment-962484932
Repository: PowerToys
Issue: Hotkey for filters/view settings in Windows Explorer (WIN10)
Labels: Idea-Enhancement,Product-File Explorer

### Description of the new feature / enhancement

Hi,

Is there any way to have a shortcut for view settings or filters in Explorer? Like "WIN+ALT+SHIFT+F".

### Scenario when this would be used?

When jumping though our server it's often a mess of different file types and it would be great to be able to quickly filter by a specific filetype. As this happens with every project map we have it would be great to just have a button or a key shortcut/hotkey to enable that filter.
E.g.
I open a map with JPG, DWG, BAK, PDF, XYZ... but I'm usually interested in the DWG-files, need to filter them and show them in the detail view. As this can happen so many times during the day and the explorer is switching views constantly it would be great to have a hotkey. 

I hope this scenario is not too specific and maybe there is already such a function 😄 
Thanks in advance.

### Supporting information

_No response_
Repository: excalidraw
Issue: Typescript type files are missing from NPM package.
Labels: bug,package:excalidraw

It seems like there are some `.d.ts` files in your repo (e.g. `global.d.ts`) that aren't installed by `npm install @excalidraw/excalidraw`. They contain types that are referenced by the code (e.g. `MarkOptional`) so as soon as you `import Excalidraw from "@excalidraw/excalidraw"` you get `tsc` errors like this:

```
node_modules/@excalidraw/excalidraw/types/actions/types.d.ts:8:16 - error TS2304: Cannot find name 'MarkOptional'.

8     appState?: MarkOptional<AppState, "offsetTop" | "offsetLeft" | "width" | "height"> | null;
                 ~~~~~~~~~~~~
```

I'm kind of surprised about this because it means you can't use Excalidraw in a Typescript project, and surely loads of people are doing that?
Repository: vscode
Issue: Mouse flicking back and forth causing vscode to hang
Labels: bug,help wanted,freeze-slow-crash-leak,linux

<!-- ⚠️⚠️ Do Not Delete This! bug_report_template ⚠️⚠️ -->
<!-- Please read our Rules of Conduct: https://opensource.microsoft.com/codeofconduct/ -->
<!-- 🕮 Read our guide about submitting issues: https://github.com/microsoft/vscode/wiki/Submitting-Bugs-and-Suggestions -->
<!-- 🔎 Search existing issues to avoid creating duplicates. -->
<!-- 🧪 Test using the latest Insiders build to see if your issue has already been fixed: https://code.visualstudio.com/insiders/ -->
<!-- 💡 Instead of creating your report here, use 'Report Issue' from the 'Help' menu in VS Code to pre-fill useful information. -->
<!-- 🔧 Launch with `code --disable-extensions` to check. -->
Does this issue occur when all extensions are disabled?: 
Unknown
 yes

<!-- 🪓 If you answered No above, use 'Help: Start Extension Bisect' from Command Palette to try to identify the cause. -->
<!-- 📣 Issues caused by an extension need to be reported directly to the extension publisher. The 'Help > Report Issue' dialog can assist with this. -->
- VS Code Version: 
```
Version: 1.66.0
Commit: e18005f0f1b33c29e81d732535d8c0e47cafb0b5
Date: 2022-03-30T05:50:41.156Z
Electron: 17.2.0
Chromium: 98.0.4758.109
Node.js: 16.13.0
V8: 9.8.177.11-electron.0
OS: Linux x64 5.4.0-107-generic
```
- OS Version: Ubuntu, XFCE

Steps to Reproduce:

Reproduction case: https://github.com/microsoft/vscode/issues/146993#issuecomment-1131470956


I have no idea how to reproduce,
 I was clicking around in the file explorer when my mouse started flickering, including an icon on the side. it completely locked up and I had to terminate the process. When terminating it didn't respond to the kill signal, so I had to force it to close.

It seems there is a back-and-forth race condition for setting the pointer style somewhere.

Here is a GIF demonstrating the behaviour observed:

![flickering_mouse](https://user-images.githubusercontent.com/8614547/162180943-4ee37d2f-352a-4945-bde4-71684f252b21.gif)

Note that the speed of the flickering was much faster, and it is due to my recording software that you cannot see it flicker fast regularly. I am in fact trying to click on different parts of the application, but as you can see no click is getting through.
Repository: vscode
Issue: Reuse tokens when a new line is inserted
Labels: feature-request,tokenization

![image](https://user-images.githubusercontent.com/2931520/162188869-76b4665a-65a3-4cd5-bf6a-c1204cd16ee6.png)

This happens when pressing enter:

![image](https://user-images.githubusercontent.com/2931520/162188881-6dd5ce76-d386-47c8-8073-ad13b2e20c90.png)

Some milliseconds later:
![image](https://user-images.githubusercontent.com/2931520/162188839-98fd10e4-2054-4274-b925-ab3d7fe60fbf.png)

This can be improved here:
https://github.com/microsoft/vscode/blob/d3b7727faefd31c8bf145cd0033339c0d57981de/src/vs/editor/common/tokens/contiguousTokensStore.ts#L198-L201
Repository: godot
Issue: save Cubemap resource in script fail
Labels: bug,topic:core,needs testing

### Godot version

4.0-alpha6

### System information

Linux OpenSuSE Tumbleweed

### Issue description

I generated cubemap in script and save it with ResourceSaver, saved file is invalid.

### Steps to reproduce

generate code
```
@tool
extends EditorScript

func loadImage(path: String) -> Image:
	var image: Image = Image.new()
	image.load(path)
	return image

func _run() -> void:
	var image: Image
	var images: Array[Image]
	var cubemap: Cubemap
	
	cubemap = Cubemap.new()
	
	image = loadImage("Cube01.png")
	images.append(image)
	images.append(image)
	images.append(image)
	images.append(image)
	images.append(image)
	image = loadImage("Cube06.png")
	images.append(image)
	
	print(cubemap.create_from_images(images))
	print("layers = ", cubemap.get_layers())
	print(ResourceSaver.save("cubemap.tres", cubemap))
```
output is:
```
0
layers = 6
0	
```
cubemap.tres file content:
```
[gd_resource type="Cubemap" format=3 uid="uid://bqjufssvfafos"]

[resource]
```

### Minimal reproduction project
[createCubemapError.zip](https://github.com/godotengine/godot/files/8448400/createCubemapError.zip)