Photoshop falls into infinite loop trying to determine temporary filename on sharepoint volume

  • 3
  • Problem
  • Updated 6 years ago
  • In Progress
  • (Edited)
Consider this:
You have a SharePoint library mapped to a local drive letter.
You're opening an image file from the locally mapped library.
You try to save the file.

This will cause Photoshop to permanently hang in a loop trying to determine a temporary filename for the the image using GetTempFileNameW().
Sadly, the return value of GetTempFileNameW() isn't properly interpreted by Photoshop.
The return value is 0xC0000903 (STATUS_BAD_FILE_TYPE).

Photoshop will run an infinite loop trying to find a "working temporary filename". Which will never succeed.

The actual problem is the ~ in the temporary filename (although I don't know if that is configuration specific). Notepad or Explorer will correctly identify the error case.

Information about the characters that you cannot use in sites, folders, and files in SharePoint: http://support.microsoft.com/kb/905231
Photo of Oliver Salzburg

Oliver Salzburg

  • 3 Posts
  • 0 Reply Likes

Posted 6 years ago

  • 3
Photo of Chris Cox

Chris Cox

  • 20280 Posts
  • 812 Reply Likes
How are you saving the file, and what file format are you using?

OK, found the call in the CS5 sources, but the only ~ I've found in a filename pattern is limited to video.
Photo of Oliver Salzburg

Oliver Salzburg

  • 3 Posts
  • 0 Reply Likes
In case it helps:


ntdll.dll!NtCreateFile+0xa
KERNELBASE.dll!CreateFileW+0x2b6
KERNELBASE.dll!GetTempFileNameW+0x25a
Photoshop.exe+0x10ac45c
Photoshop.exe+0x10adcbb
Photoshop.exe+0x10aed44
Photoshop.exe+0x672d85
Photoshop.exe+0x639190
Photoshop.exe+0x1042a41
Photoshop.exe+0x1041f2f
Photoshop.exe+0x10412eb
Photoshop.exe+0x103e79b
Photoshop.exe+0x10b2ce7
Photoshop.exe+0x10b6477
Photoshop.exe+0x10d9c78
Photoshop.exe+0x110bda0
Photoshop.exe+0x16c972
Photoshop.exe+0x10dc1c0
Photoshop.exe!std::_Init_locks::operator=+0x81f
kernel32.dll!BaseThreadInitThunk+0xd
ntdll.dll!RtlUserThreadStart+0x21


This is with the 5.1 x64 binary (12.1.0.0)

The filenames MakeTempFileName tries to use (determined through Process Monitor log) all begin with "~ps"

I have observed this with .png and .jpeg files. I think it only happens when saving the file you've opened (so without creating a copy). I think Save for Web & Devices works as well.
Photo of Chris Cox

Chris Cox

  • 20280 Posts
  • 764 Reply Likes
The only place we have ~ps is as as file extension for some video temporary files. But I'm still debugging it to see if perhaps a filename is being constructed that has those characters.
Photo of Chris Cox

Chris Cox

  • 20280 Posts
  • 764 Reply Likes
Ah ha! Found out why I can't find that string: it no longer exists in the current source. That was a problem in CS5, but has since been fixed.
Photo of Oliver Salzburg

Oliver Salzburg

  • 3 Posts
  • 0 Reply Likes
Ah, good to hear. Good job :)
Photo of Joel

Joel

  • 1 Post
  • 0 Reply Likes
Chris, as of what version is this supposed to be fixed for?

I have 300+ users migrating files to a sharepoint 2010 deployment via secure webdav (https); multiple tickets have been submitted to me regarding this issue. I believe everybody is using 12.0.4 x64 as that is what currently resides on the staff image I am testing from.