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!

C5error with PictureVal

Status
Not open for further replies.

Gotheallblacks

Programmer
Oct 16, 2003
60
NZ
Has anybody come across C5 errors using "PictureVal" after having set the "Picture" Propery.I have spent a week trying to find a random C5 Error #@%&) Arrg

Some Interesting random ocurrances:
1) A Image object Picture(separate from my running code) was being changed by VFP to random Icons of any CmdButton or other images on the Running form.2) Random crashes
3) After some crashes even opening a table (not even in my working project) would C5 and hang.
I used to set my Image objects Picture = to a "Blank" image file and when I needed set the PictureVal using FileToStr() and could also use the Picture Property to keep the filename stored for ref.

I had Rebooted,Reloaded project,packed,zapped,checkd viruses,malware,spyware. Went from VFP 9 Sp1 to Sp2 and still no luck.
I initially thought dangling refrences and then code for a grid:
ThisForm.grdColours.grcImage.ctnImage.imagepicker.PICTURE=colours.filename
ThisForm.grdColours.grcImage.CtnImage.imagepicker.PICTUREVAL=FILETOSTR(colours.filename)
RETURN ThisForm.grdColours.BACKCOLOR

I have changed all my code use only 'Picture' property or 'PictureVal' but not Both and have "thrashed" my project and haven't had any crashes for the last 8 hours, X fingers ?







 
Hi Dave
When I was origally getting C5 errors, Yes I did , zapped,reloaded,recreated,created indexs etc.(this is all on test data so I could do this)
But one of the files I was crashing on outside my project had no memos,no indexes and this was just opening the table after starting VFP. I even thought the VFP9err.log file was corrupt. I recreated the C5 random crashes (and I mean anywhere, anytime) by setting my code back to previous (ref my prev post with regard to image objects) Crashed!. Changed it back without reindexing or loading data and have had No crashes yet ?. Its weird I am going to have to get back to this and try to recreate. I was just wondering if anyone had experienced this ?
 
Did you also delete the FOXUSER files?
That can also be the culprit.

See, I think that it may be some sort of VFP environment thing, since you don't get those errors when using other versions of the code. If you consistently got that error when loading a picture, one would think it would be the picture.

But I'm not quite clear on what you're doing. But could you use LOADPICTURE() instead of FILETOSTR()?


-Dave Summers-
[cheers]
Even more Fox stuff at:
 
Thanks Dave for your info.

I thought it might be the image(s) but I am not getting any more crashes on the same images and havn't changed any env settings. If if it comes up again I'll re-post.

Andrew Nickless

 
Well C5 has raised its ugly head again. And Dave I think you were right it was not the images . Indexes maybe??.

I wrote a full cleanup including database validate, open every table pack pack memo reindex,pack project. everything I can think of. Deleted FOXUSER.*

MY problem is ugly and confusing. My program(s) run fine.

If I start VFP which opens my project and I browse any of the tables at random some with no indexes and close the browse window VFP crashes with a C5 error.

I start again,cleanup, and browse a non Indexed file - again crash.

Is MY project corrupted or is there something else

Andrew
 
Are you, by any chance, using the October CTP for VFP SP2? It has a known bug with BROWSE.

Tamar
 
Hi Tamar Uh Yep, see my first post I went from Sp1 to Sp2 to hopefully cure my previous C5 error. Great I was starting to use all The rotation options in the new report facilities.

Thanks for the heads Up.
 
Searched and found on Wiki and SPS - To fix reinstall VFP 9.0 and install SP1. Great !!!
 
None of my business,
But why in Gods name would you run your app, and not a copy , on a Community Technology Preview (CTP). As it is exactly what the very name says, "Preview". Would it not have been easier, less frustrating, less time wasted if you had installed VFP9 on a seperate computer and then installed the CTP on it? You could have learned about the new features, changed the "copy" of your app and when VFP10 arrived, you would be ahead of the agme.
Then again like I said...None of my business.
 
ImagineCorp - Thanks for the advice read previous post. I am running on test system.
 
Sorry: Did not see it earlier...
Blame my friend JW Black... It snowed 26".. horrible day
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top