It is currently Fri Dec 06, 2019 2:27 pm

All times are UTC + 1 hour




Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: Crash on certain PNG image when TGA decoder is loaded.
PostPosted: Thu Jun 20, 2019 9:13 pm 
Offline
User
User
User avatar

Joined: Sat Feb 28, 2015 1:20 pm
Posts: 45
Again, another problem with an image that when passed to LoadImage() crashed the program without any possible interference on my side to prevent the crash.

Here is the example code:
Code:
EnableExplicit

If FileSize("image.png") <= 0
  InitNetwork()
  ReceiveHTTPFile("https://drive.google.com/uc?authuser=0&id=1Kbk46OOyOU4QvKhTH4Y5-7iPbgFvcxqY&export=download", "image.png")
EndIf


; image.png can not be loaded with UsePNGImageDecoder()
; if TGAImageDecoder is also used in the program, the program crashes without any further notice.


UsePNGImageDecoder()
; UseTGAImageDecoder() ; uncomment to let the program crash.

Debug "try to load image:"
If LoadImage(0, "image.png")
  Debug "ok." ; this is never reached!
  FreeImage(0)
Else
  Debug "could not load image, but no crash"
EndIf

End

The image is downloaded when executing the code.
Code and image can be downloaded manually as well: https://drive.google.com/drive/folders/ ... sp=sharing

_________________
Programming on Windows 10 Pro / Windows 7 Enterprise / Linux Mint 19 / Manjaro Linux with PB 5, Python 3 and Go


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  

 


Powered by phpBB © 2008 phpBB Group
subSilver+ theme by Canver Software, sponsor Sanal Modifiye