# Segmentation Fault

**URL:** <https://forums.imgtec.com/t/segmentation-fault/1303>\
**Category:** PowerVR Insider\
**Tags:** pvrtextool\
**Created:** [February 6, 2012, 3:31am UTC](https://forums.imgtec.com/t/segmentation-fault/1303 "2012-02-06T03:31:22Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![davecazz](https://avatars.discourse-cdn.com/v4/letter/d/3ab097/32.png) [@davecazz](https://forums.imgtec.com/u/davecazz)\
**Post date:** [February 6, 2012, 3:31am UTC](https://forums.imgtec.com/t/segmentation-fault/1303/1 "2012-02-06T03:31:22Z")

</div>

Just ran into an issue converting some of our texture atlases to a PVRTC4 pvr file.  
  
  
  
  
  
The command line just returns as "Segmentation Fault: 11"  
  
  
  
  
  
The error is sporadic it happens probably 70% of the time on 3 of our files. on most of our files it doesnt happen at all though, seems like there is some pixel configuration that is causing some instability.  
  
  
  
  
  
here is the commandline  
  
  
  
  
  
/Users/dave/Perforce/p4bonus\_1666/CrackerAss/iPhone/PocketGodUranus/…/pvrtextool/pvrtextoolcl/macos\_x86/pvrtextool -fOGLPVRTC4 -iTextureAtlasPvr4.png -oTextureAtlasPvr4 -p -pvrtcbest -yflip 0  
  
  
  
  
  
I tried to pair down some of the options to see if it had anything to do with the pvrtc quality or y flip and it seems to happen regardless.  
  
  
  
  
  
here are two files it seems to especially have problems with.  
  
  
  
  
  
[http://dev.boltcreative.com/pocketgod/TextureAtlasPvr2.png](http://dev.boltcreative.com/pocketgod/TextureAtlasPvr2.png)  
  
  
[http://dev.boltcreative.com/pocketgod/TextureAtlasPvr4.png](http://dev.boltcreative.com/pocketgod/TextureAtlasPvr4.png)

---

<div class="post-metadata">

**Author:** ![davecazz](https://avatars.discourse-cdn.com/v4/letter/d/3ab097/32.png) [@davecazz](https://forums.imgtec.com/u/davecazz)\
**Post date:** [February 6, 2012, 5:17am UTC](https://forums.imgtec.com/t/segmentation-fault/1303/2 "2012-02-06T05:17:13Z")

</div>

I just confirmed that that the pvr4 image crashes not only in the mac command line, but also the gui for both mac and windows.

---

<div class="post-metadata">

**Author:** ![tobias](https://avatars.discourse-cdn.com/v4/letter/t/c67d28/32.png) [@tobias](https://forums.imgtec.com/u/tobias)\
**Post date:** [February 6, 2012, 6:32am UTC](https://forums.imgtec.com/t/segmentation-fault/1303/3 "2012-02-06T06:32:43Z")

</div>

Hi davecazz,  
  
This is probably the same problem that we’ve been seeing in the pvrtc library here.  
  
If you could email [devtech@imgtec.com](mailto:devtech@imgtec.com) I can send you an updated version of the tool.  
  
Thanks,  
  
Tobias

---

<div class="post-metadata">

**Author:** ![davecazz](https://avatars.discourse-cdn.com/v4/letter/d/3ab097/32.png) [@davecazz](https://forums.imgtec.com/u/davecazz)\
**Post date:** [February 6, 2012, 7:07am UTC](https://forums.imgtec.com/t/segmentation-fault/1303/4 "2012-02-06T07:07:48Z")

</div>

thanks, btw one thing that would be helpful, is to be able to export a decompressed image along with the pvr in the same command line statement.  
  
  
  
  
  
since I like to have a decompressed version so I can easily check for garbage, I end up running the pvrtextool twice for each image in my build process which performs the encoding twice and takes twice as much time.  
  
  
  
  
  
would be awesome to include -dFileName.png and have it just save off the decompressed copy when it creates the pvr file.

---

<div class="post-metadata">

**Author:** ![tobias](https://avatars.discourse-cdn.com/v4/letter/t/c67d28/32.png) [@tobias](https://forums.imgtec.com/u/tobias)\
**Post date:** [February 6, 2012, 7:28am UTC](https://forums.imgtec.com/t/segmentation-fault/1303/5 "2012-02-06T07:28:29Z")

</div>

Hi Dave,  
  
Unfortunately I won’t be able to add this for our coming release, but I’ll look into adding it for a future release. This certainly makes sense as it would be useful for developers to be able to do on the fly error checking without having to call it twice, I imagine you’re not alone in doing this.  
  
I’ve submitted a feature request into our bug tracking system under BRN35895 - this is an internal tracker, but look for this BRN in our release notes.  
  
Thanks,  
  
Tobias
