Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why does 'clean' magically fix mysterious bugs in my app?

If I ever have a problem that is not showing up as a warning, but makes my app crash on runtime, sometimes I'll build->clean and often it this unkown bug disappears. This happens mostly when I import new images into the project(replacing old ones) or when I make major syntax changes with my code.

F'in 'Clean all Targets', how does it work?

Thanks

like image 796
DevEarley Avatar asked Jul 26 '10 22:07

DevEarley


People also ask

What is bug fixing in app?

Effective bug fixing can not only make an app more appealing to users, but also benefit the reputation of the company that developed it. You will get the fixed bug that you have and written clean code, that will interact with your customer. Delivery: 21 Days Delivery.

What causes bugs in app?

Bugs in software can arise from mistakes and errors made in interpreting and extracting users' requirements, planning a program's design, writing its source code, and from interaction with humans, hardware and programs, such as operating systems or libraries.

Can apps have bugs?

Have you noticed that even the world's most successful, wealthy developers still get bugs in their apps? Look at products from Google, Microsoft, and Apple, and you will find bugs and errors, occasional crashes, and sometimes even serious security glitches.


2 Answers

When you build for the first time, all of your code is turned into object code. That way when you make a tiny change to one file, you don't have to recompile your whole project, just that one file.

Now sometimes things go funny and stuff doesn't align properly, or dependencies aren't updated and boom crash. The build system is supposed to detect this but every project I've worked on has had this problem at one time or another.

Build clean deletes all the intermediate object code and recompile from scratch.

like image 138
Byron Whitlock Avatar answered Oct 08 '22 23:10

Byron Whitlock


When you clean your project, you force your entire application to recompile itself. Maybe one of your resources was compiled into your application in a way that required you to recompile everything when changing the resources?

What sort of application are you building - do you use threads? I would make sure they aren't race conditions, because their trademark symptoms are sporadic non-reproducible errors.

like image 28
sholsapp Avatar answered Oct 08 '22 23:10

sholsapp