Bug #262
closedTakeScreenshot HTTP API call failing
100%
Description
Taking a screenshot (with download) using TakeScreenshot HTTP API is failing - this is not a newly introduced issue.
It seems to take the screenshot ok and save it as a temporary BMP file (Z:), but it will fail the next step converting to JPG.
18:37:52 M: 35360768 DEBUG: HttpApi Start command: TakeScreenshot paras: TakeScreenshot; ;false;0;1280;720;100;true
18:37:54 M: 35360768 INFO: Screen shot saved as special://temp/temp.bmp
18:37:54 M: 31674368 DEBUG: ------ Window Init (DialogBusy.xml) ------
18:37:54 M: 31674368 INFO: Loading skin file: DialogBusy.xml
18:37:54 M: 30314496 DEBUG: Dll MSVCP71.dll was not found in path
18:37:54 M: 30314496 DEBUG: Unable to load referenced dll MSVCP71.dll - Dll: Q:\system\ImageLib.dll
18:37:54 M: 30314496 DEBUG: msg: PICTURE::ConvertFile: Unable to open image: special://temp/temp.bmp Error:
18:37:54 M: 30314496 ERROR: PICTURE: Error 7 converting image special://temp/temp.bmp
Files
Updated by buzz about 11 years ago
- Status changed from New to In Progress
- Assignee changed from dandar3 to buzz
I mentioned on the forum it was related to directory cache. this is true, but not due to a bug in the cache as I first thought. When making a screenshot, the VFS is bypassed for saving the file, and it is saved with an XDK call XGWriteSurfaceToFile. This means, although Z:/ is in the directory cache, the file is not so an Exists() call fails.
A future fix/improvement would be to use the VFS for saving the screenshot, and perhaps converting the file to a png at the same time. For now my fix will be to manually add the file to the directory cache after it is saved.
Updated by buzz about 11 years ago
- Status changed from In Progress to Closed
- Target version changed from Future / Pending to 3.5
- % Done changed from 0 to 100
- Resolution set to fixed
fixed in r32590 - further details in the commit message and commit.