BUG modification record

Source: Internet
Author: User

The company that just entered the present has taken over a legacy project with frequent bugs. It has been working overtime for the past week to change bugs and is physically and mentally exhausted. For the present, it will not be plagued by the same bugs in the future, let's record it.

 

1. when designing a field in the database, it is best to set the default value for int and Other types. When performing type conversion in C #, you must determine whether the value is null. This is a common problem in the current project, all the changes have to vomit blood.

 

2. When the code is updated to the server and only the dll file is uploaded, if no local error is reported and an error is reported on the server, upload the page file first.

 

3. Do not upload the. cs file when uploading code to the server. If the. cs file is uploaded and the program runs, the uploaded. cs file code is executed directly, instead of the dll code in the bin directory. So if you find that the program has not changed after you have modified the program and uploaded the dll, you can check whether the. cs file exists in the modified file directory on the server. This problem plagued me for one afternoon + half a night. I also accidentally discovered that the. cs file exists on the server, and the program is OK after deletion.

 

4. when ckeditor + ckfinder was used, the Test Response said that the server image could not be browsed. clicking the Browse server image button was completely blank. After debugging, it was found that data was returned on the page, only css hidden attributes are added, and the page is messy, various searches, and various configurations are fruitless. Download the latest version from the official website. After simple configuration, OK.

 

5. When debugging a program, click a button. If you cannot execute the Set breakpoint, F11 single-step debugging is a good option.

 

6. the Test Response and the data added to the backend cannot be displayed. I am not familiar with the business. I can only view the code step by step in the program. The efficiency is slow, various reminders, and the pressure is high, it is a headache. To solve this problem, open the SQL event probe and find and execute SQL. If the SQL statement does not report an error, analyze the SLQ statement and find that it is in the test data: When you select the time range for the product to be shelved, it is already an expiration time, and of course there will be no data.

 

7. the excel export function is available in the project, and an error is reported all the time. The export function uses the 3rd-party component. Colleagues may feel that the 3rd-party component is faulty, but they cannot see the source code, this BUG is always here. But the actual cause is that the folder on the server has no write permission. After adding the File Permission, OK. If the file operation fails, check whether you have the permission first.

 

8. When the shopping cart information is viewed in the background, some of the purchaser's names are correct and some are incorrect. After debugging, it is not a query problem, but a problem occurs during insertion. When the inserted code block is found, the inserted user name is obtained from the session. This code block has some comments, saying that if the session cannot be obtained, the Computer Host Name is obtained, at this point, we can see why some of them are correct and some are wrong. This is because the user name in the session cannot be obtained and the program reports an error. However, this is obviously a BUG. Why cannot the user name be obtained? If the user information is written into the session, the login code block will be viewed immediately after the logon is successful, but the session has been written here, and there is nothing wrong with the registration, after successful registration, the user name is not written into the session. OK after modification. The module that writes data to the session is not encapsulated into a method call, but the user information is written to the session separately during login and registration, so that a BUG may occur if you are careless.

 

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.