ly0738

Hi
http://esotericsoftware.com/forum/Spine-Export-is-too-Long-15406
As shown in the link, I updated and exported the latest beta, and it worked out so well!
(It's gotten much faster.. :D :D :D :D )
And I am greedy, export with rotate' option.
then
Spine Launcher 4.0.20
Esoteric Software LLC (C) 2013-2020 | http://esotericsoftware.com
Windows 10 Pro amd64 10.0
NVIDIA Corporation, GeForce GTX 1050/PCIe/SSE2, 4.6.0 NVIDIA 456.71
Starting: Spine 4.0.54-beta Professional
Spine 4.0.54-beta Professional
Licensed to: *****, *****
Started.
OpenAL 1.1, Default audio device
Packing...
Packing...
Packing...
Packing...
Packing...
Packing...
Packing...
Packing...
Packing...
Packing...
Packing...
Packing...
Packing...
Packing...
Packing...
Packing...
Packing...
Packing...
Packing...
Packing...
Writing 2048x2048: E:\spine\01_character\01_base_character\c41\unity_export\c41.png
Writing 2048x2048: E:\spine\01_character\01_base_character\c41\unity_export\c41-2.png
Writing 2048x2048: E:\spine\01_character\01_base_character\c41\unity_export\c41-3.png
Writing 2048x2048: E:\spine\01_character\01_base_character\c41\unity_export\c41-4.png
Writing 2048x2048: E:\spine\01_character\01_base_character\c41\unity_export\c41-5.png
Writing 2048x2048: E:\spine\01_character\01_base_character\c41\unity_export\c41-6.png
Writing 2048x2048: E:\spine\01_character\01_base_character\c41\unity_export\c41-7.png
Writing 2048x2048: E:\spine\01_character\01_base_character\c41\unity_export\c41-8.png
Writing 2048x2048: E:\spine\01_character\01_base_character\c41\unity_export\c41-9.png
Writing 2048x2048: E:\spine\01_character\01_base_character\c41\unity_export\c41-10.png
Writing 2048x2048: E:\spine\01_character\01_base_character\c41\unity_export\c41-11.png
Writing 2048x2048: E:\spine\01_character\01_base_character\c41\unity_export\c41-12.png
Writing 2048x2048: E:\spine\01_character\01_base_character\c41\unity_export\c41-13.png
Writing 2048x2048: E:\spine\01_character\01_base_character\c41\unity_export\c41-14.png
Writing 2048x2048: E:\spine\01_character\01_base_character\c41\unity_export\c41-15.png
Writing 2048x2048: E:\spine\01_character\01_base_character\c41\unity_export\c41-16.png
Writing 2048x2048: E:\spine\01_character\01_base_character\c41\unity_export\c41-17.png
Writing 2048x2048: E:\spine\01_character\01_base_character\c41\unity_export\c41-18.png
Writing 2048x2048: E:\spine\01_character\01_base_character\c41\unity_export\c41-19.png
Writing 2048x2048: E:\spine\01_character\01_base_character\c41\unity_export\c41-20.png
Packing...
Automatic backup complete.
Packing...
Packing...
Packing...
Packing...
Packing...
WARNING: Extremely slow file system access: E:/spine/01_character/01_base_character/c41/./images
WARNING: Memory usage:
Available / max: 772.1 kB / 2.1 GB (0.0%)
Allocated / max: 2.1 GB / 2.1 GB (100.0%)
Used / allocated: 2.1 GB / 2.1 GB (100.0%)
WARNING: Memory usage:
Available / max: 2.4 MB / 2.1 GB (0.1%)
Allocated / max: 2.1 GB / 2.1 GB (100.0%)
Used / allocated: 2.1 GB / 2.1 GB (99.9%)
ERROR: Error handling error:
[error]
at s.HyN.Z(_:243)
at s.fpM._(_:595)
at s.fpM.<init>(_:428)
at s.BfP.F(_:121)
at s.xgL._(_:37)
at s.FQR._(_:76)
at s.FQR._(_:40)
at java.lang.ThreadGroup.uncaughtException(Unknown Source)
at java.lang.ThreadGroup.uncaughtException(Unknown Source)
at java.lang.Thread.dispatchUncaughtException(Unknown Source)
WARNING: Memory usage:
Available / max: 947.8 kB / 2.1 GB (0.0%)
Allocated / max: 2.1 GB / 2.1 GB (100.0%)
Used / allocated: 2.1 GB / 2.1 GB (100.0%)
ERROR: Error handling error:
[error]
at s.HyN.Z(_:243)
at s.fpM._(_:595)
at s.fpM.<init>(_:428)
at s.BfP.F(_:121)
at s.xgL._(_:37)
at s.FQR._(_:76)
at s.FQR._(_:40)
at java.lang.ThreadGroup.uncaughtException(Unknown Source)
at java.lang.ThreadGroup.uncaughtException(Unknown Source)
at java.lang.Thread.dispatchUncaughtException(Unknown Source)
ERROR: Error handling error:
[error]
at s.HyN.Z(_:243)
at s.fpM._(_:595)
at s.fpM.<init>(_:428)
at s.BfP.F(_:121)
at s.xgL._(_:37)
at s.FQR._(_:76)
at s.FQR._(_:40)
at java.lang.ThreadGroup.uncaughtException(Unknown Source)
at java.lang.ThreadGroup.uncaughtException(Unknown Source)
at java.lang.Thread.dispatchUncaughtException(Unknown Source)
ERROR: An unexpected error has occurred:
[OutOfMemoryError] Java heap space
at java.util.ArrayList.<init>(Unknown Source)
at s.Kfq._(_:113)
at s.Kfq._(_:286)
at s.bOy._(_:423)
at s.TkJ._(_:116)
at s.fnk._(_:483)
at s.fnk._(_:460)
at 0x00000001006ad440.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
That's error look's like memory is not enough.
so, can I increase memory when exporting?
ly0738
  • Postovi: 11

Nate

That's strange. It looks like a memory leak, as Spine should not use up so much memory during packing. Is it possible to provide your images and Spine project so we can see the problem? contact@esotericsoftware.com We will keep them private.

If there is a memory leak we would prefer fixing the problem, but you can increase the amount of memory that Spine can access by running Spine from the command line like this:
spine -Xmx5000m
That would allow Spine to access up to 5,000 megabytes (5GB) of RAM.

---

Note if you are packing all images in the images folder, you'll want to avoid exporting to the images folder, else the next packing will pack all the images plus the previously exported images.
Avatar
Nate

Nate
  • Postovi: 11782

ly0738

thank you!
plz check my email
ly0738
  • Postovi: 11

Nate

Sorry it took so long! It should be working well in 4.0.56-beta. We didn't see out of memory problems, only that some meshes were getting cut off. We also fixed a number of other problems and improved the polygon packer speed a little. It still takes a couple minutes for your 1500 mesh images, but it does a good job fitting them into the smallest space. Using the Fast setting is ~3x faster, but doesn't pack quite as tightly.
Avatar
Nate

Nate
  • Postovi: 11782

spiiin

>spine -Xmx5000m

Hi!
What about MacOS version?

I am trying:
./Spine -Xmx6144m
with result:
ERROR: Unrecognized command line parameter "X": -Xmx6144m

And:
spiiin@mac MacOS % export _JAVA_OPTIONS='-Xmx6144m'
spiiin@mac MacOS % ./Spine

but looks like still have only 1gb of heap:

WARNING: Memory usage:
Available / max: 660.7 kB / 1.1 GB (0.1%)
Allocated / max: 1.1 GB / 1.1 GB (100.0%)
Used / allocated: 1.1 GB / 1.1 GB (99.9%)
ERROR: An unexpected error has occurred:
java.lang.OutOfMemoryError: Java heap space
spiiin
  • Postovi: 2

Mario

What version of the Spine launcher are you using?
Avatar
Mario

Mario
  • Postovi: 2965

spiiin

What version of the Spine launcher are you using?
Launcher 4.0.47
Spine Editor 3.8.84
(We are using it in production in our custom engine for several games, so I can't upgrade for 4 editor for now, sorry for mention old version on thread related to new version).
Also tried to version 3.8.99, same result

I tried several tricks for windows, but it' impossible to get more than 2Gb RAM - -Xmx2024m is maximum available memory, if I try to get more, I get error like this:
>Error occurred during initialization of VM
>Could not reserve enough space for 2457600KB object heap

It's impossible to get more with command line key, I found that there is some trick with patching exe on windows to get 4Gb - http://www.translatetheweb.com/?from=&to=en&a=http://forall.ru-board.com/egor23/online/FAQ/Virtual_Memory/Limits_Virtual_Memory.html to get more memory, but Spine has self-protection, and I can't test it, so I want to try mac version.

I have several hundreds of skeletons, grouped to several separate projects with self-made algorithm, so total size of output texture guaranty less than 2048x2048 (I just check size of packed rectangles of non shared atlases, there are good enough heuristic to get ~2048x(1000-1500) pixels of polygon packed shared atlases). It's pain to manual regroup those atlases, and problem to manual optimize of every skeleton, because of long time to check, if it will packed correctly or fail with memory error.

I use command line to import several skeletons to Spine Editor, and export it to make shared atlases, and it works for most atlases, but I have 1-2 atlases, that leads to java.lang.OutOfMemoryError: Java heap space. Those problem atlases has only several more skeletons than others (also, I reopen spine editor after import all skeletons, to avoid bug with no free memory mentioned here - Batch conversion), so I think, I need only some additional memory and want to try mac version for it, looks like it's possible to get more memory for 32-bit version (https://stackoverflow.com/questions/1434779/maximum-java-heap-size-of-a-32-bit-jvm-on-a-64-bit-os/1434901).

And looks like someone on this forum found a way to use more heap space for mac (Java Heap space when trying to export big texture: p58727), but I can't reproduce this solution, so I try to understand, if I doing it right.

P.S. Sorry for my English, it's not my native.
spiiin
  • Postovi: 2

Mario

Spine Editor versions below 4.0 are 32-bit applications with a limit of 2GB of process memory I'm afraid. But you can actually use Spine 4.0 to generate your atlases in the 3.8 format. I suggest you give that a try, and use 3.8 to export the skeleton data.
Avatar
Mario

Mario
  • Postovi: 2965

Nate

Note to use 4.0+ to generate an atlas for 3.8 (or < 4.0) you'll need to check Legacy output.
Avatar
Nate

Nate
  • Postovi: 11782


Natrag na Editor