Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Image1.picture = LoadPicture(.....) crashes the IDE on some files

Status
Not open for further replies.

BruceHesher

Programmer
Jul 7, 1999
50
US
I have written a program that has a filelist box that displays the GIF, JPG, etc. files in the selected folder.<br>
When the user clicks on a file it is loaded into an image control using the LoadPicture function. Works great on most files but, some crash the program (and the VB IDE if running within the IDE). Any ideas ?
 
How big are they? are you absolutly sure they are images?<br>
Put an error trap <br>

 
Hi Hug,<br>
The size of the file soes not matter. The program has no problem with files from 1 byte to many MB in size.<br>
<br>
Yes, they are images. The program displays the header.<br>
<br>
I do have an error trap already. It does not activate.<br>
<br>
Interestingly, LView Pro reports that some of the files have a "Premature EOF"; however I believe this is a misnomer. I think the issue is that the file was saved by the web browser even though it was not completely downloaded and therefore has no EOF marker. Then when LoadPicture reads it it does not stop until the PC is out of memory. This and the fact that the VB IDE crashes makes me think it is a Microsoft issue.<br>
Bruce<br>

 
Yes!, I was able to replicate the same error, I am trying to figure it out.
 
hi
I know this is a bit late, but i am just dealing with this problem now, other programs such as ACDsee can read these file with no problems, I have given my program to a friend , and has the same problems but itt only occured when he convertes a gif to a jpg.

Did you find the cause?

Please help
james cuttance
 
Hi James,
No, I have not resolved this issue. Any help you can give would be appreciated.

Bruce
 
hi james again
I still cant seem to find the fix to the problem and i cant get an error trap to work ,did you manage to get an error discription?

I have hunted for an answer everywhere, i am just about at my wits end.

I have vreated a cataloging program which catalogues media like DVD, SOFTWARE ,GAMES ect and you can add images, i have spent about 6 months finishing this program off and it works great and a lot of people are using it but this is the only bug in the whole program, i have even made it so a JPG is the only image file type it will use but for some reason every now and then a JPG file will just crash it, it only seems to 1 in every hundred images i use, i have tried the following..

Partly downloaded an image file(not completed) &quot;No Error&quot;

Used an image that was 66meg &quot;no error&quot;

HELP!

I want to fix or at least find whats causing this error.

What have you tried
any help would be much appreciated.

At the moment i am using about 350 different JPG files in my program, some downloaded, some scanned and some from a digital camera yet i have no errors with these images.
i went ito temp internet folder and opened alot of images from here and i managed to find one that caused this error, yet i have had 6 people send me emails telling me that they have had this problem. AHHHRRRR! HELP


Ill keep hunting but if youve got anymore info please let me know.

James cuttance
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top