Bug Report [closed/resolved]

Discussing the game, editor (Suite) and the related tools.
Post Reply
User avatar
Llewen
Private
Private
Posts: 44
Joined: 2019-10-25 01:24, Friday

Bug Report [closed/resolved]

Post by Llewen » 2023-03-14 14:18, Tuesday

I'm posting this here because I'd like to know if anyone else has experienced something similar.

Open General has always made my system work hard, and that has often puzzled me, because it doesn't seem to me that Open General is a game that requires a lot of resources, in terms of processing time and graphics processing. Recently the game has started to occasionally cause my system to lock up. This bug report isn't about that, at least not specifically. I run Open General on a Linux system through wine, and I think there is a crash problem related to what is going to become an obsolete audio subsystem, that is not a problem with Open General.

However, in the process of trying to figure out what was going on with the crash I noticed that my system logs were filled with the following entry when Open General was running, and I think it might explain why Open General is causing my system to work so hard. I think there is also a chance that it might be fixable, and perhaps that other people, even people running Open General on Windows, might be experiencing this issue, without realizing it.

Code: Select all

Mar 14 11:04:33 pulseaudio[9590]: Cannot send block reference with non-registered memfd ID = 2228432511
Mar 14 11:04:33 pulseaudio[9590]: Fallig back to copying full block data over socket
It has something to do with media files that are looping while Open General is running. Quite possibly, or maybe even probably, the audio associated with the weather effects. It might have something to do with the memory address that is storing the audio file. Perhaps the memory address isn't large enough to hold the contents of the audio file. But that's just a guess.

This occurs no matter what the weather is, so if it is related to a weather audio file, it is any weather audio file, not a specific one. I don't know if an audio file plays when the weather is clear and sunny, if it doesn't, then it isn't a weather audio file that is causing the problem. It is some other audio file, or audio files, that are looping in any context. It isn't music because I don't play with music.

edit: The syslog error appears to have been resolved by installing the Debian wine32-preloader and wine64-preloader packages, which reserve certain memory address ranges for the use of wine on Linux systems.
Last edited by Llewen on 2023-04-15 12:16, Saturday, edited 2 times in total.

User avatar
randowe
Lieutenant Colonel
Lieutenant Colonel
Posts: 2895
Joined: 2019-09-20 19:02, Friday
Location: Germany

Re: Bug Report

Post by randowe » 2023-03-14 15:56, Tuesday

I had a simmilar problem on my old laptop. It was impossible to run the weather animations for rain and snow while playing because the laptop was overheating.
The dimensions of the pictures for rain and snow are very big, so i guess it was related to them :huh
Image Slava Ukraini!

sympatyk
Major
Major
Posts: 556
Joined: 2019-10-03 17:05, Thursday

Re: Bug Report

Post by sympatyk » 2023-03-14 17:14, Tuesday

:howdy
Which game engine are you using DD(DirectDraw) or SDL2? All sounds are in mp3 format?
What is your default audio player?

User avatar
Llewen
Private
Private
Posts: 44
Joined: 2019-10-25 01:24, Friday

Re: Bug Report

Post by Llewen » 2023-03-14 17:36, Tuesday

sympatyk wrote:
2023-03-14 17:14, Tuesday
:howdy
Which game engine are you using DD(DirectDraw) or SDL2? All sounds are in mp3 format?
What is your default audio player?
SDL2 and, I believe, WMP (legacy?). The sounds are in whatever format they are in OG. I haven't changed anything. I'm using the AK efile. This happens all the time, not just when there are specific audio files being played related to units.

I'm going to send you a bug report using the OG functionality as well, so you have that information. I will provide a link to this thread.

sympatyk
Major
Major
Posts: 556
Joined: 2019-10-03 17:05, Thursday

Re: Bug Report

Post by sympatyk » 2023-03-14 20:03, Tuesday

I am not a Linux expert
- try other versions of Wine
- install the latest sound and video card drivers (if any)
- try several versions of the OG engine
- try other audio programs

User avatar
Llewen
Private
Private
Posts: 44
Joined: 2019-10-25 01:24, Friday

Re: Bug Report

Post by Llewen » 2023-03-14 20:08, Tuesday

This has been across several versions of wine, and as you see, others are experiencing the issues on Windows. I don't think it's a Linux specific issue. My memory is hazy, but I might have also experienced this when I was running Windows. I think this issue has been with OG since just about day one. I just never reported it before. I think I was less aware of system performance in the past.

edit: And now that I think of it, I do think I mentioned this at least a couple of years ago. I just never submitted a "formal" bug report about it at the time. The difference this time around is that I have a Linux syslog that would seem to indicate that the issue might be related to the playback of audio files, and perhaps where those files are located in volatile ram. But I'm out of my depth when it comes to that, I haven't done any coding in C/C++/C#.

User avatar
randowe
Lieutenant Colonel
Lieutenant Colonel
Posts: 2895
Joined: 2019-09-20 19:02, Friday
Location: Germany

Re: Bug Report

Post by randowe » 2023-03-14 20:44, Tuesday

The solution for me was to turn weather animations off in the user interface settings.
Image Slava Ukraini!

User avatar
Llewen
Private
Private
Posts: 44
Joined: 2019-10-25 01:24, Friday

Re: Bug Report

Post by Llewen » 2023-03-14 21:20, Tuesday

randowe wrote:
2023-03-14 20:44, Tuesday
The solution for me was to turn weather animations off in the user interface settings.
This is not meant to be a harsh criticism, so I'm going to say what I hope I have said before. I love Open General. It is my favourite version of, perhaps, my favourite computer game of all time. I think what Luis has done with it is nothing short of astounding, and I say this in part because I have done a fair bit of coding myself, and have a tiny inkling of how much effort, intelligence, skill and passion was required to do what he has done with Open General.

Having said that, again, because I have done some coding myself, there is a significant difference between having a user disable a feature because their hardware can't handle it, or for other reasons of personal preference, and having them disable it because it isn't working properly. As a developer, the latter would annoy me, and I would want to see if there was something I could do to get it working properly.

My guess is Luis feels the same way, but Open General is a complicated piece of kit, and certain classes of issues can be very difficult to track down and resolve. I'm not going to be upset if this can't be fixed, Open General will still be my favourite version of one of my all time favourite games, and it is perfectly playable as it is. But I thought Luis might be interested in what that specific log entry was telling me about the problem.

edit: But of course, having said all that, it is very likely that that error message isn't specific enough to offer any useful diagnostic information...

User avatar
Llewen
Private
Private
Posts: 44
Joined: 2019-10-25 01:24, Friday

Re: Bug Report

Post by Llewen » 2023-03-19 13:31, Sunday

I think I understand a little bit of what is going on with this, at least in a general way. What appears to be happening is that the Open General executable is trying to write what is probably an audio file, or files, to a specific memory location or locations, but is unable to. When it is unable to do that, it is writing that audio file to another location in volatile ram. It is doing this over and over, and it is not overwriting when it writes the file. When the location is used, it attempts to write to another location.

The consequence of this is that Open General is behaving a bit like a memory diagnostic stress test, and unfortunately the ram in my system isn't perfectly stable, so it inevitably leads to a system lock up or a crash.

I might appear that this is a kind of memory leak, and I suppose it is, but I'm not noticing that I'm running out of ram, so it isn't behaving like a classic memory leak. Mind you I do have a lot of system ram, so I can't be sure about that.

And of course take this with a huge grain of salt, I've never coded in any flavour of C so I could be completely misinterpreting what is going on.

sympatyk
Major
Major
Posts: 556
Joined: 2019-10-03 17:05, Thursday

Re: Bug Report

Post by sympatyk » 2023-03-19 14:05, Sunday

:howdy
It is also likely that the sounds that follow each other actually overlap
The sound starts the audio process --> before this process ends --> the next sound wants to use the same music player calling the same process
This may cause a conflict
Can your default audio player be open by several overlapping events at the same time?
The question is how does WINE handle this --> does it handle several of the same processes at the same time?

User avatar
Llewen
Private
Private
Posts: 44
Joined: 2019-10-25 01:24, Friday

Re: Bug Report

Post by Llewen » 2023-03-19 14:28, Sunday

sympatyk wrote:
2023-03-19 14:05, Sunday
:howdy
It is also likely that the sounds that follow each other actually overlap
The sound starts the audio process --> before this process ends --> the next sound wants to use the same music player calling the same process
This may cause a conflict
Can your default audio player be open by several overlapping events at the same time?
The question is how does WINE handle this --> does it handle several of the same processes at the same time?
Not smart enough to be able to answer these questions. I know I'm not running more than one wine application at a time, and even if I was, each wine application runs in it's own sandbox. There shouldn't be any overlap. And something tells me this isn't wine specific. I'm only seeing this with wine because wine is logging the events. I suspect it is happening on Windows, it just isn't being logged.

But perhaps the player is being called multiple times and there is an overlap, as you describe, although it doesn't appear to be related to the playback of a audio or media file, because it is happening even when there are no media files playing. It appears to be related to the writing of some type of audio event to a memory location, if that makes sense. Not to playback.

User avatar
Llewen
Private
Private
Posts: 44
Joined: 2019-10-25 01:24, Friday

Re: Bug Report

Post by Llewen » 2023-03-19 16:45, Sunday

What I am describing sounds to me, after some consideration, to be some form of caching behaviour gone wrong.

User avatar
Llewen
Private
Private
Posts: 44
Joined: 2019-10-25 01:24, Friday

Re: Bug Report

Post by Llewen » 2023-04-15 12:14, Saturday

I'm going to mark this as closed. It appears that the behaviour I described was accurate, but it wasn't an issue with Open General. It was a problem with wine. I have found some packages which are wine preloaders (wine32-preloader, wine64-preloader). What they do is reserve the memory address ranges that are reserved on DOS and Windows for wine. The syslog errors appear to be gone.

Sorry for sending you on a wild good chase Luis. :(

User avatar
LuisGuzman
General, Special Forces
General, Special Forces
Posts: 639
Joined: 2019-03-10 08:35, Sunday
Location: Spain
Contact:

Re: Bug Report

Post by LuisGuzman » 2023-04-15 16:29, Saturday

Llewen wrote:
2023-04-15 12:14, Saturday
I'm going to mark this as closed. It appears that the behaviour I described was accurate, but it wasn't an issue with Open General. It was a problem with wine. I have found some packages which are wine preloaders (wine32-preloader, wine64-preloader). What they do is reserve the memory address ranges that are reserved on DOS and Windows for wine. The syslog errors appear to be gone.

Sorry for sending you on a wild good chase Luis. :(
No, problem, you are welcome Owen ;)
  Visit my website to get my latest tools.
* Click Open General banner to get more info about the game
Image

Post Reply