# PVRTexLib\_TranscodeTexture hangs when processing ETC textures

**URL:** <https://forums.imgtec.com/t/pvrtexlib-transcodetexture-hangs-when-processing-etc-textures/3346>\
**Category:** PowerVR Insider\
**Tags:** pvrtextool\
**Created:** [January 22, 2021, 7:17pm UTC](https://forums.imgtec.com/t/pvrtexlib-transcodetexture-hangs-when-processing-etc-textures/3346 "2021-01-22T19:17:32Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alexx999](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.imgtec.com/alexx999/32/387_2.png) [@Alexx999](https://forums.imgtec.com/u/Alexx999)\
**Post date:** [January 22, 2021, 7:17pm UTC](https://forums.imgtec.com/t/pvrtexlib-transcodetexture-hangs-when-processing-etc-textures/3346/1 "2021-01-22T19:17:33Z")

</div>

Hi,

For us, it hangs randomly when doing DDS-\>ETC conversion.  
We’ve been able to trace it down to Etc::Image::Encode method - there’s some problem with thread synchronization there that leads to a deadlock.  
The solution is to limit the number of threads, which is sadly not possible using the API and we had to patch the DLLs to achieve it.  
It would be nice to see the deadlock fixed and some threading controls in the DLL.

---

<div class="post-metadata">

**Author:** ![AlejandroC](https://avatars.discourse-cdn.com/v4/letter/a/97f17d/32.png) [@AlejandroC](https://forums.imgtec.com/u/AlejandroC)\
**Post date:** [January 25, 2021, 10:27am UTC](https://forums.imgtec.com/t/pvrtexlib-transcodetexture-hangs-when-processing-etc-textures/3346/2 "2021-01-25T10:27:17Z")

</div>

Hi Alexx999,

Welcome to the PowerVR Developer Forum!

Many thanks for your message. Could you please give some information about the PVRTexLib and OS versions where you’re experiencing those issues?

Best regards and many thanks in advance,  
Alejandro

---

<div class="post-metadata">

**Author:** ![Alexx999](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.imgtec.com/alexx999/32/387_2.png) [@Alexx999](https://forums.imgtec.com/u/Alexx999)\
**Post date:** [January 25, 2021, 4:15pm UTC](https://forums.imgtec.com/t/pvrtexlib-transcodetexture-hangs-when-processing-etc-textures/3346/3 "2021-01-25T16:15:46Z")

</div>

PVRTexLib is the latest one, DLL version 5.0.0 from 2020 R2 PVRTexTool installer.  
Windows version is 10.19042.782  
My CPU is AMD Ryzen 9 5950X 16-Core, however, this problem shows up on lower core counts as well.

---

<div class="post-metadata">

**Author:** ![AlejandroC](https://avatars.discourse-cdn.com/v4/letter/a/97f17d/32.png) [@AlejandroC](https://forums.imgtec.com/u/AlejandroC)\
**Post date:** [January 25, 2021, 6:13pm UTC](https://forums.imgtec.com/t/pvrtexlib-transcodetexture-hangs-when-processing-etc-textures/3346/4 "2021-01-25T18:13:34Z")

</div>

Many thanks Alexx999,

I’ll handle the information to the Tools Team and come back to you when I have feedback.

Best regards,  
Alejandro

---

<div class="post-metadata">

**Author:** ![AlejandroC](https://avatars.discourse-cdn.com/v4/letter/a/97f17d/32.png) [@AlejandroC](https://forums.imgtec.com/u/AlejandroC)\
**Post date:** [January 28, 2021, 2:59pm UTC](https://forums.imgtec.com/t/pvrtexlib-transcodetexture-hangs-when-processing-etc-textures/3346/5 "2021-01-28T14:59:22Z")

</div>

Hi Alexx999,

The Tools Team has addressed the _PVRTexLib\_TranscodeTexture_ hang issue and backported it to the PVRTexTool release available in the IMG website ([here](https://www.imaginationtech.com/developers/powervr-sdk-tools/installers/)).

The current PVRTexTool version in the website has build number 20.2@5880259. The new version with the fix for _PVRTexLib\_TranscodeTexture_ should arrive tomorrow, look for build number 20.2@5915875.

Regarding the threading control, there’re plans to tackle this in the future, but currently it’s not specified when it will happen.

Best regards,  
Alejandro

---

<div class="post-metadata">

**Author:** ![Alexx999](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.imgtec.com/alexx999/32/387_2.png) [@Alexx999](https://forums.imgtec.com/u/Alexx999)\
**Post date:** [January 31, 2021, 10:32pm UTC](https://forums.imgtec.com/t/pvrtexlib-transcodetexture-hangs-when-processing-etc-textures/3346/6 "2021-01-31T22:32:59Z")

</div>

Hi Alejandro,  
I’m really glad to hear you’ve been able to find (and fix) the issue so quickly.  
However, I hope that by “PVRCarbon” you mean updated PVRTexTool? 🙂

Anyway, it seems that neither is updated as of now.

---

<div class="post-metadata">

**Author:** ![AlejandroC](https://avatars.discourse-cdn.com/v4/letter/a/97f17d/32.png) [@AlejandroC](https://forums.imgtec.com/u/AlejandroC)\
**Post date:** [February 1, 2021, 9:12am UTC](https://forums.imgtec.com/t/pvrtexlib-transcodetexture-hangs-when-processing-etc-textures/3346/7 "2021-02-01T09:12:17Z")

</div>

Hi Alexx999,

You’re right, I was meaning PVRTexTool (I edited my previous message to fix that).

I checked and I can see the PVRTexTool version from the IMG SDK website has not been updated yet. We’ll ask for more information about it and come back to you.

Best regards,  
Alejandro

---

<div class="post-metadata">

**Author:** ![AlejandroC](https://avatars.discourse-cdn.com/v4/letter/a/97f17d/32.png) [@AlejandroC](https://forums.imgtec.com/u/AlejandroC)\
**Post date:** [February 1, 2021, 3:03pm UTC](https://forums.imgtec.com/t/pvrtexlib-transcodetexture-hangs-when-processing-etc-textures/3346/8 "2021-02-01T15:03:34Z")

</div>

Hi Alexx999,

Currently IMG is providing fixed versions of the Tools through the Support Portal, sorry for the confusion about getting it from the webpage.

To get a version of PVRTexTool with the fix, I’ll ask you please to go through our Support Portal ([https://pvrsupport.imgtec.com/](https://pvrsupport.imgtec.com/)) and raise a ticket asking for an internal version of PVRTexTool (don’t forget to specify the OS you want).

Best regards,  
Alejandro
