6 ms·
The more I see of what goes on under the covers, the more surprised I am that anything works at all. As an example, every gtk+ program I run spews thousands of
by zeveb 10y ago
The more I see of what goes on under the covers, the more surprised I am that anything works at all. As an example, every gtk+ program I run spews thousands of errors to the console. Why? Are they bad? The programs seem to run anyway, never crashing more than one would expect. So … why the console spam?
- JonnieCache 10y agoThey're probably warnings rather than errors.
- ryandrake 10y agoSo? If they indicate a problem or potential problem, they should be fixed in the software. The fact that there is a "warning" message means that someone, somewhere thought it serious enough to write home about. If they don't indicate a potential problem, then why even print them? Think about how you're supposed to treat compiler warnings: You don't ignore them--they are there for a reason. Quite the opposite--you should use your compiler to treat warnings as errors, enforcing good development practice from the start. The grandparent's comment was about the surprise and concern you feel when you see all of these warnings yet things still evidently "work". When I sit down to a new project, pull down the latest code, start to work with it and see thousands of compile-time and run-time warning messages, the alarm bells start going off in my brain: This project is barely held together.
- bb88 10y agoIt's a deprecation strategy. The warnings are typically for things that will break in the future. GTK can't control yet alone offer patches for the 1 million + programs that depend upon it as a library.
- rhubarbquid 10y agoPrinting those warnings to every end user isn't particularly useful though...
- cpach 10y agoTo be fair, most X applications are not launched from a terminal.
- iqisracist 10y agoGo fix them then
- qwertyuiop924 10y agoRead SQLite's FAQ on that. Given, most projects aren't as amazing as SQLite.
- allendoerfer 10y agoI get some compiler warnings when I compile SQLite. Isn't this a problem? Doesn't it indicate poor code quality? Quality assurance in SQLite is done using full-coverage testing, not by compiler warnings or other static code analysis tools. In other words, we verify that SQLite actually gets the correct answer, not that it merely satisfies stylistic constraints. Most of the SQLite code base is devoted purely to testing. The SQLite test suite runs tens of thousands of separate test cases and many of those test cases are parameterized so that hundreds of millions of tests involving billions of SQL statements are run and evaluated for correctness prior to every release. The developers use code coverage tools to verify that all paths through the code are tested. Whenever a bug is found in SQLite, new test cases are written to exhibit the bug so that the bug cannot recur undetected in the future. During testing, the SQLite library is compiled with special instrumentation that allows the test scripts to simulate a wide variety of failures in order to verify that SQLite recovers correctly. Memory allocation is carefully tracked and no memory leaks occur, even following memory allocation failures. A custom VFS layer is used to simulate operating system crashes and power failures in order to ensure that transactions are atomic across these events. A mechanism for deliberately injecting I/O errors shows that SQLite is resilient to such malfunctions. (As an experiment, try inducing these kinds of errors on other SQL database engines and see what happens!) We also run SQLite using Valgrind on Linux and verify that it detects no problems. Some people say that we should eliminate all warnings because benign warnings mask real warnings that might arise in future changes. This is true enough. But in reply, the developers observe that all warnings have already been fixed in the builds used for SQLite development (various versions of GCC, MSVC, and clang). Compiler warnings usually only arise from compilers or compile-time options that the SQLite developers do not use themselves. https://www.sqlite.org/faq.html#q17 https://www.sqlite.org/faq.html#q17
- NotSammyHagar 10y ago
- kevin_thibedeau 10y agoIt makes launching Gtk+ apps from the console a major annoyance since you get the warning spam at random times while you may have been doing something more important. It would be nice if they'd just quiet up and add a verbose warnings option for the devs.
- ensiferum 10y agoI think not a single actual application is completely well formed. They all work on luck. Especially in the embedded world. Btw, my android just rebooted.
- smilekzs 10y ago"In the embedded world" covers a huge area, including mission-critical avionics code, which likely has much higher safety standard than, say, Android.
- hexane360 10y agoAlthough from hearing about the Apollo Guidance Computer, it's just as much of a miracle they were able to get it to work without any debugging or compilers, with basically one shot to write the program to ROM.
- roberthensing 10y agoWell they put in an effort of 1400 man years for just the software. They even built an interpreter, because (flight/trajectory) requirements were changing all the time. Also: "The highest level of testing was performed with a high fidelity digital simulation of the computer, spacecraft hardware, and mission environment." http://klabs.org/history/history_docs/mit_docs/1711.pdf http://klabs.org/history/history_docs/mit_docs/1711.pdf
- swah 10y agoAnd the architecture of the whole system is commonly an infinite while loop.
- smilekzs 10y agoNot necesarily. RTOS is gaining market.
- r00fus 10y agoWow. How do you put up with that kind of behavior from such a mission critical device like a phone?