Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Bad Huffman Compression  (Read 4760 times)

0 Members and 1 Guest are viewing this topic.

Sicarius43696

  • Newbie
  • *
  • Posts: 16
    • View Profile
Bad Huffman Compression
« on: April 28, 2010, 04:25:58 am »
Occasionally when loading an image, I get a debug message saying Bad Huffman Compression.

I can get more info on this later, but any ideas as to what it is related?

dunce

  • Jr. Member
  • **
  • Posts: 77
    • View Profile
Bad Huffman Compression
« Reply #1 on: April 28, 2010, 05:33:43 am »
Maybe the image data is corrupted. Though JPEG library gives more accurate debug info in this case: "Corrupt JPEG data: bad Huffman code".

Walker

  • Full Member
  • ***
  • Posts: 181
    • View Profile
Bad Huffman Compression
« Reply #2 on: April 28, 2010, 05:42:48 am »
PNGs use DEFLATE which uses huffman coding to compress data. I think JPEG also utilises the Huffman algorithm at some point.

When you say "occasionally", do you mean occasionally on a particular image, or occasionally you have one image that wont work and you can replace it and it works?

What do you use to create images?

gsaurus

  • Sr. Member
  • ****
  • Posts: 262
    • View Profile
    • Evolution Engine
Bad Huffman Compression
« Reply #3 on: April 28, 2010, 05:42:03 pm »
Also you can open those images with other programs? Can you provide us with an image that gives that error?
Pluma - Plug-in Management Framework

Sicarius43696

  • Newbie
  • *
  • Posts: 16
    • View Profile
Bad Huffman Compression
« Reply #4 on: April 29, 2010, 02:51:56 am »
Here's the call stack when it crashes.

#0 00484896   zget8()
#1 004848E3   fill_bits()
#2 00484959   zhuffman_decode(z=0x6abc730)
#3 00484B4D   parse_huffman_block()
#4 004853DC   parse_zlib(parse_header=1)
#5 00485434   do_zlib(obuf=0xd0aced0 "8+f\r\020qW\rîþîþîþîþîþîþîþîþîþîþîþîþîþîþîþîþîþîþîþîþîþîþîþîþîþîþîþîþîþîþîþîþîþîþîþîþîþîþîþîþîþîþîþîþîþîþîþîþîþîþîþîþîþîþîþîþîþîþîþîþîþîþîþîþîþîþîþîþîþîþîþîþîþîþîþîþîþîþîþîþîþîþîþîþîþîþîþîþîþîþîþîþîþîþîþîþ"..., olen=16384, exp=1, parse_header=1)
#6 0048547B   stbi_zlib_decode_malloc_guesssize(initial_size=16384, outlen=0xed7f3fc) (D:/Programmation/Cpp/SFML/tags/1.5/src/SFML/Graphics/SOIL/stb_image_aug.c:1829)
#7 004854E0   stbi_zlib_decode_malloc(buffer=0xd980020 "XÃ…\230Í\217\\W\021Å\177Uuß›ž±\215mœÄò\220(DQ\024\004B¬\220\"±\002\026‘\b°‹Ø±aÇ’¿%‚\210\035\022\vÄ\016„\"\201„ØÀŠ\005\bœ\020)
#8 00486B78   parse_png_file(scan=0, req_comp=4)
#9 00486DB7   do_png(x=0xed7f928, y=0xed7f924, n=0xed7f920, req_comp=4)
#10 00486F54   stbi_png_load_from_memory(buffer=0xd6a2eb8 "Ä", len=285292, x=0xed7f928, y=0xed7f924, comp=0xed7f920, req_comp=4)
#11 00480756   stbi_load_from_memory(buffer=0xd6a2eb8 "Ä", len=285292, x=0xed7f928, y=0xed7f924, comp=0xed7f920, req_comp=4)
#12 00466D55   SOIL_load_image_from_memory(buffer=0xd6a2eb8 "Ä", buffer_length=285292, width=0xed7f928, height=0xed7f924, channels=0xed7f920, force_channels=4)
#13 0045B383   sf::priv::ImageLoader::LoadImageFromMemory(this=0x6ab86a0, Data=0xd6a2eb8 "Ä", SizeInBytes=285292, Pixels=..., Width=@0x75efb90, Height=@0x75efb94)
sf::Image::LoadFromMemory(this=0x75efb78, Data=0xd6a2eb8 "Ä", SizeInBytes=285292)

This is a link to the image.
http://yfrog.com/0fspritezombiep

Trass3r

  • Jr. Member
  • **
  • Posts: 91
    • View Profile
Bad Huffman Compression
« Reply #5 on: May 06, 2010, 08:25:05 pm »
Your image seems to use interlacing?!
Maybe that's the cause. Apart from that it's quite odd to use interlacing in a non-web application.

 

anything