Re: Crashes in GUI when applying a theme (Thematic)

Riccardo Mottola <[email protected]>
Newsgroups gmane.comp.lib.gnustep.devel
Message-ID <[email protected]>
This is my valgrind output at the moment of crash (the crash is 
happening inside the NSLog statement I added, otherwise it would crash 
just the line after)


==4835== Invalid read of size 8
==4835==    at 0x56A13A5: objc_msg_lookup (in 
/usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/libobjc.so.4.0.0)
==4835==    by 0x5196186: GSPrivateFormat (GSFormat.m:1869)
==4835==    by 0x51B3C09: 
_i_GSPlaceholderString__initWithFormat_locale_arguments_ (GSString.m:1632)
==4835==    by 0x52A0F64: NSLogv (NSLog.m:425)
==4835==    by 0x52A12F8: NSLog (NSLog.m:297)
==4835==    by 0x4BA3E92: _i_NSMenuView__sizeToFit (NSMenuView.m:760)
==4835==    by 0x4B9D832: _i_NSMenu__sizeToFit (NSMenu.m:1562)
==4835==    by 0x4BA9074: _i_NSMenuView___themeDidActivate_ 
(NSMenuView.m:2046)
==4835==    by 0x52A8EF7: _i_NSNotificationCenter___postAndRelease_ 
(NSNotificationCenter.m:1199)
==4835==    by 0x4D013BD: _i_GSTheme__activate (GSTheme.m:642)
==4835==    by 0x4D00D32: _c_GSTheme__setTheme_ (GSTheme.m:527)
==4835==    by 0x1297DF: _i_ThemeDocument__activate (ThemeDocument.m:241)
==4835==  Address 0xba66cf0 is 16 bytes inside a block of size 352 free'd
==4835==    at 0x48399AB: free (in 
/usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==4835==    by 0x4AE51A0: _i_NSCell__dealloc (NSCell.m:236)
==4835==    by 0x4ADC7AA: _i_NSButtonCell__dealloc (NSButtonCell.m:139)
==4835==    by 0x4BACEAB: _i_NSMenuItemCell__dealloc (NSMenuItemCell.m:117)
==4835==    by 0x4BCDF17: _i_NSPopUpButtonCell__dealloc 
(NSPopUpButtonCell.m:162)
==4835==    by 0x4B16AF4: _i_NSControl__dealloc (NSControl.m:124)
==4835==    by 0x4C8497E: _i_NSView__removeSubview_ (NSView.m:965)
==4835==    by 0x4C846A2: 
_i_NSView__removeFromSuperviewWithoutNeedingDisplay (NSView.m:908)
==4835==    by 0x4C83DEB: _i_NSView__dealloc (NSView.m:745)
==4835==    by 0x12AF92: _i_ThemeDocumentView__dealloc (ThemeDocument.m:125)
==4835==    by 0x4C8497E: _i_NSView__removeSubview_ (NSView.m:965)
==4835==    by 0x4C846A2: 
_i_NSView__removeFromSuperviewWithoutNeedingDisplay (NSView.m:908)
==4835==  Block was alloc'd at
==4835==    at 0x483877F: malloc (in 
/usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==4835==    by 0x5376FDB: default_malloc (NSZone.m:124)
==4835==    by 0x52B8902: NSAllocateObject (NSObject.m:798)
==4835==    by 0x52B8902: _c_NSObject__allocWithZone_ (NSObject.m:1179)
==4835==    by 0x533FB2F: _i_NSUnarchiver__decodeValueOfObjCType_at_ 
(NSUnarchiver.m:926)
==4835==    by 0x4B19B1F: _i_NSControl__initWithCoder_ (NSControl.m:1042)
==4835==    by 0x533FB5C: _i_NSUnarchiver__decodeValueOfObjCType_at_ 
(NSUnarchiver.m:929)
==4835==    by 0x533DCAC: 
_i_NSUnarchiver__decodeArrayOfObjCType_count_at_ (NSUnarchiver.m:629)
==4835==    by 0x518420A: _i_GSMutableArray__initWithCoder_ (GSArray.m:551)
==4835==    by 0x533FB5C: _i_NSUnarchiver__decodeValueOfObjCType_at_ 
(NSUnarchiver.m:929)
==4835==    by 0x4C92F14: _i_NSView__initWithCoder_ (NSView.m:4767)
==4835==    by 0x533FB5C: _i_NSUnarchiver__decodeValueOfObjCType_at_ 
(NSUnarchiver.m:929)
==4835==    by 0x5204021: _i_NSCoder__decodeObject (NSCoder.m:249)
==4835==
==4835== Invalid read of size 8
==4835==    at 0x56A13AB: objc_msg_lookup (in 
/usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/libobjc.so.4.0.0)
==4835==    by 0x5196186: GSPrivateFormat (GSFormat.m:1869)
==4835==    by 0x51B3C09: 
_i_GSPlaceholderString__initWithFormat_locale_arguments_ (GSString.m:1632)
==4835==    by 0x52A0F64: NSLogv (NSLog.m:425)
==4835==    by 0x52A12F8: NSLog (NSLog.m:297)
==4835==    by 0x4BA3E92: _i_NSMenuView__sizeToFit (NSMenuView.m:760)
==4835==    by 0x4B9D832: _i_NSMenu__sizeToFit (NSMenu.m:1562)
==4835==    by 0x4BA9074: _i_NSMenuView___themeDidActivate_ 
(NSMenuView.m:2046)
==4835==    by 0x52A8EF7: _i_NSNotificationCenter___postAndRelease_ 
(NSNotificationCenter.m:1199)
==4835==    by 0x4D013BD: _i_GSTheme__activate (GSTheme.m:642)
==4835==    by 0x4D00D32: _c_GSTheme__setTheme_ (GSTheme.m:527)
==4835==    by 0x1297DF: _i_ThemeDocument__activate (ThemeDocument.m:241)
==4835==  Address 0xdeadfb0e is not stack'd, malloc'd or (recently) free'd
==4835==
==4835==
==4835== Process terminating with default action of signal 11 
(SIGSEGV)==4835==  Access not within mapped region at address 0xDEADFB0E
==4835==    at 0x56A13AB: objc_msg_lookup (in 
/usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/libobjc.so.4.0.0)
==4835==    by 0x5196186: GSPrivateFormat (GSFormat.m:1869)
==4835==    by 0x51B3C09: 
_i_GSPlaceholderString__initWithFormat_locale_arguments_ (GSString.m:1632)
==4835==    by 0x52A0F64: NSLogv (NSLog.m:425)
==4835==    by 0x52A12F8: NSLog (NSLog.m:297)
==4835==    by 0x4BA3E92: _i_NSMenuView__sizeToFit (NSMenuView.m:760)
==4835==    by 0x4B9D832: _i_NSMenu__sizeToFit (NSMenu.m:1562)
==4835==    by 0x4BA9074: _i_NSMenuView___themeDidActivate_ 
(NSMenuView.m:2046)
==4835==    by 0x52A8EF7: _i_NSNotificationCenter___postAndRelease_ 
(NSNotificationCenter.m:1199)
==4835==    by 0x4D013BD: _i_GSTheme__activate (GSTheme.m:642)
==4835==    by 0x4D00D32: _c_GSTheme__setTheme_ (GSTheme.m:527)
==4835==    by 0x1297DF: _i_ThemeDocument__activate (ThemeDocument.m:241)
==4835==  If you believe this happened as a result of a stack
==4835==  overflow in your program's main thread (unlikely but
==4835==  possible), you can try to increase the size of the
==4835==  main thread stack using the --main-stacksize= flag.
==4835==  The main thread stack size used in this run was 8388608.
==4835==
==4835== HEAP SUMMARY:
==4835==     in use at exit: 14,132,472 bytes in 122,196 blocks
==4835==   total heap usage: 813,058 allocs, 690,862 frees, 88,363,512 
bytes allocated
==4835==
==4835== LEAK SUMMARY:
==4835==    definitely lost: 40,808 bytes in 562 blocks
==4835==    indirectly lost: 87,747 bytes in 3,812 blocks
==4835==      possibly lost: 9,724,321 bytes in 83,973 blocks
==4835==    still reachable: 4,279,212 bytes in 33,848 blocks
==4835==         suppressed: 384 bytes in 1 blocks
==4835== Rerun with --leak-check=full to see details of leaked memory
==4835==
==4835== For lists of detected and suppressed errors, rerun with: -s
==4835== ERROR SUMMARY: 10 errors from 4 contexts (suppressed: 1 from 1)
Segmentation fault
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.