[Fixed]1.8.5 Application crash on divby0

If you have problems installing or running Algodoo, have found a bug or need in-game help - this is it!

[Fixed]1.8.5 Application crash on divby0

Postby Kilinich » Tue Feb 22, 2011 10:34 pm

Edit: (by tatt61880 on 2011.05.15 19:11)
Fixed at v1.9.4. Thanks! :thumbup:

-Tatt
----


How to reproduce:

Draw box
Open script window
Set color to [0.1/0,1,1,1]

Algodoo program will just crash without errors/warnings in log.
Dream of Algodoo as game development engine...
User avatar
Kilinich
[Best bug reporter 2010]
 
Posts: 2098
Joined: Mon Aug 31, 2009 8:27 pm
Location: South Russia

Re: 1.8.5 Application crash on divby0

Postby TC42 » Tue Feb 22, 2011 10:38 pm

Of course it crashes; you can't divide by 0!!

But then again, you are Kilinich, so maybe you can :think:
That is a good bug find; how did you come across it?
Also, you RaRa and Paradigm are all online at once! Awesomeness will ensue.
Image
Spambot wrote:Nowadays, memes usually are studied less in the field of biology, but more with the arena of psychology along with sociology. But, the major area of a meme, getting embraced and imitated all the time is what’s at any core connected with any meme.
User avatar
TC42
 
Posts: 984
Joined: Sun Jan 09, 2011 1:53 pm
Location: $ sudo apt get-install sandwich_

Re: 1.8.5 Application crash on divby0

Postby electronicboy » Tue Feb 22, 2011 11:18 pm

you can divide by zero, but you only get what you want to divide 0 with... Unless your in algodoo
When asking for help, READ THE STICKIES!
electronicboy
 
Posts: 1694
Joined: Mon Aug 31, 2009 6:18 pm

Re: 1.8.5 Application crash on divby0

Postby TC42 » Tue Feb 22, 2011 11:43 pm

Depends on how you think about it. If you think about it as writing it out by hand, try 5/0. The answer is somewhere above +inf. :?
But if you think about it from the 1st grade perspective, you take one candy-bar, and divide it into zero pieces and you still have one candy bar.

:wtf:
Image
Spambot wrote:Nowadays, memes usually are studied less in the field of biology, but more with the arena of psychology along with sociology. But, the major area of a meme, getting embraced and imitated all the time is what’s at any core connected with any meme.
User avatar
TC42
 
Posts: 984
Joined: Sun Jan 09, 2011 1:53 pm
Location: $ sudo apt get-install sandwich_

Re: 1.8.5 Application crash on divby0

Postby electronicboy » Wed Feb 23, 2011 12:12 am

you would use the second one.

5/0 = 5
When asking for help, READ THE STICKIES!
electronicboy
 
Posts: 1694
Joined: Mon Aug 31, 2009 6:18 pm

Re: 1.8.5 Application crash on divby0

Postby Kilinich » Wed Feb 23, 2011 1:47 am

oh common, please stop buzzing, game just shouldn't crash, no matter what. :|
Dream of Algodoo as game development engine...
User avatar
Kilinich
[Best bug reporter 2010]
 
Posts: 2098
Joined: Mon Aug 31, 2009 8:27 pm
Location: South Russia

Re: 1.8.5 Application crash on divby0

Postby Chronos » Wed Feb 23, 2011 2:54 am

Kilinich wrote:oh common, please stop buzzing, game just shouldn't crash, no matter what. :|

Kilinich, what you're doing is ripping a hole in the universe. What Algodoo is doing by crashing is preventing that. You should be glad, because thanks to it crashing, nothing got destroyed. :P

Also, when dividing by 0, 0 can go into anything an infinite amounts of times.
TheWinkits wrote:They both looks of cuking amazing
User avatar
Chronos
[Most Active Member 2010]
 
Posts: 4457
Joined: Mon Aug 31, 2009 6:00 pm
Location: Californania

Re: 1.8.5 Application crash on divby0

Postby electronicboy » Wed Feb 23, 2011 8:06 am

true, but i thing that the method where
5/0 = 5
Would be the most prefaired method, as that is what we are tought in schools
When asking for help, READ THE STICKIES!
electronicboy
 
Posts: 1694
Joined: Mon Aug 31, 2009 6:18 pm

Re: 1.8.5 Application crash on divby0

Postby Kilinich » Wed Feb 23, 2011 11:11 am

electronicboy wrote:true, but i thing that the method where
5/0 = 5
Would be the most prefaired method, as that is what we are tought in schools


5/0 == +inf
0/0 == NaN
Dream of Algodoo as game development engine...
User avatar
Kilinich
[Best bug reporter 2010]
 
Posts: 2098
Joined: Mon Aug 31, 2009 8:27 pm
Location: South Russia

Re: 1.8.5 Application crash on divby0

Postby Bitterkoekje » Wed Feb 23, 2011 11:23 am

To be exact
0/0 = ℝ
because
0/0 = 1
and
0/0 = 2
and
0/0 = 42
and
0/0 = 1337
why?
6/3 = 2
because
2*3 = 6
so
0/0 = ℝ
because
ℝ*0 = 0
Bitterkoekje
 
Posts: 1
Joined: Tue Feb 22, 2011 3:57 pm

Re: 1.8.5 Application crash on divby0

Postby TC42 » Wed Feb 23, 2011 10:46 pm

This divide-by-zero should have its own thread.

But still, algodoo shouldn't crash for anything!
Image
Spambot wrote:Nowadays, memes usually are studied less in the field of biology, but more with the arena of psychology along with sociology. But, the major area of a meme, getting embraced and imitated all the time is what’s at any core connected with any meme.
User avatar
TC42
 
Posts: 984
Joined: Sun Jan 09, 2011 1:53 pm
Location: $ sudo apt get-install sandwich_

Re: 1.8.5 Application crash on divby0

Postby Someone Else » Wed Feb 23, 2011 11:06 pm

There are indeed many ways to look at dividing by zero.

If you break a candy bar into two pieces, each piece is half a candy bar. So, if you break a candy bar into zreo pieces, then... HEY! YOU HAVE NO CANDY BAR! So, X / 0 = 0.

Say you have a box that is five inches high. If you fill it with sheets of foam that are 1 inch high, you need 5 of them. If you fill it with sheets of graphene that are 0 inches thick, you need INFINITELY MANY OF THEM. So, X / 0 = +inf.

Now, let's say you graph the function Y = X / X. You get a horizontal line at Y = 1, with a hole at X = 0. Fill this hole and you get 0 / 0 = 1.

That last result is also consistent with the box example- a box 0 inches high will fit one 0 inch sheet of graphene.

If anyone has any more ideas on how to look at dividing by 0, let me know. And Algodoo should crash if you create a box that spawns a clone of itself onCollide. And we do not need another topic.
Matthias Wandel is epic, in my humble opinion.
I love my brain...
TC42 wrote:Also, your sig is too big, please change it.

ARE YA HAPPY NOW?????

Thymechanic/Phundamentalist

Recently, I discovered something a lot of you probably already knew: Minecraft is awesome.
Due to this, I may not be as active as usual for a while.
User avatar
Someone Else
 
Posts: 1147
Joined: Sun Nov 21, 2010 10:53 pm
Location: The Milky Way Galaxy

Re: 1.8.5 Application crash on divby0

Postby TC42 » Wed Feb 23, 2011 11:15 pm

Someone Else wrote: And Algodoo should crash if you create a box that spawns a clone of itself onCollide.

Only if the collideset is the same.
Image
Spambot wrote:Nowadays, memes usually are studied less in the field of biology, but more with the arena of psychology along with sociology. But, the major area of a meme, getting embraced and imitated all the time is what’s at any core connected with any meme.
User avatar
TC42
 
Posts: 984
Joined: Sun Jan 09, 2011 1:53 pm
Location: $ sudo apt get-install sandwich_

Re: 1.8.5 Application crash on divby0

Postby Kilinich » Thu Feb 24, 2011 12:55 am

Please stop that offtopic. :|

p.s. Schoolboys, you can learn about infinity later in university or take a quick look to wikipedia
http://en.wikipedia.org/wiki/Limit_of_a_function
Dream of Algodoo as game development engine...
User avatar
Kilinich
[Best bug reporter 2010]
 
Posts: 2098
Joined: Mon Aug 31, 2009 8:27 pm
Location: South Russia

Re: 1.8.5 Application crash on divby0

Postby emilk » Tue Mar 08, 2011 3:02 pm

Bug shall be fixed in the next version. It is, btw, a general problem with attributes given the value NaN. In this case, the NaN:s come when converting +inf RGB:s to HSV:s
Emil Ernerfeldt, lead developer
emilk
 
Posts: 616
Joined: Mon Aug 31, 2009 11:01 am
Location: Umeå, Sweden


Return to Help / Bug reports

Who is online

Users browsing this forum: No registered users and 3 guests