# \[closed\] Button Compile and Run / Stop

**URL:** https://forum.castle-engine.io/t/closed-button-compile-and-run-stop/1270
**Category:** Bugs
**Created:** [July 16, 2024, 12:06pm UTC](https://forum.castle-engine.io/t/closed-button-compile-and-run-stop/1270 "2024-07-16T12:06:41Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Didi](https://forum.castle-engine.io/user_avatar/forum.castle-engine.io/didi/32/1908_2.png) [@Didi](https://forum.castle-engine.io/u/Didi)
#### Post date: [July 16, 2024, 12:06pm UTC](https://forum.castle-engine.io/t/closed-button-compile-and-run-stop/1270/1 "2024-07-16T12:06:41Z")

</div>

The button “Compile and Run” do not show the right icon and text. This happens when I run the project without open a view.

 ![grafik](https://forum.castle-engine.io/uploads/default/original/2X/f/f58be133ae8318a73564e44f23094c787c34e5b2.jpeg)

Project is running and the button shows “Compile and Run”.  
After clicking the button to stop the program it shows “Stop”.

 ![grafik](https://forum.castle-engine.io/uploads/default/original/2X/8/8c64d8f5ad2b567592227a08bc1528bbcd50111a.png)

I think this should be turned around?

---

<div class="post-metadata">

### Author: ![michalis](https://forum.castle-engine.io/user_avatar/forum.castle-engine.io/michalis/32/3_2.png) [@michalis](https://forum.castle-engine.io/u/michalis)
#### Post date: [July 21, 2024, 1:08pm UTC](https://forum.castle-engine.io/t/closed-button-compile-and-run-stop/1270/2 "2024-07-21T13:08:31Z")

</div>

Indeed, your screenshots show a bug, but I cannot reproduce it – tested now on both Linux and Windows.

Can you reproduce the bug on your side, still? After restarting the editor? Can you reproduce it on any CGE example? If yes, can you maybe record a movie, showing also your mouse cursor? Maybe there’s some flow that “desynchronizes” the action state.

To be clear, just as you say, what _should_ happen (and what _does_ happen in my tests):

- The button should say “Compile And Run” when nothing is running (compilation and application)
- The button should say “Stop” when something runs.

And the above should remain true, no matter how you start / stop (by clicking on the button, by using menu item in “Run”, by using key shortcuts F9 / Ctrl + F2…) and what you do (close, open projects etc). Here are valid screenshots:

 ![Zrzut ekranu z 2024-07-21 15-01-26](https://forum.castle-engine.io/uploads/default/original/2X/b/bb1fcb10300a4f6a31fd5cf9f35f4abd06c24824.png)  
 ![Zrzut ekranu z 2024-07-21 15-02-38](https://forum.castle-engine.io/uploads/default/original/2X/2/2d5222ad2702b82ae4848ec510fd2a6967e41372.png)  
 ![Zrzut ekranu z 2024-07-21 15-02-56](https://forum.castle-engine.io/uploads/default/original/2X/5/5e451b9198e28d7c54c620c6e590c1847df0d26a.png)

---

<div class="post-metadata">

### Author: ![Didi](https://forum.castle-engine.io/user_avatar/forum.castle-engine.io/didi/32/1908_2.png) [@Didi](https://forum.castle-engine.io/u/Didi)
#### Post date: [July 22, 2024, 11:08am UTC](https://forum.castle-engine.io/t/closed-button-compile-and-run-stop/1270/3 "2024-07-22T11:08:28Z")

</div>

now I tried about 30 minutes to reproduce the bug but the error no longer occurred. I’m also not able to reproduce it.  
If it happens again, I’ll try to find the cause. The ticket can be closed.
