-
-
Notifications
You must be signed in to change notification settings - Fork 18
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
BUG: RePlays crashing when starting to record #16
Comments
Logs
|
After a couple of tries to reproduce, I can confirm that this can happen occasionally. I don't know exactly what is causing it to happen, it is basically random in my tests. (And it is not specifically related to League Of Legends) One of my hypotheses is that it might be the encoders not being fully initialized sometimes, and that we are starting the output too quickly. I'll try to implement something for this. |
Forgot to reference this issue, but the related commit is afaddb1 |
Does the commit fix the issue or is it still in progress? |
Untested as I am unable to reproduce the issue consistently, the access violation exception only happens like 1/50 times for me. |
The issue still persists in 1.0.31. |
Unfortunate.. I'm unable to reproduce consistently so I'm not sure if it is a RePlays related or a system related issue. How often does this crash/exception occur for you? I've noticed that one user reported that it crashed everytime they tried to record. Regardless, I'll try to look deep within obs studio source code and try to see if I missed any initialization steps or whatnot. By chance, does a similar crash happen when trying to record with OBS Studio? |
Crashes every time for me, it didn't used to crash. OBS works fine. I definitely have been seeing crashes very frequently ever since the RestartOutput() on window resize was put in.. but it's crashing on games that are windowed full screen so I'm not sure if that method is even getting called in my crash cases. |
Very strange that my environment is unable to get a crash, even when using the production pre-release build, I am still unable to get a crash within a number of recordings.
I have a feeling it might be something to do with setting the resolution/video settings too. I'll look through the old commits and try working backwards. |
I didn't pushed the signed DLLs so that should not be the problem at least. Would be nice to automatically retry the recording if it gets the AccessViolation error to see if the issue still persists. We should at least implement a try catch function so the whole application doesn't crash. |
I don't think this is possible. I think it might be something went wrong with obs.dll internally, but I'm not sure how to debug native code/dlls within C# so I'm not even sure how to tackle this.
I rather not do this, because when something goes wrong with calling obs.dll functions, the app will eventually freeze up anyways due to illegal memory (I think). This is just from my personal experiences, what I'm saying right now might not reflect what would actually happen. You could give it a shot and see if behaviors are normal after catching a memory exception, as I am unable to reliably debug this issue. Right now, I am just reading through official obs-studio and other libobs related projects to see how they implement recording the output. At this point, I am brute-forcing changes in hope that it will fix this issue for you guys. Worse-case, I'll revert If you have the time, could one of you guys try revisiting older commits and debug them to find out which commit starts creating this issue? |
Create output after configuring video settings (specifically when setting output to match game resolution), this could be a possible solution to #16. The theory is that ResetVideo() is causing some kind of bad memory access within obs.dll if called after an output was instantiated.
I've just pushed a refactor commit in another attempt to solve this. Instead of configuring video settings after creating an output, this time do it before. I have a theory that it was because ResetVideo() caused memory related issues with the output? This refactor does not affect my environment whatsoever (everything still works as intended for me), and so I have again not properly tested against this issue, so please feel free to try it out whenever you can and see if there are any different results. |
Perfect, I will try it out within an hour 👍 |
@lulzsun Here are the logs
|
That's a relief! Sounds like it's working now and it was due to ResetVideo() the whole time. I'll try to fix the Alt tabbing issue once I'm available. |
Great! I'll run a test again with 25 more games to double check. |
Fixed by 95663c7. |
I'll try to fix it asap.
The text was updated successfully, but these errors were encountered: