"object reference not set to an object instance" error?

"object reference not set to an object instance" error? - Messages

#1 Posted: 7/21/2010 3:20:26 PM
rosswhittingham

rosswhittingham

0 likes in 6 posts.

Group: User

Hi all, wonder if you can help, i am having problems with using the sin, cos, asin,acos etc features. I keep getting the little black box at my final answer. I am not really sure if it is a bug as such as when i upload the calculation to the "Live" page on this website it resolves just fine (i have tried to load this calculation onto several computers and they all just resolve to black box)

thanks in advance

#2 Posted: 7/21/2010 4:01:42 PM
Radovan Omorjan

Radovan Omorjan

325 likes in 2052 posts.

Group: Moderator

Hello,

I do not know if I understood you well, but if you mean on this little black box at the end of the results (visible only when clicked in the region):
[MATH=eng]sin(π/4)=0.7071[/MATH]■
or
[MATH]sin(π/4)—1/sqrt(2)[/MATH]■
It can be used to change the result representation. For instance, if you put into those boxes
[MATH]sqrt(2)/2[/MATH]
You will get:
[MATH]sin(π/4)=1@sqrt(2)/2[/MATH]
[MATH]sin(π/4)—1@sqrt(2)/2[/MATH]

I hope you figured out what is this for.

Regards,
Radovan

When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!"
#3 Posted: 7/21/2010 4:09:01 PM
rosswhittingham

rosswhittingham

0 likes in 6 posts.

Group: User

Wrote

Hello,

I do not know if I understood you well, but if you mean on this little black box at the end of the results (visible only when clicked in the region):
[MATH=eng]sin(π/4)=0.7071[/MATH]■
or
[MATH]sin(π/4)—1/sqrt(2)[/MATH]■
It can be used to change the result representation. For instance, if you put into those boxes
[MATH]sqrt(2)/2[/MATH]
You will get:
[MATH]sin(π/4)=1@sqrt(2)/2[/MATH]
[MATH]sin(π/4)—1@sqrt(2)/2[/MATH]

I hope you figured out what is this for.

Regards,
Radovan




Hi, thank you for your reply, i am just trying to upload the file so people can look at it to get a better idea, what i mean is that the equation is not resolving on my (or several other computers that i have installed smath on to check)

i will try to take a screen shot at least so you can (should be on in 2 mins if you are still around

many thanks

EDIT***

link to screen shot

http://picasaweb.google.com/rosswhittingham/DropBox?authkey=Gv1sRgCPjo36XVhuDL6gE&pli=1&gsessionid=rtS3qt43awjIAT8PHhGvRg#5496454430477863026

thanks
#4 Posted: 7/21/2010 4:22:46 PM
Andrey Ivashov

Andrey Ivashov

2269 likes in 3729 posts.

Group: Super Administrator

Hello.

Wrote

when i upload the calculation to the "Live" page on this website it resolves just fine


SMath Studio Live uses the latest night builds of SMath Studio assemblies and these assemblies is much more newer then those shipped with SMath Studio 0.88. So, it seems that the error you are talking about is already fixed.

I have no time to check your calculations now, but I'll do it in 2-3 hours and then will let you know here about the results.

Anyway, SMath Studio 0.89 will be release tomorrow or on Friday, so you will able to use the latest assemblies version for your worksheet soon.

Best regards, Andrey Ivashov.
#5 Posted: 7/21/2010 4:33:31 PM
Radovan Omorjan

Radovan Omorjan

325 likes in 2052 posts.

Group: Moderator

Sorry, I did not get it in the first place
Wrote


EDIT***

link to screen shot

http://picasaweb.google.com/rosswhittingham/DropBox?authkey=Gv1sRgCPjo36XVhuDL6gE&pli=1&gsessionid=rtS3qt43awjIAT8PHhGvRg#5496454430477863026


I might be wrong but did you check the Calculation=>Auto calculation in the main menu. Is it On (checked) or Off (Unchecked). If unchecked you will not get any result, like in your screenshot.

Regards,
Radovan
When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!"
#6 Posted: 7/21/2010 4:34:13 PM
rosswhittingham

rosswhittingham

0 likes in 6 posts.

Group: User

Wrote

Hello.

Wrote

when i upload the calculation to the "Live" page on this website it resolves just fine


SMath Studio Live uses the latest night builds of SMath Studio assemblies and these assemblies is much more newer then those shipped with SMath Studio 0.88. So, it seems that the error you are talking about is already fixed.

I have no time to check your calculations now, but I'll do it in 2-3 hours and then will let you know here about the results.

Anyway, SMath Studio 0.89 will be release tomorrow or on Friday, so you will able to use the latest assemblies version for your worksheet soon.

Best regards, Andrey Ivashov.



Thank you for your reply,

please see link below for the file, i have also linked a smaller file which may be quicker to work out what the problem is (same problem that is displayed above with sin/cos not resolving etc


https://www.sugarsync.com/pf/D994898_306726_765460

https://www.sugarsync.com/pf/D994898_305664_672321



#7 Posted: 7/21/2010 4:37:30 PM
rosswhittingham

rosswhittingham

0 likes in 6 posts.

Group: User

Wrote

Sorry, I did not get it in the first place

Wrote


EDIT***

link to screen shot

http://picasaweb.google.com/rosswhittingham/DropBox?authkey=Gv1sRgCPjo36XVhuDL6gE&pli=1&gsessionid=rtS3qt43awjIAT8PHhGvRg#5496454430477863026


I might be wrong but did you check the Calculation=>Auto calculation in the main menu. Is it On (checked) or Off (Unchecked). If unchecked you will not get any result, like in your screenshot.

Regards,
Radovan




Hi, yes i have checked and also clicked refresh, it is quite strange, as by playing with switching between radians & degress for the "Angle" setting, one of the equations appeared to have resolved, but after a "recalculate" it vanished

#8 Posted: 7/21/2010 4:56:44 PM
Radovan Omorjan

Radovan Omorjan

325 likes in 2052 posts.

Group: Moderator

Ah yes, I remembered that "Angle" problem. The "Degrees" mode made some troubles on some of my previous testing as well. With "Radians" should be Ok. Both of your files worked for me with "Radians" and "Recalculate page" as well.

Regards,
Radovan
When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!"
#9 Posted: 7/21/2010 5:09:41 PM
rosswhittingham

rosswhittingham

0 likes in 6 posts.

Group: User

Wrote

Ah yes, I remembered that "Angle" problem. The "Degrees" mode made some troubles on some of my previous testing as well. With "Radians" should be Ok. Both of your files worked for me with "Radians" and "Recalculate page" as well.

Regards,
Radovan




yea i tried to set the "Angle" to radians and then just convert the answer after, but i just get a strange answer with "i" after a very small number (in the magnitude of x10(-14)), anyway as it works on live, it should be okay in the next release

thanks again to you both for you very promt response!

good night
#10 Posted: 7/21/2010 7:01:29 PM
Edward Ulle

Edward Ulle

20 likes in 182 posts.

Group: Moderator

Perhaps your SMath file got corrupted some how.

Try this. Save the file as xmcd. Close SMath and open SMath and Open the xmcd file. When I did these steps the new file looks fine.

Good luck.
Ed
#11 Posted: 7/21/2010 7:05:15 PM
Andrey Ivashov

Andrey Ivashov

2269 likes in 3729 posts.

Group: Super Administrator

Wrote

Perhaps your SMath file got corrupted some how.


*.sm files stores information about Angles option and when you save file as *.xmcd this info is lost... maybe this is the reason of why *.xmcd file is opens correctly.

rosswhittingham, I've checked your examples.

Here is what I get with a latest SMath Studio build (I've modified your files a bit):


Figure 1: Winch snatch block_mod.sm


Figure 2: aframe_mod.sm

About errors you found in SMath Studio 0.88. As Radovan said it is due to the Angles option - please check this topic out for details. Actually bug is fixed but I really recommend you to use degrees Unit instead of the global angles option (also see the second post on that topic by Radovan). The second problem you've mentioned about imaginary part after using inverse trigonometric functions - this is an accuracy error and this is also fixed in SMath Studio 0.89 as you can see on the pic above.

Best regards, Andrey Ivashov.

P.S.: In the aframe.sm file you use Units, but this use case is very strange... check out the first screenshot to see how Units should be used normally.
P.P.S: Zip-archive with all related files: for_rosswhittingham.zip.
#12 Posted: 7/22/2010 3:15:44 AM
rosswhittingham

rosswhittingham

0 likes in 6 posts.

Group: User

Wrote

Wrote

Perhaps your SMath file got corrupted some how.


*.sm files stores information about Angles option and when you save file as *.xmcd this info is lost... maybe this is the reason of why *.xmcd file is opens correctly.

rosswhittingham, I've checked your examples.

Here is what I get with a latest SMath Studio build (I've modified your files a bit):


Figure 1: Winch snatch block_mod.sm


Figure 2: aframe_mod.sm

About errors you found in SMath Studio 0.88. As Radovan said it is due to the Angles option - please check this topic out for details. Actually bug is fixed but I really recommend you to use degrees Unit instead of the global angles option (also see the second post on that topic by Radovan). The second problem you've mentioned about imaginary part after using inverse trigonometric functions - this is an accuracy error and this is also fixed in SMath Studio 0.89 as you can see on the pic above.

Best regards, Andrey Ivashov.

P.S.: In the aframe.sm file you use Units, but this use case is very strange... check out the first screenshot to see how Units should be used normally.
P.P.S: Zip-archive with all related files: for_rosswhittingham.zip.



Morning Andrey,

thank you very much for you attention to this, when i try to open the files i loose a bit of formatting due to my earlier build, but the end result works just fine when in radians mode.

the unit function is something i just noticed yesterday, i just assumed it was just a quick way to enter labels, i did not realise you could actually 'give' the number its unit as it were (i need to read up on this on the wiki, looks great)

thanks again

p.s i meant to add a note to my earlier posts saying please forgive the messy layout!, the sheet is still in its early stages lol,
  • New Posts New Posts
  • No New Posts No New Posts