IDE Script Compile Error

IDE Script Compile Error !

The problem lies with the line number since only 4 exitst…

It is a CopyFiles Post-Build script with 4 lines: relative location of 4 icons (the App icon and 3 FileTypes Icons).

The icons are not copied (and something else is not done since when I copy the icons to the correct location, the application keeps its default icon).

Xojo 2015r1
Yosemite 10.10.4

Ideas ?

Delete the script and start over ?

I do that,
then I add only one (App.icns) icon file and get the same problem.

A build without the script (and so without any icon - icns file) runned fine.

Other suggestion ?

The error is on line 25 as the error dialog says. And it is a syntax error (code 1).

unfortunately, there is only 1 (last try), or 4 (all icons) line(s) in the "script” editor.
(externals/App.icns)

Just in case: this is a Post-Build Script that copy files (here OS X .icns file) once the stand-alone is created from externals/ into App… “Resources” folder.

On the other hand, my project goes from 20MB to 967KB, and any save operation is done… faster !

A feedback report with this project would be useful

FYI - ALL build steps are, internally, IDE scripts of one kind or another
In the case of a copy files script the IDE just writes one based on the files you add to it

Norman, are the files appended to each other? As he claims, there are only 4 lines in his script, but the error message says “Error found while compiling on line 25”.

The script written is much more than 4 lines as it uses OS facilities to creates dirs & copy files as needed
Without a sample from Emile I have no idea why its doing this for him

Hi Norman,

Thank you for your answer.

I will do that by tomorrow. I want to make another set of testings *: in two days my testing MacBook may have regrets and restart to work.

Also, I do not do the same process with another project (either a current project nor with a brand new one).

  • Before that, I will makea backup of that project in case the trouble really exist. Another test to do is to strip down (as usual) the project and watch what happens.

[quote=199328:@Emile Schwarz]Hi Norman,

Thank you for your answer.

I will do that by tomorrow. I want to make another set of testings *: in two days my testing MacBook may have regrets and restart to work.

Also, I do not do the same process with another project (either a current project nor with a brand new one).

  • Before that, I will makea backup of that project in case the trouble really exist. Another test to do is to strip down (as usual) the project and watch what happens.[/quote]

A while ago I had a project in which copyfiles and scripts stopped working. After trying everything like deleting and putting back to no avail, I suspected the project was simply corrupt.

I tried to save XML and reload, no luck.

Finally, I started a new project and simply dragged over the elements of the original one by one until my new project was a mirror of the non functional one. Lo and behold, all scripts worked again.

Yes, Michel, I was thinking that way and I think I’ve got that too.

Bus, as I already stated, in the near past, I got project working (or not), then without doing anything, it started to be workingfine (or not). And I have a MacBook Retina 2014-11 with 8MB of RAM… so, officially, no RAM troubles…

I’ve had corruption in IDE scripts at least 2 times. AFAIR the complete project was toast.

Move all scripts that you have to another location and start adding them back one by one.

You surely have computers with more than 8mb down in Strassbourg, don’t you?

[quote=199362:@Emile Schwarz]Yes, Michel, I was thinking that way and I think I’ve got that too.

Bus, as I already stated, in the near past, I got project working (or not), then without doing anything, it started to be workingfine (or not). And I have a MacBook Retina 2014-11 with 8MB of RAM… so, officially, no RAM troubles…[/quote]

When a project gets erratic, it cannot be trusted anymore. Beyond making sure to have a backup, I would start a new project as I outlined right away before it blows up in my face.

I remember once such a project getting unusable, and of course, I did not have a backup.

Beatrix: 8MB: the value comes from the past ! (I think that I had a 8MB Apple IIgs, long time ago).

I meant 8GB.

I was able to strip down the project to less than 32KB WITH the bug and nearly no code at all (one window, MenuBar, App and the icons to be moved, of course).

One thing I forgot to tell yesterday is that the project (folder, with all “externals” [images, icns] is located in an external hd. This HD is always mounted far before I fire Xojo (so I will not get troubles because of the hard disk is… mounting !).

I exported the project as XML and Xojo Project.

I can confirm (if it is needed) that the script is less than 25 lines.

Of course, I know that sometimes an error message is just … an error message and what it is said have not to be taken stictly, but just as an indication that something wrong happens and eventually where it happens.

In this case, the error comes from the IDE Post Build Script. I removed it before stripped down the project and the compile goes right. (without the - now non copied - icons).

BTW: Michel, did you wrote a bug report for your corrupted project ?

Oh, one more thing:

the so called 4 lines of scripts are (just like Norman said) just the relative path to my four icon files.

All the work is done internally.

And that is what I wrote earlier: read back the first entry at this page top.

Yes. <https://xojo.com/issue/38561> Unfortunately it got closed as non reproducible.

I did mention there the way I solved the issue.

here’s mine:

40072 - IDE Post-Build Script returns Error 1 in line 25.

PS: (Unfortunately it got closed as non reproducible) this happens to me too.

I already reported in Feedback, but here I go:

A boot on Mavericks, run 2015r1, load the project asked me to locate the images and so I do.

The build was done and does not leads into any error.

While I was adding text to the report, I realized that I do not checked with a standard boot (Yosemite 10.10.4) and so I do seconds ago.

I deleted the Images folder from the IDE,
Saved the project,
Close the project,
Reload teh project,
Build…

And I get the error back.

Then, I deleted the icns files, add then using the + icon (instead of dropping the four fo them into the Editor area) four times, save the project, change the Both / Release popupMenu to Both, run and get the same error.

BUT: there is a change. Now I get also the error when I run the project in the IDE (seems a normal behavior since I aske for the Copy Files when running in the IDE).

Ideas ?

One last thing:

I had the stupid idea to copy the project file and its two complement folders (the Images and Icons folders) into a newly created folder in the internal HD (a SSD),
Eject the external partitions,
Run Xojo 2015r1,
Open (from the “New” window) the project with the problem,

No warning dialog was displayed…

Then I asked to get a build (cmd-b)…

AND GET WHAT I ASKED WITHOUT IDE SCRIPT ERROR.

All is fine now.

Bad news from the field:

I wanted to clear the project folder / go ahead and add one simple but nice feature into my project but falled into a trap.

The bug reappears !

In fact, I moved the folder from the internal SSD into its proper location in the external HD (traditionnal), then resume and add that nice addition when at compile time, the trouble come back (without any change before the move / compile).

I copy back the project to the internal SSD and it compiles correctly from there.

So, the problem still exists.