Unreal Engine Code Issues Fixed By Third-party Company 72
An anonymous reader writes: Unreal Engine is the famous game engine that was used to implement such games as Unreal Tournament, BioShock Infinite, Mass Effect and many more. On March 19, 2014 Unreal Engine 4 was made publicly available from a GitHub repository. It was a big event for the game development industry. One of the companies that took an interest in this was PVS-Studio, who created a static C/C++ code analyzer. They analyzed the Unreal Engine source code and reported to Epic Games's development team about the problems they found. Epic suggested a partnership with PVS-Studio to fix those bugs, and their challenge was accepted. Now, PVS-Studio shares their experience in fixing code issues and merging corrected code with new updates in a major project that shares its source code.
Problems causing Video effects? (Score:1)
The big question for me is do coding errors affect video rendering issues?
We tend to blame drivers for this, but recently there are opinions out there that suggest that the game code itself is responsible (as well).
Re: (Score:3, Insightful)
Of course they can. If you calculate stupid stuff, the result will be stupid stuff.
Re: (Score:2)
Re: (Score:2, Informative)
Re: (Score:1)
Read the message you are replying to:
The program may work well for years if you are lucky enough that the data of the dead object (stored on the stack) is not overwritten by something else.
FreeBSD nukes the stack when a stack frame is deallocated? I think not.
Re: Problems causing Video effects? (Score:1)
If it is on the stack and it had been destroyed, then you've popped that stack frame already... And can null it out.
Hell, memset SP+1 up to the end of the memory available for your stack on each function, filling it with 0xdeadbeef... Hmm, that rings a bell.
Re: (Score:3)
Only idiots "tend to blame drivers" for that shit.
The vast majority of changes in driver updates for AMD and nVidia are hacks for specific games to fix their broken shit and get them to not run like ass.
Re:Problems causing Video effects? (Score:5, Interesting)
A long time ago, I set up Siege of Avalon (at that point, already a 5 year-old game) and, upon getting to some specific level, found that performance had gone down the toilet. I fiddled around for a while, then (for some reason) called the support number. They told me to update my video card drivers. I told them that the video card drivers were already about 4.5 years newer than the game itself, and so their suggestion made no sense. We debated for a while, but they stuck to their guns. I hung up, frustrated.
Updating my video card drivers fixed the issue.
Re: (Score:2)
I'm guessing the game was coded properly, according to the specifications of the APIs but the older drivers weren't 100% compliant with the specs of those APIs.
Re: (Score:2)
Re: (Score:3)
At least the part about:
The vast majority of changes in driver updates for AMD and nVidia are hacks for specific games to fix their broken shit and get them to not run like ass.
Is quite true I'm afraid. NVidia frequently releases "Game Ready" drivers tuned for a specific game. Usually for high-profile new game releases, such as the Witcher 3 most recently.
This most recent batch of new "Game Ready" drivers fucked up my and other users systems by frequently crashing, causing the driver and the display to reset, sometimes even on the desktop while browsing. Sometimes this happens multiple times within a minute, rendering some games unplayable. This is one of t
Re: (Score:1)
Only idiots "tend to blame drivers" for that shit.
The vast majority of changes in driver updates for AMD and nVidia are hacks for specific games to fix their broken shit and get them to not run like ass.
Yeah, "idiots" like Rich Geldreich, an OpenGL expert that worked at Valve for many years. His scathing assessment on the quality of drivers resulted in widespread news coverage, including a /. article [slashdot.org]. For those of you interested in reading the original post, it's at http://richg42.blogspot.com/2014/05/the-truth-on-opengl-driver-quality.html. Note that most of the other game developers posting in the comments agree with him.
So, which company are you shilling for, sexconker, vendor N or vendor A? Inquir
Re: (Score:1)
I don't have any real experience or hard data with [ the open source AMD and Nouveau ] drivers, because I've been fearful that working with these open source/reverse engineered drivers would have pissed off each vendor's closed source teams so much that they wouldn't help.
Which is just fucking great.
Re: Problems causing Video effects? (Score:4, Interesting)
Re: (Score:2)
Only idiots "tend to blame drivers" for that shit.
I haven't had to go through this in a while, but there was a long time (back in the GEforce single-digit version days) when you would regularly have to reinstall an old driver to play a specific game. It doesn't really matter whether that old driver had a special case that they took out later, or whether they just broke something; either way, driver changes will regularly take out programs. The driver developer can then go blame it on the software developer, but they may well have done it wrong the first ti
Re: (Score:2)
Re: (Score:2)
But guyzz, you forgots about WebGL and JavaScript! Obviously, they all that matter.
Re: (Score:1)
Holy handgrenades!
I have built high end gaming systems that replaced older high end gaming systems ad infinitum. Always the problems of the older systems had to do with speed (texture loading for instance) and rendering high framerates at comparatively low resolutions - just for the sake of hurdling over various 'issues'.
When you realise that there are no bottlenecks in the system but these issues are still present, then you look elsewhere and that elsewhere is coding.
Those AAA games you speak of are the cu
Re: (Score:1)
Not for me porky. I build them for clients. I wouldn't blow $4~6k on a gaming machine.
Re: (Score:2)
Your response was to a programmer telling you what problems there are in the gaming programming world, and you responded "I've build computers and that isn't how it worked". Did it ever occur to you that maybe the AC actually knows more about the subject than you? He used actual programming interface terminology, but maybe he's just blowing smoke up our rears and you know so much more about the subject because you plugged a few boards together and installed Windows.
Re: (Score:1)
I don't get what you're on about. I respect the first AC's comment and I never disagreed with it. How could I? In fact, my followup comment tried to show what opinions are out there currently as far as driver issues and suspicions about game code, what a real system builder is up against when there is money to spare and you have clients who can afford it.
I suppose it's easy to assume that 'I build gaming systems' equates to someone who whacks a few boards together and loads Windows and knows nothing about w
Re:Problems causing Video effects? (Score:5, Informative)
The big question for me is do coding errors affect video rendering issues?
Sure. Just remember that the video driver is a whole bunch of code. It's code all the way down.
Re: (Score:2)
If you haven't encountered hand-soldered transistors, you haven't gone "down" far enough.
Re: (Score:2)
If you haven't encountered hand-soldered transistors, you haven't gone "down" far enough.
Back in high school I built a burglar alarm kit, does that count? It was enough to convince me that what I really wanted to do was use microcontrollers, or better. Now that you can just buy I2C modules and plug them together, I feel relatively vindicated. Someone has to design those things, but it doesn't have to be me.
Slashvertisment (Score:5, Insightful)
Re: (Score:1)
Why do I feel like this is an ad for the code analyzer?
Maybe, because it is one. Tim S.
Re: (Score:3)
Let me quote:
"This activity benefits everyone: readers enjoy learning from others' mistakes and discover new means to avoid them through certain coding techniques and style. For us, it's a way to have more people learn about our tool. As for the project authors, they too benefit by gaining an opportunity to fix some of the bugs."
I added the bold.
Re: (Score:2)
They have some good featured articles [viva64.com]
PVS-Studio: analyzing ReactOS's code
http://www.viva64.com/en/a/007... [viva64.com]
Analysis of Godot Engine's Source Code
http://www.viva64.com/en/b/032... [viva64.com]
Analyzing FreeCAD's Source Code and Its "Sick" Dependencies
http://www.viva64.com/en/b/032... [viva64.com]
Re:Slashvertisment (Score:5, Informative)
I believe you didn't read the link. It was written by PVS staff, and states very clearly that the effort was to promote their product:
As a way of promoting our PVS-Studio static code analyzer, we've thought of an interesting format for our articles: We analyze open-source projects and write about the bugs we manage to find there.
They made it to Slashdot, so the effort was a success on some level. And maybe more people need to be aware of code analyzers (we just enforce code conventions and obvious bad practices).
Re: (Score:2)
They made it to Slashdot, so the effort was a success on some level. And maybe more people need to be aware of code analyzers (we just enforce code conventions and obvious bad practices).
Maybe you should stop enforcing obvious bad practices first? :)
Re: (Score:2)
We're actively working on that, specifically on older systems where habit is more common than good practice ("this is how we have always done it").
Re: (Score:2)
Considering there are tons of bugs [viva64.com] in open source programs ... you might be right :-)
Intel Galileo UEFI analysis (May 2015)
Godot Engine analysis (April 2015)
FreeCAD analysis (April 2015)
Haiku OS analysis: part 1, part 2 (April 2015)
Vim analysis (March 2015)
CoreCLR analysis (March 2015)
LibreOffice analysis (March 2015)
MatrixSSL analysis (February 2015)
Linux kernel analysis (January 2015)
Powder Toy analysis (December 2014)
Spring RTS analysis (December 2014)
Miranda NG analysis: part 1, part 2 (November 2014)
NS
Re:Slashvertisment (Score:5, Informative)
The one review [viva64.com] everyone is interested in ... Linux Kernel (Jan 2015) static analysis!
Other notable ones are:
* LibreOffice [viva64.com]
* Vim [viva64.com]
* Gimp [viva64.com]
* Wine [viva64.com]
* Blender [viva64.com]
* Quake 3 Arena [viva64.com]
* Doom 3 [viva64.com]
* Notepad++ (2012) [viva64.com]
Re: (Score:1)
It's an ad, but it's one of the better ones. It isn't all hype - they demonstrate the effectiveness of their product on code we all have access to.
I learned a few things, too (I haven't touched c++ in awhile, so I guess that isn't a very high bar).
Re: (Score:1)
I definitely didn't get that impression coming through my dell monitor, maybe it was due to the speed it loaded, thanks iinet, anyway I'm thirsty in a way only an ice cold coke can quench.
Sent from windows laptop. ...Seriously everything is one giant marketing exercise nowadays.
Re: (Score:2)
Re: (Score:1)
If PVS' code analyzer can help a developer find bugs that would either go unfound, or would take more $$$ than the cost of the code analyzer to find, then bravo to PVS for making a development tool that not only works, but is priced correctly based on the value it brings to the project.
That PVS then joins an open source project and uses its code analyzer to help identify and fix bugs in the project, with the intent of that activity promoting their product I think is a good thing.
PVS didn't have to do this,
Re: It's an advertisement for their PVS Studio pro (Score:3)
It does make a good case for their product. I look at most of that stuff and think "I have done that" and think how much time has been wasted diagnosing such bugs.
However, what concerns me is the potential noise that is not in the article. I am pretty sure there are a few things that it reports that are actually OK and these things weren't included. Though I admit that I don't know for certain this is the case.
Re: (Score:1)
Re: (Score:2)
Re: (Score:1)
Good question.
If you go though the problems found - non of them are serious - they are error that could potentially cause problems, but don't actually. In general, static code analysis can only improve the code quality marginally.
Re: (Score:2)
Finding a potential problem through static code analysis and fixing it before the release is usually much cheaper than finding the problem in the wild, tracking down the bug, fixing it, and patching everything that's out there.
Re: (Score:1)
I agree.
I did not say you should not use it, just that the type of problems found by static analysis are minor
Re: (Score:1)
That is not workable in practice on a large scale, because it would involve admitting to a defect in a product. If that defect were to cause some actionable tort, the admission would be used to wring the company dry.
Re: (Score:2)
The construct is similar, but not identical. The difference is significant, though.
Re: (Score:2)
Please explain under which condition(s) the code
will dereference a null pointer.
Neat, but over a year old.. (Score:2)
This isn't exactly timely.. this happened march 2014.
Looks like they're avoiding parentheses ... (Score:2)
I can see why one of the MISRA rules states that "limited dependence" should be placed on C operator precedence and expressions should be clarified (to the reader, not to the compiler) by using parentheses.
What's news? (Score:2)
Biggest benefit of static analysis is real time (Score:2)
The problem with articles like this one is that they tend to under-represent the benefits of static analysis. Products like PVS-Studio are designed to work with C++ and because they have to run in a big compile job, they get run in batch at the end of each day.
This is a problem because (a) C++ is very hard to statically analyse so performance is often poor and (b) the most critical time when you need/want static analysis feedback is when you're actually writing the code itself.
So let me insert a plug here f