Crashing during overlay

Help on issues you run into with LapTimer; in case you have a question on how to use LapTimer, use the forum "Using LapTimer" instead
kioneo
Fewer than 10 Posts
Fewer than 10 Posts
Posts: 3
Joined: Fri Jun 24, 2016 6:04 pm

Re: Crashing during overlay

Post by kioneo »

Sorry to bring up an old thread, but I am experiencing crashes during overlay with large videos and heart rate monitor information. Smaller 1-2 lap videos work fine even with heart rate monitor data. But when overlaying an entire session (9 laps, ~20 minutes) it crashes at about 91%. *However*, if I remove my heart rate data from Apple Health App, the overlay completes successfully.

1) iPhone 5S
2) iOS 9.3.2, Harry's Lap Timer v20.0.14
3) Original video from GoPro Hero3+ Black.
4) Directly from GoPro, no editing. 1080p @ 30fps. ~3.3GB. Transferred via the iTunes method.
5) No PiP and no Reference Lap.
6) Each lap about 2 min, 9 laps total. Finished video with no heart rate info is 20:20.
7) Only when including heart rate info, it crashes near 91%. I get a 0:00:00 length video of about 3.1GB. Again, removing the heart rate info from Apple Health App allows the overlay to complete successfully.

Of note, the hear rate data in Apple Health is stored at one sample every second. Will be doing some testing now with Xcode Instruments to see what is presumably eating up memory, and will update this post once I do so.
User avatar
Harry
Site Admin
Site Admin
Posts: 10635
Joined: Sun Sep 12, 2010 10:32 am
Location: Siegum, Germany
Contact:

Re: Crashing during overlay

Post by Harry »

Hi,

What is the base edition of LapTimer you are using (i.e. the one bought initially - before adding optional upgrades like Petrolhead / GrandPrix)? I will check if I can find crash logs on this.

- Harry
Image Image Image Image
kioneo
Fewer than 10 Posts
Fewer than 10 Posts
Posts: 3
Joined: Fri Jun 24, 2016 6:04 pm

Re: Crashing during overlay

Post by kioneo »

GrandPrix. I went right for the max from the start.

Also, to update, I have an Instruments trace from my iPhone during the overlay with heart rate data. Not sure if it will help, but what I noticed is that memory usage by HLT climbed steadily to peak around 180MB before going down to 150MB and crashing (this time it made it to 94%). I quit all other apps before starting the conversion and also did see in the trace that a few minutes before things crashed the iPhone started killing off several other processes. If you need the trace, I can PM you the Dropbox link.
User avatar
Harry
Site Admin
Site Admin
Posts: 10635
Joined: Sun Sep 12, 2010 10:32 am
Location: Siegum, Germany
Contact:

Re: Crashing during overlay

Post by Harry »

That's the reason I didn't find a crash log, they are not generated for out of memory situations... But this pretty much makes clear where the issue is. It seem the heart beat part allocates memory that is freed at the end of the overlay only. So the longer the overlay is, the more memory is required.

Harry
Image Image Image Image
User avatar
Harry
Site Admin
Site Admin
Posts: 10635
Joined: Sun Sep 12, 2010 10:32 am
Location: Siegum, Germany
Contact:

Re: Crashing during overlay

Post by Harry »

I have reproduced a slight increase of memory requirements with heart rates overlaid. There is a slight increase along overlays independent from heart rates too. Heart rates add around 4MB main memory reqs. per minute of video, which makes approximately 80MB for your long video. Adding an additional autorelease pool (you are using Instruments, so you are most probably familiar with this), roughly reduced this amount by 50%, thus 40 MB temporary memory requirements remain. There are no leaks here, so it is really a temporary requirement for media management and other library (like HK) access.

The optimization will go into the next bugfix release. As there are no severe issues around currently, it will require some time until it will get available. Thanks for the report.

- Harry
Image Image Image Image
kioneo
Fewer than 10 Posts
Fewer than 10 Posts
Posts: 3
Joined: Fri Jun 24, 2016 6:04 pm

Re: Crashing during overlay

Post by kioneo »

I can confirm v20.0.16 works great exporting videos with heart rate data. Thanks so much for the quick fix and awesome app!
Post Reply