Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Memory-related crash #65

Open
kvaDrug opened this issue Jan 20, 2024 · 0 comments
Open

Memory-related crash #65

kvaDrug opened this issue Jan 20, 2024 · 0 comments

Comments

@kvaDrug
Copy link

kvaDrug commented Jan 20, 2024

Hello! I'm looking to solve the crash in my app, a WatchKit complication, to be precise. I already searched all of the common places - no clues. I came here since the crash log contains lzfse symbols, so may be you know the source of this bug.

The error I get:

Thread 1: EXC_RESOURCE (RESOURCE_TYPE_MEMORY: high watermark memory limit exceeded) (limit=15 MB)

The call stack:

Thread 1 Queue : com.apple.main-thread (serial)
#0	0x507c8864 in lzfseDecode ()
#1	0x507c788c in lzfse_decode_buffer ()
#2	0x507c645c in compression_decode_buffer ()
#3	0x52200ff0 in Deepmap2DecodeDefault ()
#4	0x5221d184 in DecodeTiledImage ()
#5	0x521ea5a4 in vImageDeepmap2Decode ()
#6	0x41ea601c in __CUIUncompressDeepmap2ImageData_block_invoke ()
#7	0x41ea074c in CUIUncompressDeepmap2ImageData ()
#8	0x41ea4548 in -[_CSIRenditionBlockData expandCSIBitmapData:fromSlice:makeReadOnly:] ()
#9	0x41ea1d48 in __csiCompressImageProviderCopyImageBlockSetWithOptions ()
#10	0x2d7cdcd8 in IIOImagePixelDataProvider::getBytesImageProvider(void*, unsigned long) ()
#11	0x2d7dac6c in PNGWritePlugin::writePNG(IIOImagePixelDataProvider*, IIODictionary*) ()
#12	0x2d7e1d64 in PNGWritePlugin::writeAll() ()
#13	0x2d7da558 in PNGWritePlugin::WriteProc(void*, void*, void*, void*) ()
#14	0x2d7cd044 in IIOImageDestination::finalizeDestination() ()
#15	0x2d807770 in CGImageDestinationFinalize ()
#16	0x244cd564 in ___lldb_unnamed_symbol212136 ()
#17	0x244cd0ec in ___lldb_unnamed_symbol212135 ()
#18	0x244cebfc in ___lldb_unnamed_symbol212193 ()
#19	0x2402f64c in ___lldb_unnamed_symbol166857 ()
#20	0x2402c180 in ___lldb_unnamed_symbol166740 ()
#21	0x2402cdec in ___lldb_unnamed_symbol166744 ()
#22	0x2402ca94 in ___lldb_unnamed_symbol166742 ()
#23	0x244cc404 in ___lldb_unnamed_symbol212112 ()
#24	0x244cce08 in ___lldb_unnamed_symbol212134 ()
#25	0x23b3f110 in ___lldb_unnamed_symbol123404 ()
#26	0x241fed00 in ___lldb_unnamed_symbol183123 ()
#27	0x241fce70 in ___lldb_unnamed_symbol183102 ()
#28	0x241fcf54 in ___lldb_unnamed_symbol183102 ()
#29	0x241fcf54 in ___lldb_unnamed_symbol183102 ()
#30	0x241fcf54 in ___lldb_unnamed_symbol183102 ()
#31	0x241fcf54 in ___lldb_unnamed_symbol183102 ()
#32	0x23c0e600 in ___lldb_unnamed_symbol130598 ()
#33	0x23c10a20 in ___lldb_unnamed_symbol130761 ()
#34	0x242f05e4 in ___lldb_unnamed_symbol193041 ()
#35	0x23c0dbf0 in ___lldb_unnamed_symbol130593 ()
#36	0x23c0e888 in ___lldb_unnamed_symbol130605 ()
#37	0x23c0e7ac in ___lldb_unnamed_symbol130604 ()
#38	0x23c0e9e8 in ___lldb_unnamed_symbol130607 ()
#39	0x27b5dc48 in ___lldb_unnamed_symbol5926 ()
#40	0x27ae5124 in ___lldb_unnamed_symbol2483 ()
#41	0x27ae4558 in ___lldb_unnamed_symbol2482 ()
#42	0x27b9f844 in ___lldb_unnamed_symbol7756 ()
#43	0x26214138 in _dispatch_call_block_and_release ()
#44	0x262159ac in _dispatch_client_callout ()
#45	0x2622246c in _dispatch_main_queue_drain ()
#46	0x262220c4 in _dispatch_main_queue_callback_4CF ()
#47	0x1d0aede4 in __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ ()
#48	0x1d08274c in __CFRunLoopRun ()
#49	0x1d0c76bc in CFRunLoopRunSpecific ()
#50	0x1baf5d78 in -[NSRunLoop(NSRunLoop) runMode:beforeDate:] ()
#51	0x1bb2ec14 in -[NSRunLoop(NSRunLoop) run] ()
#52	0x50520c3c in _xpc_objc_main ()
#53	0x50522d64 in _xpc_main ()
#54	0x50522f24 in xpc_main ()
#55	0x1bb66208 in -[NSXPCListener resume] ()
#56	0x3351142c in -[_EXRunningExtension resume] ()
#57	0x335112dc in -[_EXRunningExtension startWithArguments:count:] ()
#58	0x3352e52c in EXExtensionMain ()
#59	0x1c2644b8 in NSExtensionMain ()
#60	0x4e69167c in start ()

Looking at the stack I assume that I have some sort of memory leak connected with PNG image. Normal complication memory is 6.8MB, but sometimes it starts rapidly grow and after 3-5 sec it reaches the 15 MB limit.

My complication doesn't use any heavy images. I commented out all of them, I also commented out all custom fonts, just in case. The crash is still there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant