ValveSoftware / Source-1-Games

Source 1 based games such as TF2 and Counter-Strike: Source
631 stars 73 forks source link

[L4D1] Game Compiled In Debug Mode And Large Address Aware Off #3446

Open TheRenegadist opened 3 years ago

TheRenegadist commented 3 years ago

We're not sure when this happened but it seemed to have possibly happened after a recent bug fix/exploit fix update around 2016 and on the game was compiled in debug mode and accidentally left on when the update was pushed to customers. We know this because when the game runs out of memory an assert prompt appears showing that the game is out of memory leading to the second half of the issue. Unfortunately this would mean that the entire game would have to be recompiled to fix it.

We're also not sure when this became an issue but alongside the game being left in debug mode the game was also left with large address aware being left off meaning that the game is only allowed to access half of the available memory being 2GB instead of the full 4GB, Left 4 Dead 2 currently works correctly allowing the full 4GB of memory. This can be easily fixed without recompiling the game by switching out or patching l4d.exe to use the full 4GB/Large Address Aware on, patching the .exe is extremely easy to do because all that is needed is to change one flag in the .exe to allow the full memory without recompiling or touching the code. Members of the community have already done so themselves to fix the issue but fixing it officially on your end would be beneficial to everyone because not everyone knows about this and will continue to crash when the game attempts to use more than 2GB of memory.

As far as reproducing the LAA being off issue, it isn't exactly a specific issue that happens after certain events, it's more of a global issue that can happen at any time but usually occurs after loading into a new level. The issue can appear more often in custom campaigns as well but isn't limited to that, anything that consumes more memory than the game can handle and it will throw the assert up.

Here is an image of the assert window itself, this shows debug mode is on: https://i.imgur.com/1IReDie.png

The Large Address Aware issue can be checked via the "mem_dump" command in console, here you can see an example of before and after the .exe was modified by a community member to include the full memory:

Before LAA Off: https://i.imgur.com/1YwwCj1.png

After LAA On: https://i.imgur.com/bgkDXVa.png

Here is the tool needed for modifying the .exe to use the full memory/LAA On without having to recompile the game: https://ntcore.com/?page_id=371

I created this after my initial post when I didn't have all the information, you can find it here: https://github.com/ValveSoftware/Source-1-Games/issues/2646

This has also been similarly referenced in another issue not by another user which can be found here: https://github.com/ValveSoftware/Source-1-Games/issues/3350

Here are some examples of other people reporting the memory error on the Steam forums for the game: https://steamcommunity.com/app/500/discussions/search/?q=Out+of+memory&gidforum=882957625847162774&include_deleted=1

AshThe9thSurvivor commented 3 years ago

All this is really true, it is a bug that affects the game a lot, unfortunately VALVE has not done anything to solve it, but I hope that if they can do it, since they do not accept our community updates from L4D1, at least doing this would be very grateful.

Now that I also remember here I asked for more edicts to be added to the game, since the default ones are very few, maybe the amount they use in Garrys Mod would be perfect.

JJL772 commented 3 years ago

The assert dialogue is not debug only. The game is probably built with release asserts enabled, and Valve has done this with CSGO at one point before. If this was compiled in debug mode, you'd be experiencing significant performance issues.

TheRenegadist commented 3 years ago

The assert dialogue is not debug only. The game is probably built with release asserts enabled, and Valve has done this with CSGO at one point before. If this was compiled in debug mode, you'd be experiencing significant performance issues.

It depends on how significant we're talking because without Multicore Rendering on the game seems to heavily drop in performance and this is on a beefy rig being a 1070, i7 7700k, and 8GB of RAM. I'm sure it's exponentially worse for anyone below this. Keep in mind I don't use Multicore in Left 4 Dead 2 and I get amazing performance and that's in a more resource intensive game. Seems to me it's in debug mode.

Even if this is the case this shouldn't detract from the LAA issue.

AshThe9thSurvivor commented 3 years ago

In all this there is reason, whatever the factor, it does not mean that the error does not exist, I and 98% of my friends suffer this error, VALVE has to do something, L4D2 has already had time, L4D1 also needs its maintenance.

dragokas commented 3 years ago

Marking executable as /LARGEADDRESSAWARE is not enough to receive a safe code on the end. Yes, you can do this, but be aware of possible crashes related to incorrect pointers calculation. E.g., see: https://devblogs.microsoft.com/oldnewthing/20040812-00/?p=38183

I agreed, it's been a while, Valve didn't update L4D1. Many things that work well on L4D1, doesn't work at all in L4D2 (at least, see my opened issues). IMHO, if the improvements will be just the same terrible, it’s better not to touch L4D1 at all.

JJL772 commented 3 years ago

It depends on how significant we're talking because without Multicore Rendering on the game seems to heavily drop in performance and this is on a beefy rig being a 1070, i7 7700k, and 8GB of RAM. I'm sure it's exponentially worse for anyone below this. Keep in mind I don't use Multicore in Left 4 Dead 2 and I get amazing performance and that's in a more resource intensive game. Seems to me it's in debug mode.

If the performance sucks that badly, I think you're correct about it being built in debug, or at least built with a lower optimization level. It's highly unlikely that this is unintentional, though. Compiler bugs are pretty common with MSVC (especially related to optimization), so they might've encountered one and disabled optimizations (or built in debug) as a workaround. In the event that it is a compiler bug, it could take a while to find and fix the bug.

LAA is probably in the same boat too. Highly doubt that they accidentally disabled it because that would require changing some of the base VPC scripts.

AshThe9thSurvivor commented 3 years ago

Marking executable as /LARGEADDRESSAWARE is not enough to receive a safe code on the end. Yes, you can do this, but be aware of possible crashes related to incorrect pointers calculation. E.g., see: https://devblogs.microsoft.com/oldnewthing/20040812-00/?p=38183

I agreed, it's been a while, Valve didn't update L4D1. Many things that work well on L4D1, doesn't work at all in L4D2 (at least, see my opened issues). IMHO, if the improvements will be just the same terrible, it’s better not to touch L4D1 at all.

That is exactly what I wanted to talk about, because there are no updates to VALVE games, including L4D, it is our fault and VALVE's, why? VALVE is the owner of the game, he is the creator of the game, the one who can do and undo, and their excuse is that it is difficult to manipulate the old engines, because they do not understand them, or that they lost some code and can no longer correct it, that is an excuse, and it is an excuse of lazy people, as I said well they can do and undo, if your engine is old, or the code they do not understand, then why not do it again, because they do not rewrite the whole game with a more understandable and easy to manipulate code, they do not do it because they are simply lazy, they do not want to do anything, and if an error appears they do not want to correct it, they prefer not to touch anything. Probably some creator of the game or games read this, and will say: he is crazy, he does not know what he is talking about, creating everything again, it is complicated .. And he is right, I do not say that it is not, and if I know what I speak, I have been creating unofficial updates for L4D1 for 5 years, and in those 5 years I have lost my files 2 times, that means, that 2 times I have had to do everything again, did it take me a long time? Yes, it did, it took me a long time to do it, but I did it much faster than the last time, and even much better, I did not give up and throw everything away, but the VALVE workers are too lazy to do everything or change everything. code for something easier to manipulate; And now why is it our fault? Because we accept everything that VALVE says, if they say they lost a code, we remain silent, if they say that if they manipulate something they can spoil something else, we remain silent , and so on, I say again, they are the owners, they can do it, write everything with a code that is easier to manipulate, it will not take them long if they are already clear on how to play the game, if they already know what they have to do, This is not a beta game that they have to constantly modify, it is an established game of which they know each value and they know what they have to put, that makes it easier for them to make the code, but I say again, they are simply lazy.

AshThe9thSurvivor commented 3 years ago

By the way, here is something for the VALVE workers, I am a Stomatologist, I am not a programmer, I just studied the game files, and checked each game forum to be able to make my updates that weigh approximately 9GB, if a Stomatologist can make an update unofficial, you who studied to program can do it better and faster.

dragokas commented 3 years ago

The matter of money. You are doing it for a hobby. They are doing for money. If they know they won't get monetary gain, and the bug will not greatly affect their prestige (unlike security issues), so they will not probably fix that. The financing of this game has been closed a long time ago. PS. Hello from the lawyer :D

AshThe9thSurvivor commented 3 years ago

The matter of money. You are doing it for a hobby. They are doing for money. If they know they won't get monetary gain, and the bug will not greatly affect their prestige (unlike security issues), so they will not probably fix that. The financing of this game has been closed a long time ago. PS. Hello from the lawyer :D

There is money, and there would be more if they took the time to improve and really create, believe me that if they gave me the opportunity to talk with them and work on an update of L4D1, they would have as much money as CSGO gives them, if there are things that I have not added in my update, it is because I have limits and restrictions, but if they listen to me and together we work for something better, they would have money in for a long, but very long time.

NOTE: All this I say because I have many ideas in mind, innovative ideas for the game and things that have never been done before, obviously with constant money input, ideas that I have not been able to specify in my updates due to the limits.

AshThe9thSurvivor commented 3 years ago

The matter of money. You are doing it for a hobby. They are doing for money. If they know they won't get monetary gain, and the bug will not greatly affect their prestige (unlike security issues), so they will not probably fix that. The financing of this game has been closed a long time ago. PS. Hello from the lawyer :D

There is money, and there would be more if they took the time to improve and really create, believe me that if they gave me the opportunity to talk with them and work on an update of L4D1, they would have as much money as CSGO gives them, if there are things that I have not added in my update, it is because I have limits and restrictions, but if they listen to me and together we work for something better, they would have money in for a long, but very long time.

NOTE: All this I say because I have many ideas in mind, innovative ideas for the game and things that have never been done before, obviously with constant money input, ideas that I have not been able to specify in my updates due to the limits.

This would not be like the update to L4D2, which only has the name of update, but it seems like a robbery to L4D1, stealing a map, sounds, models, textures, color palette, truly a waste of opportunity for an update, this would also break With the stereotype that the sequel must be better, that is, apart from bringing new things that nobody has done in a game, L4D1 would be the first to break stereotypes, a great novelty in the video game industry, and that this would be more than just a winning bet for VALVE.

TheRenegadist commented 3 years ago

The matter of money. You are doing it for a hobby. They are doing for money. If they know they won't get monetary gain, and the bug will not greatly affect their prestige (unlike security issues), so they will not probably fix that. The financing of this game has been closed a long time ago. PS. Hello from the lawyer :D

I would argue this is something that will affect their image considering people are crashing with unmodified games, essentially Valve is selling a broken game on Steam. I know Valve doesn't give two shits about the original Left 4 Dead considering there's not even a tag on here for it but it would be nice if maybe they showed some goodwill for this old game because surprisingly people still play it and although it's not as popular as Left 4 Dead 2 I will always prefer the original game more and I know I'm not the only one.

AshThe9thSurvivor commented 3 years ago

I don't know what the VALVE guys are doing, every L4D2 bug report is attended to and they're constantly updating the game, but we L4D1 report bugs and we don't receive any updates at all, don't tell me it's because it doesn't make you money for that TF2 gives them a lot, and in more than 5 years they have not corrected the GUI of the dedicated server and we have to use this: https://gamebanana.com/gamefiles/4964

TheRenegadist commented 3 years ago

Welp, no surprise here, even if the community does all the legwork Valve will never fix the issue because Left 4 Dead was DOA after the last campaign update. Many thanks.

AshThe9thSurvivor commented 2 years ago

And until today there is no solution for this, what is the company waiting for? the community does all the work, and what does VALVE do?

Diggingwolf2605 commented 2 years ago

I can get this error every once in a while but it doesn't happen to me often. This is just to show you that Valve doesn't care about the original Left 4 Dead because they only update the second game simply because more people are playing it. Hopefully they actually pay attention to these issues and actually do something about it instead of just ignoring them.

AshThe9thSurvivor commented 2 years ago

I can get this error every once in a while but it doesn't happen to me often. This is just to show you that Valve doesn't care about the original Left 4 Dead because they only update the second game simply because more people are playing it. Hopefully they actually pay attention to these issues and actually do something about it instead of just ignoring them.

Before the update "The Last Stand", L4D1 and L4D2 had the same number of simultaneous players, 14000, after the update L4D1 was reduced and L4D2 increased, this only proves what I said long ago, if the game is running out of people, it is because of VALVE, because it does not correct the errors, because it does not update the maps, the game has many errors in the maps.

They say they don't update the game because they don't want to touch the engine, so don't touch the engine, when updating the maps they won't touch the engine, when improving the models they won't touch the engine, when changing the main menu they won't touch the engine, when adding new maps they won't touch the engine, when recompiling the "left4dead.exe" file with a consumption of 4GB instead of 2GB they won't touch the engine, they just make excuses.

worMatty commented 2 years ago

I really sympathise with your frustration, as TF2 stuff is pretty much my life outside of work (sad I know), but I don't think this issue tracker is a good place to let it out. It's only going to the email inboxes of other frustrated customers and doesn't provide any additional info pertinent to the issue. Your time would be better spent complaining on community forums and in chat rooms.

AshThe9thSurvivor commented 2 years ago

I really sympathise with your frustration, as TF2 stuff is pretty much my life outside of work (sad I know), but I don't think this issue tracker is a good place to let it out. It's only going to the email inboxes of other frustrated customers and doesn't provide any additional info pertinent to the issue. Your time would be better spent complaining on community forums and in chat rooms.

I present the problems in all the places where I can, and what better here, which is where the creators supposedly review, and make the corrections, I say supposedly because at least they have never paid attention to me, not one of the Bugs I have reported have been fixed.

But the community will not sit idly by, many of the errors I have corrected myself, and I even made an unofficial update for the game, we are not VALVE, we do our part.

JayBoom commented 1 year ago

Still getting the out of memory bug https://github.com/ValveSoftware/Source-1-Games/issues/2646

mastercoms commented 8 months ago

The Left 4 Dead 1 binaries are compiled in Release mode. You can check this in the strings of the engine.dll. So this is only a LAA issue, and perhaps release asserts flag.