NSInvalidArgumentException Error Message


(David Jenner) #1

Just recently with some of the websites I upload come up with this error message on the first time I try…

NSInvalidArgumentException
0.000000 is not a valid magnification value.

If I try the upload again it usually goes.
Can anyone help?


(Doug Bennett) #2

Any time you see an error that starts with NS (left over from NextStep when Steve Jobs came back to Apple) it is usually an internal program bug, something you can’t fix. If you can recreate it you should get in contact with RealMac support.

I have seen this message, but can’t seem to recreate it well enough to get a project file to RealMac.


(EricW) #3

I get this error repeatedly when I try to republish my website on the latest beta 8.1. As I have multiple issues I did not take action, but I can reproduce. I thought it was PlusKit but I have it disabled.


(Doug Bennett) #4

I’ve gotten the message with the latest beta as well but can’t reproduce. When I republish it goes away.
If you know the steps to recreate with a project then I would suggest you contact Realmac support with an email, a link to a project file (Dropbox type), the steps to recreate the problem and a link back to this post.

That’s what beta testing is about, finding and reporting bugs.


(Tom Bradley) #5

Hey guys, to help us diagnose this could you do the following when it next appears.

With the alert still on the screen,

  1. Open Activity Monitor
  2. Select RapidWeaver from the list of applications
  3. Press the cog button and choose “Sample Process”
  4. Save the result and upload it here (or email it to support@realmacsoftware.com)

Cheers


(EricW) #6

Just emailed with topic “To Tom: NSInvalidArgumentException” to suppport@realmacsoftware.com… happy hunting!!


(Gnosis Media) #7

Just sent one in too.


(Tom Bradley) #8

Thanks guys, I’ve located the source of the problem! It’s in the SiteMap Plus plugin.

@isaiah Are you able to reproduce this? I’m using version 3.0.0


(Isaiah Carew) #9

@tpbradley -

  • pulling up a basic sitemap doesn’t trigger
  • this and “magnification” is not a SiteMap property
  • the string “magnification” doesn’t appear anywhere in the SiteMap codebase.

i’ll probably need a bit of info to go on.
care to share any of those things the users sent?

but, if i can reproduce it, or you have a stack trace, then hopefully i’ll be able to nail it down soon. :smiley:


(Tom Bradley) #10

@isaiah Sure, I’ve just emailed my test project to you… happy hunting


(EricW) #11

@tpbradley @isaiah I have found a root-cause for my problem, in the RapidWeaver settings you have the option to “Automatically resize larger images”. I have this checked and set to 1024. If I disable this option publishing works OK!

As the error message is pointing to something about magnification I guess it has maybe to do something with this. Don’t want to interrupt support processes, but It felt important to mention on this grey and wet Sunday morning.


(Isaiah Carew) #12

Although it’s very tempting to believe that “magnification” has something to do with those images being resized – this is definitely a case of extraordinary coincidence.

This bug (at least in the file that @tpbradley sent me) is definitely coming from SiteMap+. If you remove SiteMap+ from your project the error will also go away. “Magnification” is actually an internal property of the generic Scrolling pane of macOS. That property isn’t actually being altered at all, but a bit of uninitialized memory just happens to be in the right spot at the wrong time.

The error is caused by some “threading” – basically how work is split across the CPU cores in your computer. Often threading bugs are be triggered or cured by changing seemingly unrelated things. Changing which cores are available at key times is all it takes.

Fortunately the bug was very easy to fix once I was able to see the problem (which was no easy feat – even with the file @tpbradley sent – it was still elusive for several hours).

Releasing SiteMap is another story… I never set up an automatic build for SiteMap when I took it over from LogHound. I honestly don’t remember why, but I tried … and, well, this is how it went: https://twitter.com/isaiah/status/1084118873631350784

Yes, I tried on three separate Macs. Reinstalled the OS twice. Brand new hard drive. Still no love. Apple’s Xcode build system isn’t super robust. :neutral_face:

But… after a tip from another Austinite Mac developer friend, I switched to a new system, and I was finally victorious a few hours ago. Yeah!

This is a long way to say, expect a beta release with a fix early next week. :smiley:

I usually release beta versions on my Slack channel here: http://slack.yourhead.com – and then to everyone else a few days later.

Isaiah


(EricW) #13

Great news! Thanks for the work


(Isaiah Carew) #14

As promised there’s a new version of SiteMap on our Slack channel. http://slack.yourhead.com

I’m not going to directly post it to the forum – as forum posts stick around a long time – and beta download links probably shouldn’t.

But the slack channel is open to everyone and I could really use your help in testing this out. As I mentioned above, the build system went through quite a few changes, and while they all seem like nice-to-have good things (new Xcode 10! new Mojave SDK! new continuous integration build-system!), all change brings some uncertainty – so a bit of extra beta testing is definitely a good thing.

If you do download it please let me know how it goes – either here or directly on the slack channel is fine. :slight_smile:

Isaiah


RapidWeaver 8.1 Final Candidate 6 (Build 20560b)