sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: pytorch
Issue: VS2022Preview ParallelCommon.cpp.obj : fatal error LNK1161: invalid export specification
Labels: module: build,triaged,module: static linking

### 🐛 Describe the bug

```
[5554/5844] Linking CXX shared library bin\torch_cpu.dll
FAILED: bin/torch_cpu.dll lib/torch_cpu.lib
cmd.exe /C "cd . && C:\Prog\cmake\bin\cmake.exe -E vs_link_dll --intdir=caffe2\CMakeFiles\torch_cpu.dir --rc=C:\PROGRA~2\WI3CF2~1\10\bin\100226~1.0\x64\rc.exe --mt=C:\PROGRA~2\WI3CF2~1\10\bin\100226~1.0\x64\mt.exe --manifests  -- C:\PROGRA~1\MICROS~4\2022\Preview\VC\Tools\MSVC\1434~1.319\bin\Hostx64\x64\link.exe /nologo @CMakeFiles\torch_cpu.rsp  /out:bin\torch_cpu.dll /implib:lib\torch_cpu.lib /pdb:bin\torch_cpu.pdb /dll /version:0.0 /machine:x64 /ignore:4049 /ignore:4217 /ignore:4099 /INCREMENTAL:NO  -WHOLEARCHIVE:C:/Github/pytorch/build/lib/caffe2_protos.lib -WHOLEARCHIVE:C:/Github/pytorch/build/lib/onnx.lib  && cd ."
LINK: command "C:\PROGRA~1\MICROS~4\2022\Preview\VC\Tools\MSVC\1434~1.319\bin\Hostx64\x64\link.exe /nologo @CMakeFiles\torch_cpu.rsp /out:bin\torch_cpu.dll /implib:lib\torch_cpu.lib /pdb:bin\torch_cpu.pdb /dll /version:0.0 /machine:x64 /ignore:4049 /ignore:4217 /ignore:4099 /INCREMENTAL:NO -WHOLEARCHIVE:C:/Github/pytorch/build/lib/caffe2_protos.lib -WHOLEARCHIVE:C:/Github/pytorch/build/lib/onnx.lib /MANIFEST /MANIFESTFILE:bin\torch_cpu.dll.manifest" failed (exit code 1161) with the following output:
ParallelCommon.cpp.obj : fatal error LNK1161: invalid export specification
```

after some comparsion
VS2022Preview 17.4.0 Preview 5.0
emit this
```
/EXPORT:?init@?1??lazy_init_num_threads@internal@at@@YAXXZ@4_NA,THREAD_DATA
```
while
VS2019 16.11.20
```
/EXPORT:?init@?1??lazy_init_num_threads@internal@at@@YAXXZ@4_NA,DATA 
```

here the object files
[obj_files.zip](https://github.com/pytorch/pytorch/files/9885294/obj_files.zip)

Workaround?
idk

Thanks.

CC @vladimir-aubrecht 

### Versions

pytorch trunk
commit f9679184116f1d29c483c2b2a4c3a9d730be4694
VS2022
```
C:\Github\pytorch>cl -v
Microsoft (R) C/C++ Optimizing Compiler Version 19.34.31932 for x64
Copyright (C) Microsoft Corporation.  All rights reserved.
```
VS2019
```
C:\Github\pytorch_VS2019>cl -v
Microsoft (R) C/C++ Optimizing Compiler Version 19.29.30146 for x64
Copyright (C) Microsoft Corporation.  All rights reserved.
```

cc @malfet @seemethere
Repository: pytorch
Issue: crash when call `torch.set_num_interop_threads` twice
Labels: module: crash,triaged

### 🐛 Describe the bug

Crash with abort when call `torch.set_num_interop_threads` more than once.

According to [doc](https://pytorch.org/docs/stable/generated/torch.set_num_interop_threads.html), `set_num_interop_threads`:
> can only be called once and before any inter-op parallel work is started (e.g. JIT execution).

However, I think this can be handled with an Exception instead of directly crash.

### Versions

pytorch 1.12.1

cc @ezyang @gchanan @zou3519
Repository: pytorch
Issue: crash in `torch.package.PackageExporter`
Labels: triaged,module: edge cases

### 🐛 Describe the bug

`torch.package.PackageExporter` crash with abort.

```
import torch
data = torch.randn(2, 3)
print(data)
torch.package.PackageExporter(data, './test_package.zip')
```
```
tensor([[-1.3200, -1.0457, -0.0773],
        [ 0.6770,  1.8295, -0.8031]])
abort (core dumped) 
```
This is probably related to https://github.com/pytorch/pytorch/issues/85329, except that in the code example above, no Error is thrown and it directly crashes.

### Versions

pytorch 1.12.1
Repository: angular
Issue: [FR] Make components subclassable without template
Labels: feature,area: core,core: component extension and customization,feature: under consideration

### Which @angular/* package(s) are relevant/related to the feature request?

core

### Description

Angular lately added support for subclassing a component. It is thus now possible for a downstream-app to override a component's base-implementation in a lib. According to the docs I read, all you have to do is declare the same `selector`. Unfortunately, though, the subclass requires `template` or `templateUrl` -- without it, I get this error:
```
 error NG2001: component is missing a template
```
My app-code doesn't have access to the lib's template-file (declared there via `templateUrl`) and IMHO I should not be forced to re-declare the template, if I do not want to replace it (but inherit it the way it is in the super-component).

The component-class contains the UI-logic. It should be easily possible for a downstream-lib/-app to customize this logic, i.e. override protected/public methods, without touching the UI (i.e. without re-declaring a template).

### Proposed solution

Make the `@Component(...)`-annotation's `template` and `templateUrl` optional for component-subclasses. A component-subclass should easily be able to override UI-logic without providing its own template.

### Alternatives considered

We tried to extract the UI-logic from the component into a stateful service which is associated 1-to-1 with its component. This, however, doesn't work either -- hence, I opened this other feature-request: https://github.com/angular/angular/issues/47899
Repository: pytorch
Issue: `torch.distributed` crash with abort only inside if
Labels: oncall: distributed,module: crash

### 🐛 Describe the bug

`torch.distributed` crash with abort:
```
import torch
import torch.distributed as dist
if True:
    input_tensor = torch.randn(4, 3)
    dist.FileStore('./')
```
```
abort (core dumped) 
```
However, if we remove the if statement, it will not crash
```
import torch
import torch.distributed as dist
input_tensor = torch.randn(4, 3)
dist.FileStore('./')
```
```
<torch._C._distributed_c10d.FileStore at 0x7f5b68e42b70>
```

### Versions

pytorch 1.12.1

cc @mrshenli @pritamdamania87 @zhaojuanmao @satgera @rohan-varma @gqchen @aazzolini @osalpekar @jiayisuse @H-Huang @kwen2501 @awgu
Repository: rust
Issue: Internally change regions to be covariant
Labels: C-cleanup,E-hard,E-mentor,A-variance,T-types

**THIS ISSUE IS ONLY ABOUT AN IMPLEMENTATION DETAIL OF RUSTC, IT DOES NOT AFFECT THE RUST LANGUAGE.**

Right now regions in rustc are considered to be *contravariant* wherever they are used:

https://github.com/rust-lang/rust/blob/cdd7afeaadf1c48eafb4dff4452439fa5d13a775/compiler/rustc_middle/src/ty/relate.rs#L447-L454

https://github.com/rust-lang/rust/blob/cdd7afeaadf1c48eafb4dff4452439fa5d13a775/compiler/rustc_middle/src/ty/relate.rs#L492-L497

This is confusing and different from outlives, as `'a subtype 'b` currently means `'b outlives 'a`. Whenever we switch between "outlives" and "subtyping" for regions, we have to swap the order, e.g.

https://github.com/rust-lang/rust/blob/cdd7afeaadf1c48eafb4dff4452439fa5d13a775/compiler/rustc_infer/src/infer/outlives/env.rs#L137-L148

We've previously discussed this in https://rust-lang.zulipchat.com/#narrow/stream/144729-t-types/topic/relating.20regions.20variance where we ended up agreeing that the variance should be changed to covariance for regions.

Doing so is non-trivial as my first attempt at this ended up missing at least one place resulting in hard to diagnose errors in core. I still want to see this fixed and would be up to review or mentor any work here. This requires some familiarity with the compiler (some knowledge about borrowck and/or the lexical regionck would be helpful) to correctly update relevant comments when doing this change.

*edit: we also have to update the `crate_variances` query for this to work. probably that was the issue I encountered*


<!-- TRIAGEBOT_START -->

<!-- TRIAGEBOT_ASSIGN_START -->

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

<!-- TRIAGEBOT_ASSIGN_END -->
<!-- TRIAGEBOT_END -->
Repository: godot
Issue: WebSocket connection takes ~20 seconds to be established when using "localhost"
Labels: bug,confirmed,topic:network,performance

### Godot version

4.0 beta 3

### System information

Windows 11

### Issue description

When my project tries to connect to an external server using the new WebSockets, the connection takes a minimum of 20 seconds to be established (socket state becomes STATE_OPEN for the first time).
This happens when the provided URL tries to connect to "localhost:port". 
Using "127.0.0.1" instead of "localhost" works correctly.

### Steps to reproduce

1) Download the [example](https://github.com/Faless/godot-demo-projects/blob/da12c0994203644be9eb5ffb396122424c5de7a0/networking/websocket_chat/websocket/WebSocketClient.gd)
2) Add a button to invoke the `connect_to_url` function with the URL of the local server (the one I use is `ws://localhost:8082/test`)
3) Subscribe to the `connected_to_server` signal with some function that can notify you of the connection
4) Start the game and the server (my server was made using Quarkus with their WebSockets implementation)
5) Press the button and wait, the connection will be open after 20+ seconds

### Minimal reproduction project

_No response_
Repository: vscode
Issue: GitHub - for VSCode not properly unlinked until VSCode restart
Labels: bug,github

Type: <b>Bug</b>

1. Link GitHub to VSCode via GitHub for VSCode
2. Unlink it via Account button (above cogwheel,bottom left) -> Select Github User -> Unlink account
3.  Try to clone a repository. It's still possible to select repositories from the previously linked GitHub account.

Restarting VSCode seems to be the only thing that fully unlinks it, which assumingly can be dangerous.

VS Code version: Code 1.72.2 (d045a5eda657f4d7b676dedbfa7aab8207f8a075, 2022-10-12T22:15:18.074Z)
OS version: Windows_NT x64 10.0.19044
Modes:
Sandboxed: No

<details>
<summary>System Info</summary>

|Item|Value|
|---|---|
|CPUs|Intel(R) Core(TM) i7-3770 CPU @ 3.40GHz (8 x 3392)|
|GPU Status|2d_canvas: enabled<br>canvas_oop_rasterization: disabled_off<br>direct_rendering_display_compositor: disabled_off_ok<br>gpu_compositing: enabled<br>multiple_raster_threads: enabled_on<br>opengl: enabled_on<br>rasterization: enabled<br>raw_draw: disabled_off_ok<br>skia_renderer: enabled_on<br>video_decode: enabled<br>video_encode: unavailable_off<br>vulkan: disabled_off<br>webgl: enabled<br>webgl2: enabled<br>webgpu: disabled_off|
|Load (avg)|undefined|
|Memory (System)|15.94GB (12.35GB free)|
|Process Argv|--crash-reporter-id 037ea8ec-fc9c-4c22-8cbd-1370e713e758|
|Screen Reader|no|
|VM|67%|
</details><details><summary>Extensions (23)</summary>

Extension|Author (truncated)|Version
---|---|---
path-intellisense|chr|2.8.1
vscode-eslint|dba|2.2.6
jquerysnippets|don|0.0.1
vscode-html-css|ecm|1.13.1
prettier-vscode|esb|9.9.0
auto-close-tag|for|0.5.14
vscode-language-pack-de|MS-|1.72.10120946
python|ms-|2022.16.1
vscode-pylance|ms-|2022.10.40
jupyter|ms-|2022.9.1202862440
jupyter-keymap|ms-|1.0.0
jupyter-renderers|ms-|1.0.10
vscode-jupyter-cell-tags|ms-|0.1.6
vscode-jupyter-slideshow|ms-|0.1.5
live-server|ms-|0.4.3
autodocstring|njp|0.6.1
npm-install|ore|0.0.1
vscode-css-peek|pra|4.2.0
LiveServer|rit|5.7.9
altv-vscode-docs|stu|2.0.9
JavaScriptSnippets|xab|1.8.0
material-theme|zhu|3.15.6
html-css-class-completion|Zig|1.20.0

(1 theme extensions excluded)

</details><details>
<summary>A/B Experiments</summary>

```
vsliv368:30146709
vsreu685:30147344
python383:30185418
vspor879:30202332
vspor708:30202333
vspor363:30204092
vslsvsres303:30308271
pythonvspyl392:30443607
vserr242:30382549
pythontb:30283811
vsjup518:30340749
pythonptprofiler:30281270
vshan820:30294714
vstes263:30335439
vscorecescf:30445987
pythondataviewer:30285071
vscod805cf:30301675
binariesv615:30325510
bridge0708:30335490
bridge0723:30353136
cmake_vspar411:30581797
vsaa593:30376534
pythonvs932:30410667
cppdebug:30492333
vscaac:30438847
vsclangdc:30486549
c4g48928:30535728
dsvsc012:30540252
azure-dev_surveyone:30548225
pyindex848:30577860
nodejswelcome1:30587005
fc301958:30595537
2e4cg342:30596373

```

</details>

<!-- generated by issue reporter -->
Repository: godot
Issue: Debugger crash when accessing script properties after set_script
Labels: bug,topic:gdscript,topic:editor,confirmed,crash

### Godot version

4.0 Beta3

### System information

Windows 10

### Issue description

The debugger (and the launched game) crash without further information in the case I try to access a script property after calling set_script on it.
As the debugger crashed, no stack is available for debugging.
It doesn't crash for direct values, but for references (Array, Dict...).

### Steps to reproduce

A single Node with the following script:

```
extends Node

var array = []

func _ready():
	set_script('res://other_script_without_array_property.gd')
	print(array)

```
Set array to a 'direct' value (int, String...) and it will work perfectly fine.
Set it to a 'referenced' one (Array, Dict...) and after launching the scene, the crash will occur.

### Minimal reproduction project

[Test4.3.zip](https://github.com/godotengine/godot/files/9887663/Test4.3.zip)
Repository: ant-design
Issue: Input's onChange triggers with repeated content unexpectedly when onPressEnter dispatch blur event with using Chinese Input(中文输入法))
Labels: Inactive

### Reproduction link

[https://riddle.alibaba-inc.com/riddles/e5dba61f](https://riddle.alibaba-inc.com/riddles/e5dba61f)

### Steps to reproduce

see links or such demo codes:

```ts
const App = () => {
  const [value, setValue] = useState('')

  const handlePressEnter = useCallback(
    (e) => {
      if (e.target instanceof HTMLInputElement) {
        e.target.blur();
      }
    },
    [],
  );

  return (
    <Input
      placeholder="Basic usage"
      value={value}
      onChange={e => setValue(e.target.value)}
      onPressEnter={handlePressEnter}
    />
  )
};
```

### What is expected?

no unexpected onChange triggering.

### What is actually happening?

onChange triggers with repeated content

| Environment | Info |
| --- | --- |
| antd | 4.23.6 |
| React | 18 |
| System | MacOS |
| Browser | Chrome |

<!-- generated by ant-design-issue-helper. DO NOT REMOVE -->
Repository: flutter
Issue: `Slider` and `RangeSlider` thumb accessibility issues
Labels: framework,f: material design,a: accessibility,f: focus,P2,team-design,triaged-design

### Description
#### 1. The entire `Slider` is focused instead of just the thumb. 

The focus window should only follow the thumb while keeping the ability to tap anywhere on the slider to change value.
(this especially becomes problematic with `RangeSlider`)

| Flutter | Android |
| --------------- | --------------- |
| <img src="https://user-images.githubusercontent.com/48603081/198578617-56b85c4d-4f43-4eed-9c80-0d9b8f7ccbd5.jpg" /> | <img src="https://user-images.githubusercontent.com/48603081/198578513-f64acb71-8c5b-482a-a866-857d68d81084.jpg" /> |




#### 2. `RangeSider` focus window is divided in half despite range thumb locations instead of just the range thumbs.

1. Focus window takes half the size regardless of the thumb location
2. If both range thumbs are located on one side of the slider, the focus window is still shown on the otherwise side, in an empty slider area.
3. Focus windows should be on the range thumbs





| Flutter | Android |
| --------------- | --------------- |
| <img src="https://user-images.githubusercontent.com/48603081/198580896-39585afc-d587-4488-8549-b250d3266522.jpg" /> | <img src="https://user-images.githubusercontent.com/48603081/198580902-fa0442c7-8b00-495e-b4d5-35c1679b6948.jpg" /> |
| <img src="https://user-images.githubusercontent.com/48603081/198580960-c67da866-3fef-42a2-9263-8bb9149d70a2.jpg" /> | <img src="https://user-images.githubusercontent.com/48603081/198580968-b4f1dc50-4a43-44e5-b0a7-55322d81a34e.jpg" /> |
Repository: godot
Issue: Constant crashes and black screens
Labels: bug,platform:windows,topic:rendering,needs testing

### Godot version

3.5.1 mono 64

### System information

Windows 10 64 bit ,i9-10850K CPU @ 3.60GHz, Asus RTX 3070, 32GB ram

### Issue description

Began when i first tried to click on "assetlib" tab for the first time, crashing the enigne. After that, every attempt at opening the project with Godot would result in a crash, temporary black screen that would mess up the windows UI.

![image](https://user-images.githubusercontent.com/71428826/198582146-e84af022-8952-4e91-8aad-f8609e123bd9.png)

Screenshot is the folder tab and the console after the black screen. Console dosen't show any errors either.

### Steps to reproduce

No idea. 

### Minimal reproduction project

_No response_
Repository: rust
Issue: Adding statements after implicit return could result in confusing errors
Labels: A-diagnostics,T-compiler,D-confusing,D-papercut,D-newcomer-roadblock

This originated from someone who is only starting to learn the language and incorrectly thought that the `if` statement returned values on their own and tried to add statements after the `if`.

Given the following code: [play](https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=509fed780a8c4113906299f02ecf2102)

```rust
fn foo(x: bool) -> i32 {
    if x {
        1
    } else {
        2
    }
    
    println!("{x}");
}
```

The current output is this, which can be confusing to beginners if they do not know that the trailing expression is used as the return value.

```
error[E0308]: mismatched types
 --> src/lib.rs:3:9
  |
2 | /     if x {
3 | |         1
  | |         ^ expected `()`, found integer
4 | |     } else {
5 | |         2
6 | |     }
  | |_____- expected this to be `()`
  |
help: you might have meant to return this value
  |
3 |         return 1;
  |         ++++++  +

error[E0308]: mismatched types
 --> src/lib.rs:5:9
  |
2 | /     if x {
3 | |         1
4 | |     } else {
5 | |         2
  | |         ^ expected `()`, found integer
6 | |     }
  | |_____- expected this to be `()`
  |
help: you might have meant to return this value
  |
5 |         return 2;
  |         ++++++  +

error[E0308]: mismatched types
 --> src/lib.rs:1:20
  |
1 | fn foo(x: bool) -> i32 {
  |    ---             ^^^ expected `i32`, found `()`
  |    |
  |    implicitly returns `()` as its body has no tail or `return` expression
```

<!-- The following is not always necessary. -->
Ideally the output should include a suggestion to store the possibly intended return value in a variable and returning it later, like so:

```
help: you might have meant to return this value

    let return_value = if x {
        1
    } else {
        2
    };

    println!("{x}");
    return_value
```

<!--
If the problem is not self-explanatory, please provide a rationale for the
change.
-->

<!--
If dramatically different output is caused by small changes, consider also
adding them here.

If you're using the stable version of the compiler, you should also check if the
bug also exists in the beta or nightly versions. The output might also be
different depending on the Edition.
-->
Repository: vscode
Issue: Merge Editor Telemetry Improvements
Labels: feature-request,merge-editor

* [ ] Report screensize when merge editor closes - are developers faster to resolve merge conflicts when they have bigger screens?
* [ ] smart-mergable confidence for non-touching character changes?
* [x] report usage of (old) inline merge editor
Repository: rust
Issue: Incorrect dead_code warning on a function that is being called
Labels: A-lints,A-diagnostics,T-compiler,D-confusing,L-dead_code

To reproduce, check out [this branch](https://github.com/RalfJung/miri/tree/rustc-bug-dead-code), do `./rustup-toolchain && ./miri check`:
```
warning: associated function `uint` is never used
   --> src/machine.rs:318:12
    |
318 |     pub fn uint(&self, size: Size) -> Option<TyAndLayout<'tcx>> {
    |            ^^^^
    |
    = note: `#[warn(dead_code)]` on by default
```
However, that warning is just wrong! Indeed, removing this function leads to a build error:
```
error[E0599]: no method named `uint` found for struct `PrimitiveLayouts` in the current scope
   --> src/shims/windows/sync.rs:22:43
    |
22  |         let layout = this.machine.layouts.uint(size).unwrap();
    |                                           ^^^^ method not found in `PrimitiveLayouts<'tcx>`
    |
   ::: src/machine.rs:274:1
    |
274 | pub struct PrimitiveLayouts<'tcx> {
    | --------------------------------- method `uint` not found for this struct
```
Repository: TypeScript
Issue: Emmited Type Declarations generate empty export
Labels: Bug,Help Wanted,Domain: Declaration Emit

# Bug Report

When generating type declaration files if a type that is only used inside the typescript code however it is not exported results in an empty export at the end of the file e.g. `export {};`

### 🔎 Search Terms

* declaration empty export
* declaration "export {}"

### 🕗 Version & Regression Information

When i started inspecting the generated typescript declarations generated.
I see the same error/behaviour when either `typescript@4.8` and `typescript@next`

This is the behavior in every version I tried, and I reviewed the FAQ for entries about emmited code and private fields and methods.

### ⏯ Playground Link

* When some of the types are not exported this happens playground example [here](https://www.typescriptlang.org/play?experimentalDecorators=false&emitDecoratorMetadata=false&target=99&stripInternal=true#code/C4TwDgpgBAKghgZwNY3NAvFA5AeQHICiWUAPtjAOo7FlYwASASgUQNwBQ7A9F1AO4B7AK4AbACZQAdgOBQIAD0gBjYBAnABUABZwAbtDiS5AWzCg5igQCdZ3XgEsjwLdAjH7wVerRQxEJSJwVnDA9gJGSgJ+2hBW0PYIUM4JUJFWcSoA-OwKYNayjqpWAGZwStDwyFAA3uxQFv5CqpVIABSgkABcLaiQAJSdugL2YhwAvuxAA)
* When all of the types are exported there is no empty export playground example [here](https://www.typescriptlang.org/play?experimentalDecorators=false&emitDecoratorMetadata=false&target=99&stripInternal=true#code/PTAEDsHtQUwWwA4BcCesAeDICcmgM4CW4AxjKAIYA2VoqCM+l4AJqMUjNgGYVlMxMOTiwBQgrLjooGoACoV8AazkzyAXlAByAPIA5AKJbQAH21yA6juNmtcgBIAlA0YDc4oVI5deZeYqVQAG9RUAwYEgBXTgVlAAp6GAAuWJU1AEokgDdIQhZ3AF9RIA)

### 💻 Code

#### Empty Export Code
```ts
type TaskType = 'ONE' | 'TWO' | 'THREE';

// would not expected to have an empty export 
// in the emitted type declaration code here is this correct?
export interface Task {
  executeTask(type:TaskType):void;
}
```

#### No Empty Export
```ts
// no empty export since all types and interfaces exported
export type TaskType = 'ONE' | 'TWO' | 'THREE';
export interface Task {
  executeTask(type:TaskType):void;
}
```

### 🙁 Actual behavior

Empty export for some reason…

### 🙂 Expected behavior

No default empty export.
Repository: opencv
Issue: OPENCV_IO_ENABLE_OPENEXR and imwrite
Labels: bug,category: imgcodecs

### System Information

OpenCV 4.6.0
Windows 7 64b
Visual Studio 2019

### Detailed description

#21326 states that OpenEXR is disabled by default because of security concerns regarding non-trusted image sources

However, OpenEXR is disabled globally.
I don't understand why it limits both the usage of `cv::imwrite` and `cv::imread`. `cv::imwrite` should still be allowed since by default the user trusts himself.

Setting the environment variable at run-time `OPENCV_IO_ENABLE_OPENEXR `before an `cv::imwrite()` is a workaround, but not very handy.

### Steps to reproduce

```
        _putenv_s("OPENCV_IO_ENABLE_OPENEXR", "1");//required to use exr file format
        cv::imwrite("foo.exr", imgMat);

```

### Issue submission checklist

- [X] I report the issue, it's not a question
- [X] I checked the problem with documentation, FAQ, open issues, forum.opencv.org, Stack Overflow, etc and have not found any solution
- [ ] I updated to the latest OpenCV version and the issue is still there
- [ ] There is reproducer code and related data files (videos, images, onnx, etc)