baker icon indicating copy to clipboard operation
baker copied to clipboard

Crash with pre-compiled screenshots

Open adilfazal opened this issue 14 years ago • 10 comments

Hi ALL, I have about 60 pages magazine. And I am trying to use pre-compiled screenshots feature. But application crashes due to memory issue.

Thanks, Adil

adilfazal avatar Dec 28 '11 06:12 adilfazal

Uhm that's weird. I guess we could optimimize that part of the code for sure, but first: did you try removing a few of them and see if there's a number around which reliably it crashes?

folletto avatar Dec 28 '11 11:12 folletto

Hi Folletto, Yes, it works good with less pages. I have total 57 pages.

Thanks,

adilfazal avatar Dec 28 '11 11:12 adilfazal

Hi adilfazal!

I may have provided a solution for the "page limit" problems, but of course I need your help to test it out :)

Since you seems to have a pretty long book could you please try the solution I've posted in #262 with your 50+ pages book? Maybe you can duplicate some pages to have something like 70-80 pages and see how it performs.

Thank you :)

Xm4s avatar Dec 29 '11 11:12 Xm4s

Hi Marco, Thanks for quick update. I tried your solution it seems to me it have few issues. I experienced following issues.

1- Some of my html pages look different in this version. 2- In landscape mode it shows different image and shows 1/3 of one screenshot and 2/3 of other screenshot.

Thanks,

adilfazal avatar Dec 30 '11 07:12 adilfazal

Hi Marco, Actually, It have only one issue with landscape mode. 2- In landscape mode it shows different image and shows 1/3 of one screenshot and 2/3 of other screenshot.

Thanks,

adilfazal avatar Dec 30 '11 07:12 adilfazal

Hi!

Ehm ... sorry for the landscape screenshots, my bad :P Should be fixed with commit a11566bfd4dcddf4683ab7c8246437fd4d3d6afe

How many pages do you have in the book you are using for this test?

Xm4s avatar Dec 30 '11 18:12 Xm4s

Thanks for reply, I have almost 70 images. Application still crashes after few minutes.

adilfazal avatar Jan 02 '12 13:01 adilfazal

...what's in the log when it crashes? :)

folletto avatar Jan 02 '12 13:01 folletto

Hi Marco, Application crashes after 50 pages mostly. Here is log detail.

Jan 3 11:15:42 unknown configd[25] : jetsam: kernel memory event (95), free: 777, active: 1278, inactive: 737, purgeable: 193, wired: 13737 Jan 3 11:15:42 unknown cookerymag[923] : Scrolling Jan 3 11:15:42 unknown cookerymag[923] : • User scroll Jan 3 11:15:42 unknown cookerymag[923] : • Hide status bar Jan 3 11:15:42 unknown cookerymag[923] : • Scrollview will begin dragging Jan 3 11:15:42 unknown cookerymag[923] : • Hide status bar Jan 3 11:15:42 unknown cookerymag[923] : • Scrollview did end dragging Jan 3 11:15:42 unknown cookerymag[923] : • Scrollview will begin decelerating Jan 3 11:15:42 unknown cookerymag[923] : • Swiping to page: 47 Jan 3 11:15:42 unknown cookerymag[923] : • Goto page: book/19.html Jan 3 11:15:42 unknown cookerymag[923] : • Add page to the loding queue Jan 3 11:15:42 unknown cookerymag[923] : • Handle loading of slot 0 with page 47 Jan 3 11:15:42 unknown cookerymag[923] : • Setup new page for loading Jan 3 11:15:42 unknown cookerymag[923] : • Setup webView Jan 3 11:15:42 unknown cookerymag[923] : • Loading: book/19.html Jan 3 11:15:43 unknown com.apple.launchd[1] : (UIKitApplication:com.Baker.cookerymag[0x1359]) Exited: Killed: 9 Jan 3 11:15:43 unknown configd[25] : jetsam: kernel termination snapshot being created Jan 3 11:15:43 unknown SpringBoard[29] : Application 'Cookery 1' exited abnormally with signal 9: Killed: 9 Jan 3 11:15:44 unknown ReportCrash[925] : libMobileGestalt loadBasebandMobileEquipmentInfo: CommCenter error: 1:45 Jan 3 11:15:44 unknown ReportCrash[925] : libMobileGestalt copyInternationalMobileEquipmentIdentity: Could not get mobile equipment info dictionary Jan 3 11:15:44 unknown ReportCrash[925] : Saved crashreport to /Library/Logs/CrashReporter/LowMemory-2012-01-03-111544.plist using uid: 0 gid: 0, synthetic_euid: 0 egid: 0

adilfazal avatar Jan 03 '12 06:01 adilfazal

Now the screenshots are handled better, we introduced some complexity but it should avoid crashes for screenshot mode plus big books. Kudos to @Xm4s.

There are two internal variables added with Commit 8a30fc6bff5e4dd3db68d774fc2ec854a4fc68e9.

// SCREENSHOT
#define MAX_SCREENSHOT_AFTER_CP  10
#define MAX_SCREENSHOT_BEFORE_CP 10

This allows to change the number of screenshots pre-loaded. If you swipe very quickly more than this number, the usual spinner appears.

We might have to finetune the two numbers above to avoid crashes, but, overall, this works. Issue closed. :)

folletto avatar Mar 13 '12 00:03 folletto