Home AMX User Forum NetLinx Studio

Compiler Error

Hi guys,

For the past few days I get an annoying error when compiling my code where it says:
“Compile Failed; File %s could not be created” and it creates a .mf file in the same directory.

Nothing seems to fix this issue, other than moving the .axs file to a different location. Every time I have moved my source code to a different location it complies fine. But the same problem will happen another day with another .axs file, and I have to move that too, and eventually I end up moving around all my project files!

Does anyone know why this happens and what the solution is?

Thanks

Comments

  • [Deleted User][Deleted User] Harman Integrated Technologies Group (ITG) Posts: 0
    I have also encountered this error. Did you call this into support? It does not appear to be very common - only two documented cases (both from 2011). Although the cause is unknown at this time, the solution appears to be for you to export your workspace. The suggested approach is to use a new folder, but if I recall correctly, I was able to unpack the export and paste it back into my project folder.

    To make this easier to find with the forum search:
    L20215: Compile failed; File %s could not be created
  • I have run into this error several times, and I did report it to tech support. The file that I was using that gave this error was part of a large workspace, and included the Tandberg Duet module. After doing a little testing, including doing the export workspace thing as well as moving things to a completely different folder, I noticed that if I commented out the line that declared the Duet module, the error went away and things compiled just fine. I'm not sure if you are using and Duet modules at all, but maybe try commenting out the DEFINE_MODULE line and see if that makes a difference for you.

    Edit: I wonder if it has something to do with a corruption of the manifest file that Duet uses, or maybe the .axs file that is included in every duet module that actually contains the command to load the duet module. I don't know if that makes any sense, but it would seem to fit the problem to me.
  • MiladMilad Posts: 4
    Thanks for your responses guys.

    I’m not running any duet modules in this project, but it’s a fairly large workspace with more than 10 systems. It has lots of Netlinx modules, TP and IR files. Maybe this is what confuses the complier, as I don’t have this issue with any other smaller projects.

    Exporting the workspace seems to fix the issue by the way, thanks for that.
  • cmasoncmason Posts: 123
    I have run into this error several times, and I did report it to tech support. The file that I was using that gave this error was part of a large workspace, and included the Tandberg Duet module. After doing a little testing, including doing the export workspace thing as well as moving things to a completely different folder, I noticed that if I commented out the line that declared the Duet module, the error went away and things compiled just fine. I'm not sure if you are using and Duet modules at all, but maybe try commenting out the DEFINE_MODULE line and see if that makes a difference for you.

    Edit: I wonder if it has something to do with a corruption of the manifest file that Duet uses, or maybe the .axs file that is included in every duet module that actually contains the command to load the duet module. I don't know if that makes any sense, but it would seem to fit the problem to me.

    I just got the same error myself. I commented out the 2 DUET module declarations and it compiled after that.

    Because I'm not using them at the moment, it's not a big deal. But, I wonder if that error will rear it's ugly head again when I go to use them....
  • cmatkincmatkin Posts: 86
    Hi guys,
    I used to run into this fairly often. I develop on a MacBook Pro with the AMX software in a VM.

    My issue was that the paths were too long to the various folders.
    I solved this by keeping the folder structure under 256 characters by mapping my source folder to a drive instead of using network shares.

    Regards
    Craig
  • jjamesjjames Posts: 2,908
    I just got this one a few days ago, and like cmason, it was a result of a Duet module. It just happened to be one of my modules that I've been working on, but creating a new workspace got it to compile again.

    Clearly something to do with the workspace, but didn't look into it much further.
  • I have run into this as well, From my perspective it seems to be a disk access issue. I have some systems in a Dropbox folder, and I have the most issues with those. I also have seen it more since i started using Carbonite for backup. My theory is (totally unsubstantiated) that because compiling is disk intensive, the Backup software sometime trips up the compiler. I have found that if you recompile it will usually work the second or third time. It is a pain when building an entire work-space and you can't get all the systems to compile.
  • cmasoncmason Posts: 123
    I have run into this as well, From my perspective it seems to be a disk access issue. I have some systems in a Dropbox folder, and I have the most issues with those. I also have seen it more since i started using Carbonite for backup. My theory is (totally unsubstantiated) that because compiling is disk intensive, the Backup software sometime trips up the compiler. I have found that if you recompile it will usually work the second or third time. It is a pain when building an entire work-space and you can't get all the systems to compile.

    Many of my systems sit in a Dropbox folder as well. The one that generated the error does too. Usually I get an Netlinx Pre-Processor Error 0 error with systems compiling in the Dropbox folder and simply clicking "save" and compiling again will make the error go away... Although I have to do this very often, the 2 extra mouse clicks hasn't been too bad.
    Also, word of caution... if you get the (Netlinx Pre-Processor Error 0) compiler error, make sure you hit "SAVE" before you close Netlinx Studio. If not it will corrupt the file leaving you an empty .axs file!

    But this error is completely new to me.

    Also noteworthy, I use a solid state hard drive in my computer. I'm not sure if that might contribute to the problem or not. I don't remember getting strange compiler errors before I upgraded HDDs though.
  • That is interesting! I also started to have this problem with my new computer with a SSD. Hmmm The Plot thickens...Jim...
  • viningvining Posts: 4,368
    Despite knowing better I forgot to pause my Dropbox sync while working on netlinx files in NS3 and I got the aforementioned or similar compiler error and as mentioned I usually just need to compile again and wait for the sync to finish before trying to transfer since that causes other issues. This time however and I think a time or two before my files open in NS3 got wiped, the windows are still open but all code is gone. I can close and re-open the file and still no code, close NS3 re-launch and re-open and still no code. I had to go into my Dropbox cloud account and copy the previous version, fortunately there was one for each but it also has the current sync with a 0kb file size. Fortunately that only happens to the open file and that pisses me off enough, I'd be breaking thing if the entire project got wiped and if I didn't have back up I'd probably go postal once I located a weapon.

    It would be nice if this were fixed in NS, at least pop up a window saying files are in use by another app, can't compile, or try again.... It's only a matter of time before someone gets totally screwed by loosing a days work or more depending on when the last sync occurred.

  • the8thstthe8thst Posts: 470
    This just happened to me today as well. The exact same error. The file was in a dropbox folder (which I've been using issue free for years). The compiler error was fixed by commenting out the line declaring DSC IT100 duet module (the only duet module in the workspace). I received the same error on my laptop which used the dropbox folder. Copying the workspace folder to my desktop didn't fix it either.

    I exported/imported the workspace to the desktop and it worked. Copied it to the desired folder and it was broken again. Then I exported it directly to the dropbox folder and it has been working ok on both computers.

    That still means it is partially broken since it should be completely portable.
  • viningvining Posts: 4,368
    I had another issue yesterday and the same thing happened, the files opened in NS3 were wiped, completely blank and that's real scary. Fortunately versions are maintained on the dropbox server between saves but you still loose your most recent work. A very dangerous combination, NS3 and dropbox.
  • Dennis E.Dennis E. Posts: 27
    I discussed this with DROPBOX a while ago and they said that the problem was probably that my program (Netlinx Studio, TP-Design) opened the file in Exlusive mode.
    I did some research then which I can't remember in detail but there are some different modes Windows open/read/write files (Exlusive flags selected).
    And AMX are probably handling the files as one would do when there where only one computer and no syncing and networks.

    I often see compiler problem and files with zero space if I have dropbox or any other sync service active.
    Ex. Compiler error when compiling bigger projects with plenty of files.
    Zero file after compiling a just saved file that is part of the project (save file, dropbox syncs and compiling during this).

    Goggle Drive shuts down for me when this compiler issue occurs

    I just accepted that AMX would not change there file procedure and I had to pause SYNCING during my work.

    One thing that would be nice where if you could have a preset delay on the DROPBOX syncing.
  • viningvining Posts: 4,368
    On my main programming pc I don't have dropbox automacilly run at startup but I still often forget to pause it once I do open it. It's like playing russian roulette, eventually I gat shot, just a matter of time.
  • [Deleted User][Deleted User] Harman Integrated Technologies Group (ITG) Posts: 0
    This error caught me again recently - same File %s message and I was working out of a cloud sharing folder. After much trial and error, and multiple machines spanning different NS versions, I was able to resolve this by deleting the .src, .tkn, and .tko files that existed in my working project folder. In speaking with the developer, the .src file was the likely culprit and the file %s is a bug in NS that should be the actual file name, but is represented by file %s. While he is looking into the error message bug, I wanted to post this potential fix should any of you come across this in your environment.
Sign In or Register to comment.