xbox-controller-button-remapper icon indicating copy to clipboard operation
xbox-controller-button-remapper copied to clipboard

crashed when use xbox series share button

Open lijingjian001 opened this issue 1 year ago • 3 comments

[settings]
debug = 0
file_location = C:\Windows\explorer.exe
file_key = 0

[screen_capture]
; Take screenshot by setting key

location = F:\print_screen

screenshot_key = 901

border = 0
cursor = 0

[controller1]

share_key = 901

share_hold_mode = 1

share_longpress_key = 0

share_longpress_duration = 1000

share_delay = 0

share_duration = 1

xbox_key = 0

xbox_hold_mode = 2

xbox_longpress_key = 0

xbox_longpress_duration = 1000
xbox_delay = 0
xbox_duration = 1

exception position is : ScreenCapture.cpp ->Snapshot::TakeAsync->session.IsBorderRequired(capture_border);

It seems to be a memory access error, as no log file was generated, so it can only roughly point to the abnormal location

Both the latest version released and the latest version on the Git main branch experienced an exception and crash at that location

Is there an inappropriate section in the configuration file?

lijingjian001 avatar Dec 08 '24 11:12 lijingjian001

I have found the cause of the program crash, just need to comment on the two lines of code in the following example

    auto session = framePool.CreateCaptureSession(item);

    //session.IsBorderRequired(capture_border); // Whether to show a colored border around the display to indicate that a capture is in progress
    //session.IsCursorCaptureEnabled(capture_cursor);

It seems that setting the visibility of edge lines and mouse arrows is not done this way. As for how to set these two properties, I haven't found a way yet

Finally, thank you for open-source this project. Prior to this, I was struggling with the feature of sharing button screenshots in Xbox Series and tried multiple methods for a long time, but none of them were satisfactory Now I can rest assured for a while

lijingjian001 avatar Dec 08 '24 15:12 lijingjian001

What operating system (OS) are you using? Please provide the details (name, edition, version, build).

Adam777Z avatar Dec 08 '24 18:12 Adam777Z

windows 10 enterprise (22h2 19045.5198) visual studio 2022(Current Vesion 17.12.3) windows sdk version 10.0.22621.0 iso c++ 20 toolset visual studo 2022(v143)

lijingjian001 avatar Dec 09 '24 02:12 lijingjian001