[haiku-development] restart app_server

  • From: Clemens <clemens.zeidler@xxxxxxxxxxxxxx>
  • To: "haiku-development@xxxxxxxxxxxxx" <haiku-development@xxxxxxxxxxxxx>
  • Date: Sun, 08 Jan 2012 21:14:09 +1300

Hi,

reviving a BBitmap after a app_server restart works but I have some more problems with BPicture. The data of a BBitmap lives in a shared area and is cloned on client side, thus the bitmap data survives a app_server crash. In contrast, the BPicture data, if not downloaded to the client, stays on server side and goes down with the dying app_server.

Using a shared area for a BPicture is probably not the best solution because, a) the BPicture has not a fix size and reusing a area for multiple BPictures becomes complicated b) using a area for each picture vast a lot of space.

My idea is to store the BPicture record data always on client side. This can be done by recording the picture first on client side and only sending the record to the app_server when calling BView::EndPicture. This also saves all the server calls to record the picture and only one big bunch of data is send to the server. What do you thing about this?

When looking into BBitmap I noticed that the cloned area is not released when destroying the bitmap, is this intended? Also the _AssertPointer call is in my opinion unnecessary, the pointers should be valid when InitCheck is B_OK. Is this a bug or do I miss something?

thanks,
        Clemens

Other related posts: