pixijs / animate-extension

Custom Platform Plugin for Adobe Animate CC (Formerly Adobe Flash CC) - to export animation for the PixiJS renderer

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Electron process hanging on publish

Ch1pStar opened this issue · comments

When trying to publish a document with the images path pointing to the parent directory('../images/'), the electron process hangs and the image publish files are not created.
Also if the images path is something like 'assets/images/' and the 'assets' dir doesn't exist, there is a JavaScript error dialog in flash and you have to kill the electron process to continue.

Edit: This seems to only happen when there are bitmap images in the library.

I've noticed that the images publish path is relative to the generated JavaScript file and not the fla file, which is a problem if a published fla file is part of a project that has different and deeper dir structures for assets and js files.

My current solution is to have the correct images path in the publish dialog and move the images afterwards, but the path needs to be something like '../assets/images/', which triggers this bug.

Different versions of Electron do not seem to affect this. I'm using Flash 15.0.0.

@Ch1pStar could you provide a sample FLA to test/debug this?

ColorTransforms.zip

This is the ColorTransforms.fla from the extension examples repo, with just the images path changed from 'images/' to '../images/'.

Some more info on the issue, when using the debug build of the extension there is an assertion fail in https://github.com/jiborobot/pixi-animate-extension/blob/master/src/PixiAnimate/src/OutputWriter.cpp#L751.
This is happening in Windows 8.1 with Animate 16.0.1 and Windows 10 with Flash 15.0.0, by the way.

@bigtimebuddy Some updates
bitmapExportService->ExportToFile(pMediaItem, pFilePath, 100), with pFilePath being something like
C:\Projects\test\..\images\images.jpg fails the FCM_SUCCESS_CODE assertion and has the value FCM_INVALID_PARAM.
When testing with a hardcoded path, without '..' e.g C:\Projects\images\images.jpg, everything is fine.

I'm currently looking for a path utility function, that could resolve C:\Projects\test\..\images\images.jpg into C:\Projects\images\images.jpg, could use some help on that one.

That would be great if you could help find something. My C++ is pretty rudimentary.

@bigtimebuddy Added a fix for this to my pull request. #37

Merged.