First time here? Check out the FAQ!

Ask Your Question
3

Error in SageMath Code which crash my PC

asked 6 years ago

ortollj gravatar image

updated 2 years ago

tmonteil gravatar image

Hi

W10 , SageMath 8.4, Web Browser Edge or Chrome I report this problem because even if it is a code error on my part(QQ,9,9, is misplaced) it is not normal that it systematically crash my PC.

this little simple program made freeze Chrome (same problem with Edge), and then crashed my PC.

forget()
var('pi_1 pi_2 pi_3 pi_4 pi_5 pi_6 pi_7 pi_8 pi_9')
assume(pi_7 > 0)
assume(pi_8 > 0)
# good
m = matrix(QQ,9,9,[   \
# when I uncomment the line below (and comment the line above), then the browser(Edge or Chrome begin to freeze,
#    and after a while my W10 PC crash !!)
# BAD !! Line with ERROR !!!                   
#m = matrix([ QQ,9,9,  \
                [1/3 , 5/9 ,  0  ,  0  , 1/9 ,  0  ,  0  ,  0  ,  0   ], \
                [ 0  , 1/3 ,  0  ,  0  ,  0  ,  0  ,  0  ,  0  , 2/3  ], \
                [ 0  ,  0  , 1/3 , 1/3 ,  0  ,  0  , 1/3 ,  0  ,  0   ], \
                [ 0  ,  0  , 1/2 , 1/4 ,  0  ,  0  ,  0  , 1/4 ,  0   ], \
                [ 0  ,  0  ,  0  ,  0  , 3/4 , 1/4 ,  0  ,  0  ,  0   ], \
                [ 0  ,  0  ,  0  ,  0  , 2/3 , 1/3 ,  0  ,  0  ,  0   ], \
                [ 0  ,  0  ,  0  ,  0  ,  0  ,  0  ,  1  ,  0  ,  0   ], \
                [ 0  ,  0  ,  0  ,  0  ,  0  ,  0  ,  0  ,  1  ,  0   ], \
                [ 0  ,  0  , 2/3 ,  0  ,  0  ,  0  ,  0  ,  0  , 1/3  ]  \

 ])
v=vector([pi_1,pi_2,pi_3,pi_4,pi_5,pi_6,pi_7,pi_8,pi_9])
eqT=[]
for i in range(0,len(v)):
    eqT.append(m[i]*v==v[i])
eqT.append(sum(v)==1)
#eqT.append(pi_7==1)
#eqT.append(pi_8==1)
show(eqT)
S=solve(eqT,pi_1,pi_2,pi_3,pi_4,pi_5,pi_6,pi_7,pi_8,pi_9)
show(S)
Preview: (hide)

Comments

I also reported on a Microsoft forum: same post On Microsoft forum

besides I realized that I had privileged Chrome (at the time I had encountered a problem with the display of curves in 3D), but I realized that Edge is faster for the execution of Sagemath code. On the other hand with Edge we no longer have the little hourglass that indicated that the code was executing.

ortollj gravatar imageortollj ( 6 years ago )

syntax error, the brackets are not right. You are trying to iterate over QQ...

FrédéricC gravatar imageFrédéricC ( 6 years ago )

Thank you Frederic . Joking aside, I crashed my PC 3 times in the evening, without seeing the fault of syntax ! . It's just the next morning ,re-reading the code, that I saw the syntax fault ;-)

ortollj gravatar imageortollj ( 6 years ago )

1 Answer

Sort by » oldest newest most voted
1

answered 6 years ago

tmonteil gravatar image

updated 6 years ago

I can reproduce the problem on Linux as well. This is a Sage bug, note a Chrome^TM or a Microsoft^TM one. Thanks for reporting ! This is now trac ticket 26928

We can reduce the bug to:

sage: matrix([ZZ])
Preview: (hide)
link

Comments

But I think there is also a problem on the OS side (at least on Windows, I do not know if it also crash the Linux OS ?) because this code error in Sagemath ended up crashing the PC. For me this behavior is not normal.

ortollj gravatar imageortollj ( 6 years ago )

You'd have to describe what you mean by "crashing the PC". What does that mean? Does it get slow? Does the browser crash? Does the OS BSOD?

Iguananaut gravatar imageIguananaut ( 6 years ago )

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 6 years ago

Seen: 345 times

Last updated: Dec 20 '18