Welcome Guest! To enable all features please Login. New Registrations are disabled.

Notification

Icon
Error

Login


Options
Go to last post Go to first unread
Offline johnofleek  
#1 Posted : 29 April 2021 17:42:53(UTC)
johnofleek

Rank: Newbie

Groups: Registered
Joined: 29/04/2021(UTC)
Posts: 1
United Kingdom
Location: staffs

Was thanked: 1 time(s) in 1 post(s)
Hi

SMath throws an exception when I plot a matric containing a large number (such as 3.1*10^8) - any ideas what I'm doing wrong?

exception.png

Many thanks

John
thanks 1 user thanked johnofleek for this useful post.
on 02/05/2021(UTC)

Wanna join the discussion?! Login to your SMath Studio Forum forum account. New Registrations are disabled.

Offline Jean Giraud  
#2 Posted : 29 April 2021 22:19:57(UTC)
Jean Giraud

Rank: Guest

Groups: Registered
Joined: 04/07/2015(UTC)
Posts: 6,866
Canada

Was thanked: 981 time(s) in 809 post(s)
Originally Posted by: johnofleek Go to Quoted Post
SMath throws an exception when I plot a matric containing a large number (such as 3.1*10^8) - any ideas what I'm doing wrong?

The quick plot plots on canvas pixels
The first abscissa @ 1, 2nd @ 2
The third one @ roughly 100 km at right.
At that distance, they don't shake hands !
Offline overlord  
#3 Posted : 30 April 2021 00:56:54(UTC)
overlord


Rank: Advanced Member

Groups: Registered
Joined: 23/07/2013(UTC)
Posts: 1,126
Turkey

Was thanked: 507 time(s) in 338 post(s)
Originally Posted by: johnofleek Go to Quoted Post
Hi

SMath throws an exception when I plot a matric containing a large number (such as 3.1*10^8) - any ideas what I'm doing wrong?

Many thanks

John

Below there you can find the file. You didn't do anything wrong. I guess this is a bug.
Plot can show the results, but give a bug and force crash if you don't do it right way.
If you insert the 2d plot, add the variable and try to scroll it right after smath crashes.
Maybe during scrolling plot can't do the refreshing, hit a wall and quit I don't know.
Well, right way is a work around actually since this is a bug. NOT the way "you have to do this like this always".

I did altered 3x10^8 to 3x10^4 then scrolled to see the graphic better.
Then altered it again to 3x10^5 and scrolled again. Gradually revising number and scrolling made it to 3x10^8.
Plot is changing correctly after this phase. Tried with couple of them and not crashed.

Regards

ploterror.sm (10kb) downloaded 8 time(s).

2021-04-30_00-47.png
Offline Jean Giraud  
#4 Posted : 30 April 2021 03:29:44(UTC)
Jean Giraud

Rank: Guest

Groups: Registered
Joined: 04/07/2015(UTC)
Posts: 6,866
Canada

Was thanked: 981 time(s) in 809 post(s)
Canvas.PNG
Offline Davide Carpi  
#5 Posted : 30 April 2021 10:43:34(UTC)
Davide Carpi


Rank: Advanced Member

Groups: Registered, Advanced Member
Joined: 13/01/2012(UTC)
Posts: 2,647
Man
Italy
Location: Italy

Was thanked: 1329 time(s) in 875 post(s)
Bug confirmed, it is about coordinates in mouse events.

bug.sm (3kb) downloaded 9 time(s).


Code:
************** Text of Exception **************
System.OverflowException: Value too large or too small for an Int32.
   in System.Convert.ToInt32(Double value)
   in ..(Int32 , Int32 )
   in SMath.Controls.Renderer.Refresh()
   in SMath.Controls.Renderer.OnMouseMove(MouseEventOptions e)
   in SMath.Controls.RegionHolder`1.OnMouseMove(MouseEventOptions e)
   in SMath.Controls.Worksheet.MouseMove(MouseEventOptions e)
   in SMath.Controls.InteractiveWorksheet.MouseMove(Single x, Single y, Int32 count)
   in SMath.UI.Desktop.DesktopWorksheet.(MouseEventArgs )
   in System.Windows.Forms.Control.WmMouseMove(Message& m)
   in System.Windows.Forms.Control.WndProc(Message& m)
   in System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
If you like my plugins consider to support SMath Studio buying a plan; to offer me a coffee: paypal.me/dcprojects
thanks 1 user thanked Davide Carpi for this useful post.
on 30/04/2021(UTC)
Offline Jean Giraud  
#6 Posted : 30 April 2021 21:45:30(UTC)
Jean Giraud

Rank: Guest

Groups: Registered
Joined: 04/07/2015(UTC)
Posts: 6,866
Canada

Was thanked: 981 time(s) in 809 post(s)
Originally Posted by: johnofleek Go to Quoted Post
SMath throws an exception when I plot a matrix containing a large number (such as 3.1*10^8) -
any ideas what I'm doing wrong ?

I notice in my early SS 5346 [2015]
Simply, before you plot,
set either X or Y close to max of either X/Y as applicable
That clears the mouse incompatibility from initial default plot.
You may encounter that in plotting ordinary f(x).
The X_Y plot will surely crash Smath.

BugPlot.PNG

Offline Andrey Ivashov  
#7 Posted : 02 May 2021 18:45:32(UTC)
Andrey Ivashov


Rank: Administration

Groups: Developers, Registered, Knovel Developers, Administrators, Advanced Member
Joined: 11/07/2008(UTC)
Posts: 1,616
Man
Russian Federation

Was thanked: 1978 time(s) in 666 post(s)
Thank you, reproduced. Will fix.
Offline overlord  
#8 Posted : 28 May 2021 19:30:31(UTC)
overlord


Rank: Advanced Member

Groups: Registered
Joined: 23/07/2013(UTC)
Posts: 1,126
Turkey

Was thanked: 507 time(s) in 338 post(s)
Originally Posted by: Andrey Ivashov Go to Quoted Post
Thank you, reproduced. Will fix.

This is not fixed in 2D plot.
It is fixed in X-Y Plot.
Just a reminder.

Regards
Users browsing this topic
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.