The treatment and reflection of several urgent bugs in the project

Source: Internet
Author: User

"Background"
Project emergency acceptance phase, due to late requirements modification, testing is very inadequate, resulting in a lot of late bugs.
The following bugs are mostly modified at night from 10 o'clock to 5 o'clock in the morning, and the confusion is more about correctness.

"typical Bug and Analysis"
1. The logic handles the issue after the task is paused and restarted.
1) Since the Calc module is calculated and deposited into the database based on the incoming ID value of the inner module, each time the task is paused, the original map container that stored the ID value must be emptied before it can continue to deposit the next value.
2) However, because the outer module and the inner module between the transmission through the Single-direct device, if the program received instructions to clear the map immediately, and the new value into the map also has a bug. The reason for the bug is that the slow transmission of single-direct devices is not considered.
So, the final solution is to read all the ID values from the database, whichever is the database. In this way, it is effective to avoid single-direct device slow problem.

2. Multi-tasking crash issue.
A single-step debug discovery is similar to a buffer on the receiving end causing an overflow. The root cause, however, is that it is difficult to keep track of the problem because it involves many of its own packages and the original author has left the office.
Finally changed the idea, by the original inner module implementation of monitoring and read the operation of the data. Instead, the Inner module is only responsible for listening, and the INNER-CEF module receives the line number emitted by Inner, completing the query and organization of the data. This effectively alleviates the transmission pressure and avoids the problem of transmitting buffer causing overflow.

3. The latest packet internal and external network can not communicate problems.
This problem is caused by a change in the data due to issue 2. When you modify issue 2, the inner module is involved with the INNER-CEF module to pass the data, and the buffer transferred in the original code is set to 64 bytes. With the Buffer150 bytes defined by the line number, I take it for granted that the buffer is immediately modified to 150 bytes.
As everyone knows, the final bug only found that the field 64 definition involves multiple calls, while the other is the use of 64 bytes. and the line number of the query is within 20 bytes, which is more than enough to define a 64-byte buffer.
The fact that the problem has been dealt with in an emergency situation proves the correctness of my thinking. In other words, the change in the situation, can be completely through the Beyondcompare tool than the code or SVN, git to view the change record , to find the root cause of the problem. No need to study the logic of the problem in a short time. Logical problems can take time to study afterwards.

The 4.CEF does not support the PNG uppercase format issue.
It took a long time to write the correspondence between the resource, ID, and path, but still found that the picture could not be loaded when the new package was opened. There are several reasons why this cannot be loaded:
1) The picture does not exist under the Res folder;
2) The image already exists, but the image ID, path information is incorrect, that is, the corresponding relationship error;
3) The picture already exists, but the picture format is not supported. ( hard to find)
Also open the application, see a few icons can open, and the vast majority of the case will not open to think of 3).
The final Discovery program does not support the processing of uppercase PNG image, add a sentence conversion.

5. Statically loading DLLs or dynamically loading DLL differences in the program.
A third-party company's key certificate is used in the program. The company provides two methods for static loading and dynamic loading, and a specification for demo interface usage.
The benefit of dynamically loading DLLs, compared to static loading, is to reduce the dependencies of the program, namely: if the key is upgraded, only the DLL needs to be replaced, our program does not need to compile again.
For static loading, it is necessary to include the. h and. lib files, and any changes to the third-party companies are bound to recompile the project and repack the program.
The new program cannot get the environment variable to set the DLL under the system path, root cause unknown origin.

"Reflection"
1. Make the latest package notes.
1) Packaged programs are the latest version of a single test without bugs.
2) Pack attention to details such as desktop shortcut icon, uninstall Program icon Association, and so on.
3) A single program packaged ensures that the latest RES resources are loaded, with the latest JS and HTML front-end code changes in the RES resource.
2. How do I change the bug in someone else's code to avoid causing the bug again?
1) If the original author is in, the final phone confirmation under the feasibility of the change program.
2) Comb The logic , logic, and then start to write code.
3) Note the interface of the program and the details of the communication level, each modification of the original interface, to see if there is no other interface calls, to avoid changes caused.

2014-11-13 12:29 think about the bed in front of the house

Ming Yi World
Reprint please indicate source, original address: http://blog.csdn.net/laoyang360/article/details/49816107
If you feel this article is helpful, please click on the ' top ' support, your support is I insist on writing the most power, thank you!

Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.

The treatment and reflection of several urgent bugs in the project

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.