![]() If Photoshop.exe does not think that the plugin is able to, it will call SetWindowTheme to disable Visual Themes, in order to reach a good backwards compatibility. My understanding of what is going on is: When Photoshop.exe calls the filter plugin, it somehow checks if this plugin is able to handle Visual Themes. Of course, this is not an acceptable solution, since I don't want to have a modified Photoshop.exe, and invalidate this WinAPI function call might cause thousand other side effects, and it affects all plugins. ![]() Et voilà: OldFilter.8bf has now Visual Themes enabled (or better to say: It has its themes not disabled) "XXXWindowTheme", so that the WinAPI call will fail. In the MSDN I have read that an application can disable Visual Themes by calling SetWindowTheme(hWnd, L" ", L" ")Īs a small test, I have edited Photoshop.exe with an hex editor and replaced the string "SetWindowTheme" with something else, e.g. they are Win95 compatible plugins, not Win3.11 plugins)ģ. Both have the fields MajorOperatingSystemVersion/MinorOperatingSystemVersion set to 4.00 (i.e. I checked the PE header flags of the 8BF files. I double checked that the manifest is valid and correctly added to the 8BF DLL.Ģ. But that did not work: The controls are still in Windows 9x style. So, my first idea was to simply add a Manifest ressource to OldFilter.8bf using a Resource Editor. NewFilter.8bf has an XP Manifest ressource, while OldFilter.8bf does not. their dialogs have normal WinXP/Vista/Win7/. Looking at some very old plugins, I was wondering why some plugins had Visual Themes enabled (i.e. ![]() Unhandled exception at 0x00007ff96a334d7b in Photoshop.exe: 0xC0000374: A heap has been corrupted. Is there anything special we need to do to support background save, or is this a bug in Photoshop? CC 2017 does not exhibit this behavior, nor does the Mac version of Photoshop. The documentation says "Formats that rely on Globals, Mac resource manager, or show UI after the formatSelectorWriteStart entry should not allow background save." We have an example of a noop that crashes Photoshop. As far as we can tell, there would be no way to integrate our workflow using CEP without having the background save thread. We are assuming most people aren't going to touch this setting, and in that case we plan on informing them they must enable background saving to save to our file format. We are also now aware that unfortunately background save is not a guarantee as the user can disable it in preferences. We are also developing for Mac but have only seen this instability on Windows. The compiler version doesn't seem to make a difference. I am compiling with Visual Studio 2015 0.1 Update 3 and have also tried Visual Studio 2017 15.6.2. With SupportsBackgroundSave enabled, the SimpleFormat example also crashes. Then, I set SupportsBackgroundSave in the PIPL, and blew away my Preferences. I then took the SimpleFormat example and stripped it down to the same noop and it was stable. Sometimes the crashes would occur before WriteStart was even called. After paring down our code until it was a noop (the only thing we were doing was setting *result = userCanceledErr in WriteStart) we still experienced crashes. because of a program error" errors as well as crashes (access violation, invalid handle, etc, always in Photoshop code) maybe 1 out of 5 saves. The problem is that we are experiencing "Could not save file. If the user cancels, we return *result = userCanceledErr from WriteStart. Then, on the WriteStart, which is on a background thread, we block until we receive an event from the CEP UI indicating that the user either hit OK or Cancel, or closed the dialog. To implement this we are loading our CEP extension via PlugPlug in the OptionsStart call. We also want the UI to look like and respond to the theming of Photoshop, thus the usage of CEP. When the user hits "OK" on the Save As dialog with our format selected, we want a UI to pop up similar to how a UI pops up for JPEGs. We are developing the next version of our file format plugin and an associated CEP extension for Photoshop.
0 Comments
Leave a Reply. |