[SS-3479] Attempted to divide by zero exceptions

[SS-3479] Attempted to divide by zero exceptions - Messages

#41 Posted: 4/17/2013 11:19:19 AM
kilele

kilele

133 likes in 397 posts.

Group: User

I've managed to run Smath in a small Linux distro, TinyCore.
Everything seemed ok except loading images. The console showed an error about the library libpng. None of the bult-in examples displayed images.

How was running smath for linux with mono for windows ? ^^

Edit1:

This is the process I followed:

-Download TinyCore's iso and install it on virtualbox as explained in this guide:
http://www.psychocats.net/ubuntu/virtualbox
-Install mono searching on the TinyCore's apptool.
-Again search and install Firefox to download Smath for Linux
-Open the console and type:
"find . -name *.tar.gz
the find should tell you where the downloaded file is and then you know where to go with the cd command:
"cd downloadlocation"
then decompress:
"tar xvzf download.tar.gz"
finally run smath with mono typing:
"mono program.exe"
-When you are done using Smath, close virtualbox with the option 'save state machine'

Edit2:

I was told that Puppy runs Smath with images, though the problem Embedded image problem between Windows and Linux (.NET and Mono) remains.
If anyone wants to try that distribution it needs to install "libmono-winforms2.0-cil_2.10.8.1" and its 27 dependencies. There are some windows installers here. The beauty of the installers is, you can uninstall them, it doesn't adversely affect windows at all, just like any other software.

All in all, for most people Smath seems to run the same in Linux when compared to Windows except the libpng issue mentioned above. However for some of us the problem explained in this post remains, in my case the issues happen in some Linux distro (not in Windows), but strangely in some other Linux, Smath works right (again excluding libpng issues) which suggests to me that the problem is not SMath but Mono (I would say that certain graphic drivers affect Mono's performance and make it fail as explained in this thread).
#42 Posted: 10/15/2017 3:03:01 PM
alfredo gualdron

alfredo gualdron

1 likes in 4 posts.

Group: User

I have the exact same problem:

When i try to save my work, the program crashes with a: "Attempt to divide by zero" error.
Also whe I try to open a saved file, all objects appear in one place...

I've tryed everyting and the problem still persist.

I'm Using Ubuntu 16.04

This is what I get in the console:

- [AppDir] Special Functions 1.11.6484.11450 (2 ms.)
- [AppDir] HTML Export 1.13.6484.11450 (0 ms.)
- [AppDir] Export to image 1.9.6484.11451 (0 ms.)
- [AppDir] Picture Region 1.10.6484.11450 (1 ms.)
- [AppDir] Plot Region 1.9.6484.11451 (1 ms.)
- [AppDir] SMath Studio Files Plugin 1.9.6484.11451 (0 ms.)
- [AppDir] Standard Toolbox Buttons 1.0.6484.11452 (0 ms.)
- [AppDir] Text Region 1.10.6484.11451 (0 ms.)
- [AppDir] SMath Viewer Files Plugin 1.1.6484.11452 (0 ms.)
- [AppDir] XMCD Files Plugin 1.12.6484.11451 (1 ms.)
System.DivideByZeroException: Attempted to divide by zero.
at SMath.Manager.DynamicLabel..ctor () <0x41e48bd0 + 0x0009d> in :0
at (wrapper remoting-invoke-with-check) SMath.Manager.DynamicLabel:.ctor ()
at .. () <0x41e44570 + 0x0024f> in :0
at ...ctor (SMath.Manager.SessionProfile ) <0x41e43e70 + 0x000c7> in :0
at (wrapper remoting-invoke-with-check) .:.ctor (SMath.Manager.SessionProfile)
at .. (System.Object , System.EventArgs ) <0x41e43d80 + 0x0003b> in :0
at System.Windows.Forms.ToolStripItem.OnClick (System.EventArgs e) <0x41e42930 + 0x00065> in :0
at System.Windows.Forms.ToolStripMenuItem.OnClick (System.EventArgs e) <0x41e42570 + 0x0032b> in :0
at System.Windows.Forms.ToolStripMenuItem.HandleClick (Int32 mouse_clicks, System.EventArgs e) <0x41e42520 + 0x0001b> in :0
at System.Windows.Forms.ToolStripItem.FireEvent (System.EventArgs e, ToolStripItemEventType met) <0x41e16ec0 + 0x000e1> in :0
at (wrapper remoting-invoke-with-check) System.Windows.Forms.ToolStripItem:FireEvent (System.EventArgs,System.Windows.Forms.ToolStripItemEventType)
at System.Windows.Forms.ToolStrip.OnMouseUp (System.Windows.Forms.MouseEventArgs mea) <0x41e42230 + 0x001a7> in :0
at System.Windows.Forms.ToolStripDropDown.OnMouseUp (System.Windows.Forms.MouseEventArgs mea) <0x41e42cc0 + 0x00013> in :0
at System.Windows.Forms.Control.WmLButtonUp (System.Windows.Forms.Message& m) <0x41e41ec0 + 0x00118> in :0
at System.Windows.Forms.Control.WndProc (System.Windows.Forms.Message& m) <0x41c5ef60 + 0x00217> in :0
at System.Windows.Forms.ScrollableControl.WndProc (System.Windows.Forms.Message& m) <0x41ca0360 + 0x00013> in :0
at System.Windows.Forms.ToolStrip.WndProc (System.Windows.Forms.Message& m) <0x41de4ae0 + 0x00013> in :0
at System.Windows.Forms.ToolStripDropDown.WndProc (System.Windows.Forms.Message& m) <0x41e40480 + 0x00033> in :0
at System.Windows.Forms.Control+ControlWindowTarget.OnMessage (System.Windows.Forms.Message& m) <0x41c5ef30 + 0x00024> in :0
at System.Windows.Forms.Control+ControlNativeWindow.WndProc (System.Windows.Forms.Message& m) <0x41c5eef0 + 0x0003a> in :0
at System.Windows.Forms.NativeWindow.WndProc (IntPtr hWnd, Msg msg, IntPtr wParam, IntPtr lParam) <0x41c5d7f0 + 0x00324> in :0
#43 Posted: 10/16/2017 7:12:08 AM
Davide Carpi

Davide Carpi

1416 likes in 2873 posts.

Group: Moderator

Wrote

I have the exact same problem:

When i try to save my work, the program crashes with a: "Attempt to divide by zero" error.
Also whe I try to open a saved file, all objects appear in one place...

I've tryed everyting and the problem still persist.

I'm Using Ubuntu 16.04



Hello [userlink]agualdron[/userlink],

could you please download the latest SMath Stable and the latest Development Tools plugin (updated today) and show us the results of the dialog under "Insert > Development Tools > System Informations"?

If you like my plugins please consider to support the program buying a license; for personal contributions to me: paypal.me/dcprojects
#44 Posted: 10/16/2017 2:21:41 PM
alfredo gualdron

alfredo gualdron

1 likes in 4 posts.

Group: User

Hello Davide

Thanks for your replay...

Here is the results:


SMath Studio: SMath Studio Desktop 0.98.6484.11448, x64
OS: Unix 4.4.0.97 (friendly name not found, x64)
Screen: 1366x768 px, 72x72 dpi, 72 GP.DPI, 0.75 GP.SRF
Localization: separator=; decimal symbol=; system decimal symbol=; language=ENG
Frameworks: MONO 4.2.1 (Debian 4.2.1.102+dfsg2-7ubuntu4)


Hope we can find a workaround, I really want to use the software...

Thank you
1 users liked this post
Davide Carpi 10/16/2017 2:46:00 PM
#45 Posted: 10/16/2017 7:14:52 PM
Davide Carpi

Davide Carpi

1416 likes in 2873 posts.

Group: Moderator

Thank you very much, your log has been very helpful. The bug affects all those with screen resolution under 96DPI. I think it should be fixed in the next release.


bug addressed as [SS-3479]
If you like my plugins please consider to support the program buying a license; for personal contributions to me: paypal.me/dcprojects
#46 Posted: 10/16/2017 8:04:15 PM
alfredo gualdron

alfredo gualdron

1 likes in 4 posts.

Group: User

Thank you Davide,
Hope the next release won't take too long ...
I really need to use some notes I took on .sm files...

Have a nice time

Thank you
#47 Posted: 1/11/2018 1:34:52 PM
Andrey Ivashov

Andrey Ivashov

2269 likes in 3734 posts.

Group: Super Administrator

Fixed. Thank you all!
#48 Posted: 1/11/2018 3:11:19 PM
Andrey Ivashov

Andrey Ivashov

2269 likes in 3734 posts.

Group: Super Administrator

Wrote

Wrote

Have you tried if the issue affects also older SMath Studio versions? 0.95, 0.94, 0.93, 0.92....



WAIT WAIT WAIT WAIT WAIT! WHAAAAAT?

I believe I have found a problem with the SMath site. Because of this, when I tried an "older" version, I did not.

If I go to download for example, 0.88, and click on the 0.88 setup here:
http://en.smath.info/forum/yaf_postst425_Stable--SMath-Studio-0-88--12-April-2010.aspx

What do I get? 0.95

If I try to get 0.94 from here:
http://en.smath.info/forum/yaf_postst1317_Stable--SMath-Studio-0-94--18-May-2012.aspx

What do I get? 0.95

Every version I have tried to download (in the last hour) has given me 0.95.

I therefore am unable to try other versions to see if the divide by zero problem is limited to 0.95.

Thanks,
Kyle


It is by design. When one tries to download old version of SMath Studio web-site will find the best version for you automatically! But please look at the download page a bit more accurate:
file_versions_1.PNG

Do you see "Recommended file version" and "Requested file version" tabs there? Here is what one will see when presses on "Requested file version" tab:
file_versions_2.PNG

This is solution I have decided to implement. I hope you understand why it is done so... links to the old SMath Studio packages are everywhere in the Internet and I do not want new users to download old versions of the SMath Studio as we do not have enough time to support different versions of the program. It is much cheaper just to make everything possible to deliver latest versions of the software world wide.

Best regards, Andrey Ivashov.
  • New Posts New Posts
  • No New Posts No New Posts