dbremner / topdraw

Automatically exported from code.google.com/p/topdraw
Other
0 stars 0 forks source link

Rendering fails, always showing "<scriptname> Requires Top Draw Version: 34694870 (Current version: 1)" #4

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
I have a core 2 duo MacBook pro 15", running OS X 10.5.5. I downloaded Top
Draw (version 1.0), unzipped it, dragged the .app into my Applications
folder, and ran it.  The only image I have ever seen it produce is a white
background with gray text saying "<scriptname> Requires Top Draw Version:
34694870 (Current version: 1)", or some cropped version of that.  I get
this when running the TopDraw app, using the desktop widget, the screen
saver, and when invoking TopDrawRenderer via the terminal.  I have
repeatedly deleted TopDraw.app and ~/Library/Application Support/Google,
and then reinstalled the app, but I always get the same result.

Attached is a typical jpeg image created by running TopDrawRenderer -m
4000x1000 WavyGlow.tds. 

Original issue reported on code.google.com by daveclau...@gmail.com on 2 Oct 2008 at 1:13

Attachments:

GoogleCodeExporter commented 9 years ago
Oooh.  That's nasty.  I'm also running in under 10.5.5 on a couple of laptops, 
desktops, and minis.  

There's some code in there to make sure that scripts that are written for the 
next generation play well with older systems, and that they'd show 
something similar to what you've seen.  Is the number in the error message 
always the same?  

Try this: run the editor, and in the Untitled script window, add to the top of 
the file:
compositor.requiredVersion = 1;
and see if that renders properly.  

Otherwise, if you're comfortable with Xcode, you can check out the source code, 
and take a look at Renderer/Compositor.m, inside of the 
checkVersion: method. 

Original comment by waylonis on 2 Oct 2008 at 6:37

GoogleCodeExporter commented 9 years ago
Thanks. Adding "compositor.requiredVersion = 1;" fixes the problem, at least in 
the
default script that shows up in the editor window at startup.

I believe it does always show the same number in the error message: 34694870. I 
will
load up the source in Xcode over the weekend and see if I can figure out where 
that's
coming from.

Original comment by daveclau...@gmail.com on 2 Oct 2008 at 1:52

GoogleCodeExporter commented 9 years ago
I had the same problem

Original comment by charles....@gmail.com on 4 Oct 2008 at 11:09

GoogleCodeExporter commented 9 years ago
I don't know much about Objective C, but it looks like checkVersion() is
misinterpreting the return value of NSScanner.scanUpToString(), causing it to 
read
past the end of the string. Here's a patch:

--- TopDraw/Renderer/Compositor.m   2008-09-19 19:54:41.000000000 -0400
+++ TopDraw-Fixed/Renderer/Compositor.m 2008-10-06 00:46:48.000000000 -0400
@@ -123,7 +123,8 @@

   // Check the required version.  If we can't run, substitute a helpful
   // script that prints the name, required, current version.
-  if ([scanner scanUpToString:@".requiredVersion" intoString:nil]) {
+  [scanner scanUpToString:@".requiredVersion" intoString:nil];
+  if (! [scanner isAtEnd]) {
     [scanner scanUpToCharactersFromSet:[NSCharacterSet decimalDigitCharacterSet]
intoString:nil];
     int version;
     [scanner scanInt:&version];

Original comment by daveclau...@gmail.com on 6 Oct 2008 at 4:58

GoogleCodeExporter commented 9 years ago
Great work!  I'll add the change.

Original comment by waylo...@google.com on 14 Oct 2008 at 2:01