Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

crashed when use xbox series share button #28

Open
lijingjian001 opened this issue Dec 8, 2024 · 3 comments
Open

crashed when use xbox series share button #28

lijingjian001 opened this issue Dec 8, 2024 · 3 comments

Comments

@lijingjian001
Copy link

[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
Copy link
Author

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

@Adam777Z
Copy link
Owner

Adam777Z commented Dec 8, 2024

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

@lijingjian001
Copy link
Author

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants