webPictures go missing after a time?

Has anyone noticed that webPictures start returning not found after some number of days of running? I’ve been seeing this regularly now while developing. I’ve got 4 or 5 icons that I serve up via webPictures and setting the URL of a control in the browser to their URL property. The webPicture classes themselves are stored in module variables. They are inited at program startup, this is a standalone web app. The session value is set to nil immediately upon creating them.

(actually as I look at it they are actually created when the first session opens as I am unable to access the URL property outside of a session? Thats probably another bug report for another time)

They work for a day and a half or there abouts and after that they start returning a not-found error. It doesn’t seem to be related to sessions as I can timeout or reload or startup from multiple machines and it all works fine in the first day or so. And then if I restart the app they work fine again.

I have seen this too. Drove myself nuts trying to debug. Gave up.


Are you saying you create the WebFiles in App.Open, but they aren’t actually created until the first session opens?

I would simply refresh the pictures in session.Open. Have you tried testing the webpictures for nil ?

Just out of curiosity, is your app cgi or Standalone?

Standalone. I’ve also noticed that I cannot seem to access the .url property of a webPicture outside of a session thread. Which may be besides the point, but I’ve had to switch them all to separate file handlers to stop that and the other. I get async events over a separate socket that require me to update the display and create a new webPicture, but I can’t get that to work at all anymore with webPictures. Even properly getting the session set for the control I’m about to send it to, when I access the .url property of the new webPicture I created I get an exception.

As long as I keep a reference to the webPicture and it’s session is set to nil I should be able to reference it forever shouldn’t I? It almost feels like it’s saved the image to a temporary folder which goes away after some length of time? I’m not sure what is happening to them.

Somethings definitely wrong there. Could you show me an example of how you are initializing them?

And that exception is???

Technically, if initialized correctly they should exist until the app quits. I’ll need to see a complete sample though. How you’re creating them, how you’re accessing them and an example of an image that’s going missing.

Got distracted putting some fires out for some High Sierra problems, arrg… will get back to this soon.