FLEX debugger not hitting breakpoints, because Flash sometimes embeds source file paths with wrong letter case?

I was trying to figure out why breakpoints were working fine for source files in some locations but not others.  FlashDevelop's debugger (which I believe is actually the FLEXSDK debugger) was successfully connecting, tracing output, and hitting breakpoints in SOME files, but not others.
I downloaded SWFInvestigator from Adobe Labs and checked the embedded debug paths for various source files to see what was going on.
I discovered that files in which no breakpoints could be hit had their paths embedded in all lowercase (e.g. "c:\users\username\desktop\source\myproject" instead of "C:\Users\username\Desktop\source\MyProject").
So I have two questions:
First, is this a Flex debugger issue, or a FlashDevelop plugin issue? Letter case shouldn't matter or interfere with matching file paths in Windows.
Second, what could possibly influence the letter case of embedded paths in a SWF output by Flash Professional (CS6), such that they are sometimes all lowercase and other times maintain the same case from the file system?  And why would that affect a debuggers ability to hit breakpoints in Windows 7?  I am compiling in multiple ways. Sometimes clicking Publish within Flash. Sometimes the file being published is not even open in Flash, and my JSFL script file is passed to Flash.exe containing embedded file paths to open the document. Usually, everything seems to work fine, no matter where I publish from, regardless of whether the FLA file is open or not. I'm honestly starting to believe that it depends on how the FLA was last opened in Flash Professional, as though it saves some sort of last access path internally and uses that to embed debug information.

I don't think it's the source path in my case, because it's simply the dot ".", although I did check that because it would most likely influence the embedded paths.
In the library path, I use relative paths exclusively, since all my individual project folders exist in the same "source" folder.
Here's how I arrived at the conclusion that something more complex or "stateful" must be occuring:
I publish my files with a one-click application, which does the following
updates version timestamps (static constants) in specific files via regex match
fills in a JSFL template with the FLA filename and writes the JSFL file to disk, then passes the JSFL file path to flash.exe for publication
the JSFL then runs a command, which signals the main application via cross-process communication that the script has finished publishing
That all makes it easy for me to update and publish multiple projects and deploy them, with a single click.  Here is the JSFL template I created, which has been drastically simplified since the days where it used to search to see if the file was open in Flash, select the document, and call publish.  Now it just uses the publishDocument method to silently publish files without opening them.
var filepath = "FLAFILEPATH"; //template parameter: the URI (beginning with "file:///") of the FLA file to publish
fl.publishDocument( filepath, "PUBLISHPROFILENAME" );
FLfile.runCommandLine("COMPLETECOMMAND");
The C# app replaces the strings in all caps with the actual values.  The COMPLETECOMMAND is actually populated with the application's own executable path, along with a "complete" switch, which lauches a 2nd instance, which handles the complete switch by broadcasting a signal over an interprocess channel and then terminates.  The main instance captures the signal, triggers a wait handle, and continues with publishing the next file.  Here is the core code for it:
private string fillTemplate( string fla_directory, string fla_filename, string publish_profile_name )
    string fileuri = "file:///" + Path.Combine( fla_directory, fla_filename ).Replace( '\\','/' );
    return EmbeddedResources.OpenAndPublish //JSFL template file embedded as string resource
        .Replace( "FLAFILEPATH", HttpUtility.JavaScriptStringEncode( fileuri ) )
        .Replace("COMPLETECOMMAND", HttpUtility.JavaScriptStringEncode( "\"" + Application.ExecutablePath + "\"" + " -publishcomplete" )) //call self with -publishcomplete switch to signal main instance's publishCompleteSignal
        .Replace("PUBLISHPROFILENAME", HttpUtility.JavaScriptStringEncode( publish_profile_name ) );
private static readonly string FLASH_PATH = @"C:\Program Files (x86)\Adobe\Adobe Flash CS6\Flash.exe";
public void publish( string fla_directory, string fla_filename, string publish_profile_name )
    Program.publishCompleteSignal.Reset();
    string template = fillTemplate( fla_directory, fla_filename, publish_profile_name );
    string curdir = Environment.CurrentDirectory;
    string tempJSFLfilepath = Path.Combine( curdir, "temp_script.jsfl" );
    File.WriteAllText( tempJSFLfilepath, template );
    Process p = Process.Start( FLASH_PATH, tempJSFLfilepath );
    Program.publishCompleteSignal.WaitOne( 30000 ); //timeout after 30 seconds
Here's where it gets interesting.  The FLAFILEPATH has ALWAYS been passed in as all lower case, yet this publication method has worked 99% of the time for hundreds of publish operations every day.  This applies to both the publication of the first SWC, which is referenced by the second published SWF (both were being published with lowercase paths), yet the paths for the main SWF were remaining in lowercase, while those in the referenced SWC were maintaining the correct case from the file system.
So there may be any number of things going on here.  SWCs may be published differently than SWFs, such that SWCs always have the correct letter case for debug source files, regardless of how the source FLA project was opened.  Ensuring the path passed to publishDocument uses the right case definitely fixes the problem, but it doesn't explain why it usually worked, despite having always been passing a lowercase string.  The only variable I can think of in all of this is Windows itself or Flash, such as whether the document was open in Flash at the time the silent JSLF publishDocument command ran, and how that FLA was last opened (via shortcut, via "recent documents" in Flash, via recent documents in Windows.  It has to be something, even if it's something as obscure as how the folder path was last accessed in windows, although I strongly suspect it's just how (in terms of path case) the FLA was last opened in Flash.
In any case, I'm happy that passing the right case to JSLF's publishDocument command fixes the problem, so I'm not going to spend any more time trying to figure out how opening the FLA in various ways could affect the embedded debug paths.  The only thing that should be done is to address how paths with the wrong case are handled when they do get embedded that way for whatever reason.  Perhaps the flex debugger should be updated to use case-insensitive matches in case-insensitive file systems, unless, perhaps, this is a FlashDevelop debugger issue after all.

Similar Messages

  • The movie could not be exported because an error occurred. (File already open with with write permis

    The movie could not be exported because an error occurred. (File already open with with write permis
    Never received this error until I updated to newer operating system.

    This sounds vaguely like the Error -49 some people have been getting. It's related to a feature in Time Machine geared towards laptop users who aren't always connected to their Time Machine backup drive.
    This requires using the Terminal app, in your Applications/Utilities folder
    To turn off Time Machine snapshots type in the following command:
    sudo tmutil disablelocal
    The Mac will likely ask for your password, so type it in and hit the return key. The type the word, exit and hit return. Quit Terminal.
    Open iMovie and try doing another export and see if the same error message pops up.

  • Hi , I would like to ask you about purchase item transfer to ipad from mac book Itunes, But This message will be notified on screen this ipad could not be synced because this computer is no longer authorized with that purchased item on this ipad.

    Hi ,
    I would like to ask you about purchase item transfer to ipad from mac book Itunes, But This message will be notified on screen
    "This ipad could not be synced because this computer is no longer authorized with that purchased item on this ipad"
              I did authorized in the store, but still did not transfer to the mac. Could you please to tell me what should I do it? Please let me know that as soon as possible.
    Regards,
    Thank you

    The iPad is fine.  But the computer you're syncing with needs to be authorised with the Apple ID that was used to buy the material on the iPad.  You do this by picking the 'Authorize' item from the menu in iTunes and entering the account name and password.

  • When i download any file it start in a second but when i pause the downloading file & after some time when i open it amessage flash 'download error' source file could not be read please try again later or contact the server administrator.

    when i download any file it works frequently and downloading start in a second but when i pause the downloading file & after some time when i open it,The downloading not start proper and after some time a message flash 'download error' source file could not be read please try again later or contact the server administrator.

    I downloaded the Microsoft Autoruns package and ran it.  There are no programs in the LSA Providers tab, and Apple's Bonjour is the only program in the Winsock Providers tab.  I also did the "netsh winsock reset" and rebooted.  It didn't fix the problem.  Any more ideas?

  • Why am I getting the message "project could not be prepared because an error occurred. (File already open with write permission)" when trying to share my imovie to media browser?

    Why am I getting the message "Project could not be prepared because an error occurred. (File already open with write permission.) when trying to
    share to the media browser?   I have done this many times before and never got this message.  This is very frustrating.  Can anyone help me?

    Hi
    Error -49 opWrErr  File already open with write permission
    Trash the preference files while application is NOT Running.
    Easiest way to find out if this is the problem is by:
    • Create a new User-Account
    • Log out of Your old one and into this
    • Re-try iMovie
    If it now works OK - then 99.9% the problem is iMovie pref. file that needs to be trashed.
    from Karsten Schlüter
    Some users notice on exporting larger projects from within iMovie that this operation is aborted with an 'error -49'
    This issue occurs only on MacOs machines using 10.7x
    try switching-off the Local Mobile Backup
    in Terminal copy/paste
    sudo tmutil disablelocal
    Re-launch Mac
    Yours Bengt W

  • HT2932 When I try to save a file from my GarageBand to my PC it keeps giving me a error message . Message says could not be copied because error occurred. The file cannot be found. Any suggestions?

    When I try to save a file from my GarageBand to my PC it keeps giving me a error message . Message says could not be copied because error occurred. The file cannot be found. Any suggestions?

    I was trying to upload from my iPad to my pc.
    That was hard for us to guess, from your post It might have helped to mention the iPad.
    How are you trying to save the song to your PC? Are you sending the song to iTunes? If yes, as a project or as an audio file? Make sure, you select "AAC" and not "GarageBand", when you share the song from your iPad.
    If the clip is not too large, you might alternately try to share it by mail, see:
    Share GarageBand songs

  • I can´t initialise photoshop because of this Could not load actions because an unexpected end-of-file was encontered. "Could not initialise Photoshop because the preferences file was invalid (it has been deleted)" how can i fix it?

    I can´t initialise photoshop because of this Could not load actions because an unexpected end-of-file was encontered. "Could not initialise Photoshop because the preferences file was invalid (it has been deleted)" how can i fix it?

    I have a MacBook Pro.
    App - Adobe Creative suite 5.5
    The only app that does´t initialize is the photoshop
    Problem solve
    FAQ: How do I reset my preferences?
    Thank you Jeffrey Tranberry

  • TS2972 i can't access my home sharing in itunes ? :( when i fill up the apple i.d there's a pop-up window "Home sharing could not be activated because an error occurred (5506)" what's with that?

    i can't access my home sharing in itunes ? when i fill up the apple i.d there's a pop-up window "Home sharing could not be activated because an error occurred (5506)" what's with that?

    See:
    Troubleshooting Home Sharing
    Have you looked at the previous discussions listed on the right side of this page under the heading "More Like This"?

  • What is wrong? : "Could not initialize Photoshop because an unexpected end-of-file was encountered." Photoshop CC 2014

    What is wrong? : "Could not initialize Photoshop because an unexpected end-of-file was encountered." Photoshop CC 2014

    Please check following links if they are useful:
    Unexpected end-of-file
    Photoshop CS6 Not Loading: Actions & Preferences Errors
    Two Fatal Error Messages when Starting Photoshop
    Regards
    Rajshree

  • Could not initialize Photoshop because an unexpected end-of-file was encountred.

    I have a problem with Photoshop, I can run it and work in it. After the start of reports this error message: Could not initialize Photoshop because an unexpected end-of-file was encountred.
    I do not know we mopped PC, defragment, and uninstall of Photoshop installed. You do not know what to do?

    Try resetting your preferences. If that doesn't work, consider a complete uninstall and reinstall.

  • I have this message today: Could not load actions because an unexpected end-of-file was encountered.

    i have this message today and I don’t know what to do, I have PS CC : Could not load actions because an unexpected end of file was encountered

    See whether a reset of Preferences solves the problem
    A logical next step would be to reset your Preferences.
    To reset Preferences:
    If Photoshop is already open on your screen, close it (Quit). Then hold down Shift+Ctrl+Alt (Win) / Shift+Command+Option (Mac) on your keyboard and start Photoshop.
    A dialog box will pop up asking if you want to delete the existing Preferences file (the "Settings"). Click Yes in the dialog box. The existing Preferences file will be scrapped and a new one will be created.

  • Could not load actions because an unexpected end of file was encountered, resetting preferences doesn't work, whats next?  PC windows 8 PS CC

    I tried the ctrl alt shift and click yes to delete preferences and it didn't work.   Where are my actions?   I have no issues with disc space etc (over 500 free) Any help is greatly appreciated as I have many edits to get to customers

    Have you taken a look at this thread? Could not load actions because an unexpected end-of-file was encountered.
    Benjamin

  • I imported different trips to different catalogs on different external hard drives.  Later renamed external HDs.  I want to combine catalogs and have my source (NEF) files all together on one drive.  I'm not really sure how to get those source files back

    I imported different trips to different catalogs on different external hard drives.  Later renamed external HDs.  I want to combine catalogs and have my source (NEF) files all together on one drive.  I’m not really sure how to get those source files back and get rid of the extra long path to where the source files are now located. If I re-link files to their current catalog (many different paths to files in same catalog) can I merge (import catalogs) into one master catalog?  Will the new (Master catalog) have the correct link to the source file?  If not, how or can this be done?
    I have tried to explain my situation as clearly as I can.  Do you understand my situation?
    This maybe something you don’t have time to help me with.  If not can you suggest somewhere I can get an answer?  I really need help.  PLEEEZZZ HELP ME.
    Bruce Schuerman
    Norman, OK
    405_514-4875 (call collect)
    [email protected]

    Is there any solution (other than buying
    I really think 'buying' is the best solution on this one.  Ideally, you would have at least five internal hard drives.
    System
    Projects
    Cache/Scratch
    Media
    Exports
    Use externals and network drive only for backup.

  • CS5 won't start - "Could not load actions because an unexpected end-of-file was encountered"

    It's version 12.0.2. When I click ok, it says "Could not initialize photoshop because the preferences file was invalid (it has been deleted)".
    Any ideas what I could do to get the program to start? I've restarted the machine several times.

    I managed to sort this out now - by deleting preferences

  • What to do when Photoshop says could not import clipboard because an unexpected end-of-file was encountered

    I have PC, with adobe Photoshop CC 2014 and windows 8. Every time I open Photoshop it says: could not import the clipboard because an unexpected end-of-file was encountered. If I exit the message I still cannot create files or open anything... any suggestions?

    When you load Action and when you create new actions they are saved into you Photoshop Preferences into Actions Palette.psp.  This File is read when you start Photoshop.
    Apple and Microsoft both like to hide important files on users.  Windows search and Apple finder will not find and show hidden files unless you change Mac and Windows setting.  I you getting the error when you start Photoshop there is a shortcut to reset preferences. Hold down Alt, Ctrl, and Shift keys (Mac: Command, Option, Shift) while starting up Photoshop you should be prompted to for an OK to delete preferences.
    If this keeps happening perhaps you have a bad spot on your disk.  Loaded actions are saved into that file so they should show up in the Actions Palette when Photoshop Start Up and read that file during start up. Photoshop Writes that file when you load action sets, when you record and edit actions and most likly also when you close down Photoshop.

Maybe you are looking for

  • Can't open JPG or App Store

    After Apple store changed HD on my macbook pro, I cannot open JPEG images, and I cannot open the App Store app.  What do I do to correct this?

  • Fastpath

    Hi I was wondering if someone could help me. I called up the joke that is called BT broadband support to try and get my fastpath turned on and the guy on the other end of the phone first off didn't know what it was and then when I spelt it out for hi

  • T400s shuts down immediately when pressing the power button

    This morning, my T400s will not turn on. With the power supply, it will not turn on at all. With the battery only or with both the battery and power supply, it will shut down immediately after the first screen with the Lenovo logo. And MIT is just ou

  • Tiger Archive and Install Using External Disk for Archive?

    Any way to do an archive and install by moving the saved stuff to an external usb drive? My 10.4.3 install disk is offering me only erase and install, I was updated to 10.4.8 and quite invested with software, etc., would really like to at least try a

  • Having Adobe Flash Enabled caused Firefox to Hang, and then to "Not Respond".

    I Have the Following: Firefox 19.0 Adobe Flash 11.6.602.171 Windows 7 Home Premium 64 Bit SP1 After I first install a new version of Adobe Flash, everything works perfectly. If I shut down my computer & start it up again maybe 10 minutes later, I wil