Koenvh1 / ets2-local-radio

Radio from wherever you are in ETS2/ATS
https://koenvh.nl/projects/ets2-local-radio
Mozilla Public License 2.0
234 stars 40 forks source link

Overlay crashes both games. #136

Closed hadeseol closed 3 years ago

hadeseol commented 3 years ago

In the latest update for both games I'm having an issue in where when the overlay is supposed to show on screen. Eg. when the program recognizes the truck location and the station starts playing. If I leave the program open and restart the game, the game won't crash but won't show the overlay either, the rest works normally with stations changing depending on the area.

Koenvh1 commented 3 years ago

Restarting the game will break the overlay. Whenever it loads the overlay, it checks whether it knows the ETS2/ATS process. If not, it will try to find it. If you restart the game, it will still remember the old process, thus it will try to overlay it there (which you cannot see, obviously).

I have created a possible fix here: Release.zip

Fully untested however, so I have no idea whether it actually works.

hadeseol commented 3 years ago

Sorry I just noticed I left out the most important part of the issue on my first comment. The main issue is that when the games load the truck location for the first time while the program is running, the games will crash to desktop when the overlay tries to show up. Also if I leave the program running and switch to the other game, it'll crash the other game as well when I load into my truck and the overlay tries to show up.

Now as I mentioned in my previous comment, if I leave the program running and restart the game I was playing previously then the game won't crash anymore but the overlay won't show. That's how I figured that the overlay was probably the cause of the games crashing.

Sorry that I didn't explain it well in my previous comment, probably I had a lapse of thought there. I did try the fix but it didn't work for the crashing. It does seem to work to fix the overlay not showing problem (which is what the fix is intended for) as now my games do crash every time I load into my truck and it tries to show the overlay even if I leave the program running lol. So yeah the fix does work for the intended purpose.

Koenvh1 commented 3 years ago

I was already wondering what the crash meant in the title. Anyhow, I'm not sure what is happening. Have you tried uninstalling it, removing the folder itself (sometimes it doesn't remove everything), and installing it again?

hadeseol commented 3 years ago

After trying some options, I seem to have found the culprit. I tried rolling back the Nvidia drivers since that was the only thing that changed as they were updated yesterday. After rolling back the drivers the issue seems to be solved. So it seems at least in my case that the new Nvidia drivers have compatibility issues with the overlay function of the program.

hadeseol commented 3 years ago

Well I finally found the real culprit in my case after much testing. For me it started to conflict with RivaTuner Statistics Server. It works fine as long as I launch RivaTuner after loading the truck. I would guess it would also cause issues for anyone using MSI Afterburner as both use similar code.