📜 ⬆️ ⬇️

After connecting the reboot, the program no longer works.

After the publication of the article " Grounded Pointers ", a lot of comments were made to it. It was noted, among other things, that various devices often come with strikingly poor-quality assistive software. Sometimes it is quite annoying. However, I'm not going to grumble. I want to tell a funny story on this topic.



I was still a student and worked as a programmer in one organization. The main activity is numerical modeling. Programs are packages for calculating all sorts of different things, as well as visualizers of the received data.
')
Now the story itself. I sit and calmly program. A physicist colleague from the next room approaches me. At the same time, he has a strange facial expression and a suspicious unhealthy smile. He makes a serious face and declares: “I’m offering our wonderful program ABCD to contact the developer, and here I’m here.”

In general, I understand everything at once. If the program crashes, then it displays a message in the spirit of "Please contact the developer." Since I was one of the developers of ABCD, he came to my soul. But where does this strange smile come from, and why not just a bug in the bug tracker ... However, I don’t really think about this topic and go with it.

The picture is classic. The program with a window about the fall. Eka nevidal. Just do not think that the program crashes every 5 minutes. But there is no point in surprising this situation either. I ask - "What did you do?".

It breaks into a smile and the following dialogue takes place between us:

- I am a new UPS (uninterruptible power supply unit connected). Now the program no longer starts. Immediately after the launch falls.

- Um. What else did you do?

- Nothing.

- Haha. Well, yes, of course ... Before connecting the UPS, it means it worked, but after that it did not.

The colleague breaks into even more smile: “Exactly! Look, I'll show the focus now. ”

He turns off the computer. Climbs to the table. Tinkering there. Changes the cable from the UPS to the wire just from the outlet. Turns on the computer. Launches our program. She successfully works.

Turns off the computer. Climbs under the table again. Connects the wire from the UPS. Turns on the computer. Smiling nowhere, runs the program. The program crashes right after the start!

It was a shock. Perhaps I have never been in such confusion, working with computer technology.

Of course, then everything cleared up. About this will be lower. And the reason for this behavior seems banal.

However, at that very moment, I began to doubt that I understood the principles of computer operation and basic physical laws. The joke, about the curvature of bits in the wire, at that moment seemed to me not such a joke.

Perhaps it was one of the strongest impressions I received from the computer. I do not even know what to compare. I experienced similar feelings when experimenting with the Apogee, the BK01 discovered that they can be controlled simply by holding up a hand. It is enough to read and process noise from input-output ports that are not connected to anything (I don’t remember how to call them).

I don't know if I could convey my feelings with words now. Try to imagine when the program that you know well, works from the network and does not work through the UPS.

But it turned out all simple. It was not a magical low power from a defective UPS. These were not twisted bits.

The reason for the magic and my surprise was poor software. Yes, even a colleague was byakoy, who initially hid one important detail from me, without giving it any meaning.

Not only was the UPS connected to the computer. Along with him was a CD with software and USB-wiring to connect this uninterrupted power supply to the computer. The program on the disk allows you to do all sorts of things. For example, you could click on its icon in Systray and see the battery charge. It is important that he also installed this program. Just.

And the consequences were fatal. This wonderful program, dangling in Systray, knocked out not only our program, but as it turned out a little later, many other applications. How did she manage to do this? Ha, govnokodery capable and not like that!

Research into the cause of the crash revealed that the OpenGL subsystem stopped working. But does our program really use OpenGL so much? Not. Other OpenGL programs broke down. For example, Quake stopped working. Or some other "shooter". I do not remember already. Yes, yes, sometimes after work we killed each other in the virtual world. Students

This G-program for UPS, in order to draw a beautiful round diagram of the percentage of charge, for some reason, used OpenGL. And she did this unceremoniously. After launch, she immediately devoured all the OpenGL resources. As a result, OpenGL used only this monitoring program, leaving others a cookie. And it doesn't matter whether you looked at her beautiful picture or not. All resources have been exhausted. What exactly she did was forgotten after a long time ago. And the general meaning is as follows. She infinitely created some OpenGL objects and did not release them. Instantly, such objects ended, but the program did not care. She herself worked fine. But other programs could not create any such object. Instead of descriptors, they received error status.

If the UPS was turned off, but the USB wiring and the program were left, the error disappeared. Probably, the program saw that there is no bespereboynik and worked somehow differently. This is what my colleague showed me, hesitating my sense of the reality of the world.

The result was a more accurate diagnosis of such errors in our program and the rejection of a “miracle-yuda” to visualize the status of the UPS.

Here is the software, sometimes delivered in addition to the device.

Source: https://habr.com/ru/post/191824/


All Articles