#23 Crash when running AlbumArt.exe in a batch

closed
AlexVallat
None
5
2014-04-05
2009-06-11
Anonymous
No

Hi there,

I get errors when running AlbumArt.exe (not aad.exe) in a batch.

Command Line, which is run in a batach file is
AlbumArt.exe /ar "Herbie Brennan" /al "Das Elfenportal" /p "D:! Media! Audio Covers\Herbie Brennan~~Das Elfenportal~~%type%~~0.%extension%" /minsize 300 /maxsize 1000 /ac
That causes the below error.

Running the same directly from cmd.exe is no problem. Works fine.

Any ideas are welcome.

Andy

Album Art Downloader has encountered a fatal error, and has had to close.
If you wish to report this error, please include this information, which
has been written to the file: E:\User Shell Folders\kNiL\Foobar\Album Art Downloader\errorlog.txt

App version: 0.27.1.0, running on Microsoft Windows NT 5.1.2600 Service Pack 3 (32 bit)

System.ArgumentException: Die SearchPathPatternHistory-Eigenschaft konnte nicht aus ihrem Standardwert erstellt werden. Fehlermeldung: Ein Teil des Pfades "E:\User Shell Folders\kNiL\Foobar\Album Art Downloader\Herbie Brennan\xxl39zz5.tmp" konnte nicht gefunden werden.
bei System.Configuration.SettingsPropertyValue.Deserialize()
bei System.Configuration.SettingsPropertyValue.get_PropertyValue()
bei System.Configuration.SettingsBase.GetPropertyValueByName(String propertyName)
bei System.Configuration.SettingsBase.get_Item(String propertyName)
bei System.Configuration.ApplicationSettingsBase.GetPropertyValue(String propertyName)
bei System.Configuration.ApplicationSettingsBase.get_Item(String propertyName)
bei AlbumArtDownloader.LocalFilesSource.Settings.get_SearchPathPatternHistory()
bei AlbumArtDownloader.LocalFilesSource.LoadPathPatternHistory(Settings localFilesSourceSettings)
bei AlbumArtDownloader.LocalFilesSource.LoadSettingsInternal(SourceSettings settings)
bei AlbumArtDownloader.ArtSearchWindow.LoadSourceSettings()
bei AlbumArtDownloader.ArtSearchWindow.LoadSettings()
bei AlbumArtDownloader.ArtSearchWindow..ctor()
bei AlbumArtDownloader.App.ProcessCommandArgs(String[] args)
bei AlbumArtDownloader.App.OnStartup(StartupEventArgs e)
bei System.Windows.Application.<.ctor>b__0(Object unused)
bei System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Boolean isSingleParameter)
bei System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Boolean isSingleParameter, Delegate catchHandler)
bei System.Windows.Threading.Dispatcher.WrappedInvoke(Delegate callback, Object args, Boolean isSingleParameter, Delegate catchHandler)
bei System.Windows.Threading.DispatcherOperation.InvokeImpl()
bei System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(Object state)
bei System.Threading.ExecutionContext.runTryCode(Object userData)
bei System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
bei System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
bei System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
bei System.Windows.Threading.DispatcherOperation.Invoke()
bei System.Windows.Threading.Dispatcher.ProcessQueue()
bei System.Windows.Threading.Dispatcher.WndProcHook(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
bei MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
bei MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
bei System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Boolean isSingleParameter)
bei System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Boolean isSingleParameter, Delegate catchHandler)
bei System.Windows.Threading.Dispatcher.WrappedInvoke(Delegate callback, Object args, Boolean isSingleParameter, Delegate catchHandler)
bei System.Windows.Threading.Dispatcher.InvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Boolean isSingleParameter)
bei System.Windows.Threading.Dispatcher.Invoke(DispatcherPriority priority, Delegate method, Object arg)
bei MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
bei MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)
bei System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
bei System.Windows.Threading.Dispatcher.PushFrame(DispatcherFrame frame)
bei System.Windows.Threading.Dispatcher.Run()
bei System.Windows.Application.RunDispatcher(Object ignore)
bei System.Windows.Application.RunInternal(Window window)
bei System.Windows.Application.Run(Window window)
bei System.Windows.Application.Run()
bei AlbumArtDownloader.App.AlbumArtDownloader.IPriorInstance.Run()
bei AlbumArtDownloader.InstanceMutex.RunAppAsServiceHost(IPriorInstance instance, String channelUri)
bei AlbumArtDownloader.App.Main(String[] args)

Discussion

1 2 > >> (Page 1 of 2)
  • AlexVallat
    AlexVallat
    2009-06-12

    Thank you for reporting this.

    Could you try adding the commands:

    E:
    cd "\User Shell Folders\kNiL\Foobar\Album Art Downloader\"

    to your batch file before calling AlbumArt.exe, to see if it is the current path that it causing the problem? That will give me a clue as to the problem.

     
  • kNiL
    kNiL
    2009-06-12

    I have tried this. The error is still the same.

    This is now the batch code:

    e:
    cd "%foobar%\Album Art Downloader"
    cd
    pause
    echo on
    AlbumArt.exe /ar %1 /al %2 /p "%saveto%\%~1~~%~2~~%%type%%~~0.%%extension%%" /minsize 300 /maxsize 1000 /ac

    This is the console output:

    E:\User Shell Folders\kNiL\Foobar\Album Art Downloader
    Drücken Sie eine beliebige Taste . . .

    E:\User Shell Folders\kNiL\Foobar\Album Art Downloader>AlbumArt.exe /ar "Various
    Artists" /al "Bravo Hits 26" /p "D:! Media! Audio Covers\Various Artists~~Bra
    vo Hits 26~~%type%~~0.%extension%" /minsize 300 /maxsize 1000 /ac
    Drücken Sie eine beliebige Taste . . .

    Thanks for the tip. Any other ideas?

    Andy

     
  • AlexVallat
    AlexVallat
    2009-06-12

    I haven't been able to reproduce this bug here, and I can't think of any reason it should occur in a batch file and not when run normally.

    As it occurs when trying to read configuration settings, it might be worth trying to reset those, to see if the problem goes away.

    To do this, delete the Album Art Downloader configuration data folder:

    \Documents and Settings\<user name>\Local Settings\Application Data\AlbumArtDownloader

     
  • kNiL
    kNiL
    2009-06-12

    Thanks for your help.

    I have tried this. AA then compiles scripts but crashed with the same error.

    The error message says a part of the path couldnt be found. Fact is, there is no "Various Artist" folder there. So I guess its a temp folder. If so, I dont understand why AA tries to use "E:\User Shell Folders\kNiL\Foobar\Album Art Downloader\Various Artists\kbfkk6kn.tmp" as temp folder. My system defaults to D:\temp.

    Maybe this helps you finding the error.

    Thanks for the help.

    Andy

     
  • AlexVallat
    AlexVallat
    2009-06-12

    No, I don't understand why it is using that path either. It appears to be the .net XmlSerializer class that is using it, but I can't figure out why it would decide on a path like that.

    I've done a bit of searching, and apparently you can force it to use a specific folder by creating a text file called AlbumArt.exe.config in the Album Art Downloader folder, with the contents:

    <configuration> <system.xml.serialization> <xmlSerializer tempFilesLocation="D:\\temp"/> </system.xml.serialization> </configuration>
     
  • kNiL
    kNiL
    2009-06-12

    OK. AA used the temp setting forced by AlbumArt.exe.config.
    Now I get another error (or two errors?):

    System.ArgumentException: Die SearchPathPatternHistory-Eigenschaft konnte nicht aus ihrem Standardwert erstellt werden. Fehlermeldung: Temporäre Klasse kann nicht generiert werden (result=1).
    error CS0016: In die Ausgabedatei d:\TEMP\ppyar931.dll konnte nicht geschrieben werden -- Der Verzeichnisname ist ungültig. .

    Translation:
    The SearchPathPatternHistory-Property could not be generated by its defaults. Error: Temp class creation failed.
    error CS0016: Could not write to file d:\TEMP\ppyar931.dll -- invalid folder.

    But the folder d:\temp exists.

    Thanks again for working on the debugging of this behavior.

    Andy

     
  • AlexVallat
    AlexVallat
    2009-06-12

    Hmm... this can occur if the program is run under an account that does not have write permissions to that folder. I don't suppose you can think of any reason why that batch file might be running with different permissions than running Album Art Downloader normally?

     
  • kNiL
    kNiL
    2009-06-12

    I don't think its got something to do with permissions.
    The Batch is usually run by Foobar2000 (component "Run Services"). But I just did the test and run the batch manually as user with administrator rights in the console (cmd.exe). Same error...

     
  • AlexVallat
    AlexVallat
    2009-06-12

    Then I'm afraid I'm out of ideas. If it isn't a permissions problem, and the folder does exist, I can't think of any reason why the XmlSerializer would be unable to write to it. Sorry.

    You could try uninstalling and reinstalling the .net Framework 3.5 SP1, but I wouldn't really expect it to change anything.

     
  • kNiL
    kNiL
    2009-06-12

    Argh! OK...
    Just to make sure I provided any information that might help here I attached the last error.log.

    Thank you for the support.

     
1 2 > >> (Page 1 of 2)