crash on ios 7

155 views
Skip to first unread message

Rafael Crespo

unread,
Oct 15, 2013, 3:08:06 AM10/15/13
to leaves-d...@googlegroups.com
Hello,

I have been using leaves in ios 6 without problem but since ios 7 was released, leaves is crashing

The problem is the same as this :


Can anyone help me ?

Thanks

Salvatore Ansani

unread,
Oct 17, 2013, 4:08:05 PM10/17/13
to leaves-d...@googlegroups.com
I'm working on iOS7 bug fix update.

S


--
You received this message because you are subscribed to the Google Groups "Leaves Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to leaves-develop...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Rafael Crespo

unread,
Oct 17, 2013, 4:10:59 PM10/17/13
to leaves-d...@googlegroups.com
I found the solution for the pdf.


 LeavesCache.m

- (CGImageRef)cachedImageForPageIndex:(NSUInteger)pageIndex {

NSNumber *pageIndexNumber = [NSNumber numberWithInt:pageIndex];

UIImage *pageImage;

@synchronized (pageCache) {

pageImage = [pageCache objectForKey:pageIndexNumber];

}

if (!pageImage) {

CGImageRef pageCGImage = [self imageForPageIndex:pageIndex];

        if (pageCGImage) {

            pageImage = [UIImage imageWithCGImage:pageCGImage];

            @synchronized (pageCache) {

                [pageCache setObject:pageImage forKey:pageIndexNumber];

            }}

}

return pageImage.CGImage;

}



2013/10/17 Salvatore Ansani <ans...@gmail.com>

--
You received this message because you are subscribed to a topic in the Google Groups "Leaves Developers" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/leaves-developers/gsQ7UTWhF6M/unsubscribe.
To unsubscribe from this group and all its topics, send an email to leaves-develop...@googlegroups.com.

ron johnson

unread,
Oct 17, 2013, 4:21:53 PM10/17/13
to leaves-d...@googlegroups.com

I was working on this two!!! Rafael, can you upload working ios7 code for us?

Rafael Crespo

unread,
Oct 17, 2013, 4:28:32 PM10/17/13
to leaves-d...@googlegroups.com
I dont know how to do this.

To correct the bug, you only need to add this line of code

if (pageCGImage) 

in the cachedImageForPageIndex method

In my previous email, I sent the code for the method - (CGImageRef)cachedImageForPageIndex:(NSUInteger)pageIndex

Please upload this code to github.









2013/10/17 ron johnson <ronjoh...@gmail.com>

Tom Brow

unread,
Oct 20, 2013, 11:10:01 PM10/20/13
to leaves-d...@googlegroups.com
This bug is fixed in Leaves 1.0.0. All you need to do is update. Sorry for the delayed response.

ssm...@gmail.com

unread,
Dec 4, 2013, 3:27:22 AM12/4/13
to leaves-d...@googlegroups.com, t...@tombrow.com

I still have the problem. Can anyone help please.
If I comment this block out:

//if (pageCGImage) {
   //pageImage = [UIImage imageWithCGImage:pageCGImage];
   //@synchronized (self.pageCache) {
        //(self.pageCache)[pageIndexNumber] = pageImage;
   //}
 //}

the App is running OK, but just with the blank page.
But if I run with the above block, I got and error.
Reply all
Reply to author
Forward
0 new messages