The infamous missing texture problem
#21
Posted 18 November 2013 - 10:35 PM
#22
Posted 18 November 2013 - 11:34 PM
In the case above and in similar cases I had the qualitative impression that memory usage growing from run to run was at least partially due to re-loading of consists.
So solving this problem would probably not only reduce occupancy of sound source buffers, but also reduce the general problem of unjustified increases of OR memory usage.
#23
Posted 19 November 2013 - 01:05 AM
#24
Posted 19 November 2013 - 02:14 AM
The tests of my preceding posts however show that there is memory leak with the loose consists. So I'm not able to enter into Peter and James' discussion, but there is something about memory release of loose consists that does not work; this is evidenced both by the double memory increase I had in such previous tests and by the double entries in the active sound source list.
By the way loose consists are trains too, I guess of type static. Do they have to be explicitly disposed or James' rule applies?
#25
Posted 19 November 2013 - 03:08 AM
Csantucci, on 19 November 2013 - 02:14 AM, said:
An object is collected (disposed) automatically once nothing else refers to it. So although we don't need to explicitly dispose them, we do need to make sure they are removed from whatever is holding on to them.
There are two main parts to a train: the simulation part, and the viewer part. The simulation part is not disposed unless it is an AI train and the AI is completed (and is removed), or that should be the case. If we disposed the simulation part, you'd no longer know where the train was! But this part should not use much memory at all. The viewer part is created on-demand, when a train is close enough to need to be visible, and should be disposed of once the train is far enough away to no longer be visible. There is also a cab part, which should work similarly to the viewer part.
It is quite possible we're not disconnecting the viewer or cab parts as we should; although I've carefully checked other parts of the viewer (mostly around terrain/scenery) to ensure we release things in due time, I have not done this with the train viewer parts. It's on my list though.
#26
Posted 19 November 2013 - 03:55 AM
(Just to make it clear: I am not a pro, just a "wannabe" programmer, so despite of Carlo's big words, what I say is not an analysis, just a thought of a (as we say here) sane peasant brain. So forgive me if I say untrue things sometimes, I believe the pros, no need for a decapitation.)
#27
Posted 19 November 2013 - 05:05 AM
I have to modify about 80 trainset files... I will see. I don't think it can be - only - a sound problem. In my test with loose consists memory usage increased also from first to second return to the start station. And in both cases the sound source buffer was full. So it seems that some other thing increased.
James,
I'm sure you'll find something interesting in your checks about viewer parts of trains (and I suspect not only of static trains)!
#28
Posted 19 November 2013 - 06:17 AM
Csantucci, on 18 November 2013 - 12:49 PM, said:
Isn´t there also a Utility out there that will perform this Switch on any existing program? I´ll dig in the swamps of my HD´Ds' Folder structures as I seem to recall I downloaded something like this for MSTS some time ago...
Cheers, Markus
#29
Posted 19 November 2013 - 10:17 PM
#30
Posted 19 November 2013 - 10:53 PM
#31
Posted 20 November 2013 - 06:31 AM
gpz, on 19 November 2013 - 03:55 AM, said:
(Just to make it clear: I am not a pro, just a "wannabe" programmer, so despite of Carlo's big words, what I say is not an analysis, just a thought of a (as we say here) sane peasant brain. So forgive me if I say untrue things sometimes, I believe the pros, no need for a decapitation.)
How about bulk renaming the sms files, so OR can't find them and maybe it won't crash because of this.
#32
Posted 20 November 2013 - 07:14 AM
disc, on 20 November 2013 - 06:31 AM, said:
OK, this seems to be a feasible idea. When I have time I'll try that. I will also use train store to reduce the number of the affected files, just in case.
#33
Posted 20 November 2013 - 09:02 AM
I again run twice back and forth from the big station to the intermediate station. Result: Peter can sleep quietly this night ;) .
Memory usage at game start: 1375; memory usage at first return to big station: 1927; memory usage at second return to big station: -1789 (in reality 2307). With sounds enabled these values were: 1370, 1830 (1891 in another run), -1794 (in reality 2302).
So:
1) the problem remains 100% there even without sound
2) (less important) most likely OpenAl sound source buffers eat memory somewhere not monitored by James' bar, at least in a /LARGEADDRESSAWARE .exe (I can't believe that sound occupancy is equal to 0).
#34
Posted 20 November 2013 - 03:57 PM
#35
Posted 22 November 2013 - 01:50 AM
your further fix about removal of leaks on TrainCarViewer (rel. 1869) was a great job! I made again the test with the double run back and forth from the big station to the intermediate station.
These were the memory occupancies before your change at game start, on first return to big station, on second return to big station:
1370 MB, 1830 MB, 2302 MB.
With your release 1869 (pls. notice that you haven't changed Revision.txt, that continues showing 1867; I've made the test with a rebuilt version with the /LARGEADDRESSAWARE switch) the memory occupancies are: 1366 MB, 1406 MB, 1407 MB (see picture). In the picture it can be seen from the bar that some seconds before the screenshot memory occupancy was about 100 MB higher; in the first run this was even more (a bit above the critical 1,7 GB threshold), but important thing is that then the value decreased to the original value.

So there are no more leaks! And also no more topping in amount of used Sound source buffers, and no more duplicate sound sources!
I didn't do an accurate test about drawbacks on sound playing, but did not notice strange things as first impression.
This modification together with the public availability of a /LARGEADDRESSAWARE version will reduce to zero for some time complaints about ORTS low memory problems (I hope...).
For testing purposes I attach here the /LARGEADDRESSAWARE version of Runactivity.exe related to release 1870. This version can be replaced and run directly on 64-bit Windows systems. On 32-bit Windows system (that MUST have at least 4 GB RAM) an explanation of what has to be done can be found here: http://usa.autodesk....&linkID=9240617
This should be tried only by expert users of computer. There is no liability from my side if someone destroys his operating system or any other hardware or software item.

Number of downloads: 251