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

Author Topic: Strange Error Out at Run  (Read 2198 times)

0 Members and 1 Guest are viewing this topic.

Ashenwraith

  • Sr. Member
  • ****
  • Posts: 270
    • View Profile
Strange Error Out at Run
« on: June 04, 2010, 06:59:37 am »
I have several programs I made using renderImage and they compiled and ran fine.

I tried executing them today and they errored out with a return. So I quit all programs and tried compiling other code and it worked fine.

So I recompiled and ran the renderImage programs but they still errored out no matter what I did. Putting some cout checks I found it always errored out at RenderImage.Create(w,h);

I put in the if available checks but it didn't seem to matter.

Now I restarted my computer and the original code/programs work fine.

Any ideas what this may be?

Ashenwraith

  • Sr. Member
  • ****
  • Posts: 270
    • View Profile
Strange Error Out at Run
« Reply #1 on: June 04, 2010, 08:39:09 am »
After doing some other tests I can replicate the error..

Most of my images are in 8b/indexed color.

Almost all of the images work.

Now the ones that do not work are the same pallete and format of the other pngs--created in the same set.

If I keep making the background canvas size bigger and saving eventually a size will work. If I keep making the background canvas a bit smaller, eventually a size will work--same thing.

But if I convert the original to 32b/RGB it ALWAYS works (without resizing the png).

It's really strange.

I think there is something going on with the header read/auto-conversion.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Strange Error Out at Run
« Reply #2 on: June 04, 2010, 08:59:25 am »
Quote
Most of my images are in 8b/indexed color.

PNG?
Laurent Gomila - SFML developer

Ashenwraith

  • Sr. Member
  • ****
  • Posts: 270
    • View Profile
Strange Error Out at Run
« Reply #3 on: June 04, 2010, 09:32:32 am »
Yeah,  8b/indexed png

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Strange Error Out at Run
« Reply #4 on: June 04, 2010, 09:38:36 am »
It's not clear from the documentation, but SOIL (which uses stb_image) may have problems with 8-bits indexed PNGs. You should not use this format.
Laurent Gomila - SFML developer

Ashenwraith

  • Sr. Member
  • ****
  • Posts: 270
    • View Profile
Strange Error Out at Run
« Reply #5 on: June 04, 2010, 09:50:42 am »
I thought it was that, but you know 90+% of my 8bit images work and if I resize the image to different sizes it will work.

It seems like it must be a simple bug.

I mean an 8b png is often 50+% smaller file size than a 32b png. That really adds up when you have a lot of sprites.

 

anything