aseba-community / aseba

Aseba is a set of tools which allow beginners to program robots easily and efficiently. To contact us, please open an issue.
http://aseba.wikidot.com
GNU Lesser General Public License v3.0
48 stars 62 forks source link

Studio crash #222

Closed cbarraud closed 11 years ago

cbarraud commented 11 years ago

Hi

Good old Matlab reflex, I tried to put a constant to square using "^2" and studio crashed. Here is a piece of code that crashes every time if you put the "^2" after any of the constants:

onevent acc if acc[2] <= THRESHOLD_Z_ACC and (acc[0]_acc[0] > THRESHOLD_LOW or acc[1]_acc[1] > THRESHOLD_LOW) then call leds.circle(0,0,0,0,0,0,0,0) end

Here is the window that opens:

crash_aseba_studio

And then, when I try just to launch studio again, it can't connect to the Thymio. It displays this message:

crash_aseba_studio_2

I managed to reconnect by launching the "Restart USB port" in the tools of Aseba.

I'm on windows 7, Aseba studio 1.2.2 (build ver. git-80758c4 / protocol ver.4)

mbonani commented 11 years ago

it seems that the exculsif or ^ do not work on constant

stephanemagnenat commented 11 years ago

Indeed, this was a missing optimisation in the compiler, it is fixed in commit 7c6bbe1aaab4a1a584525d9514c53d4219329105.