View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0037105 | Lazarus | LCL | public | 2020-05-18 16:56 | 2020-05-29 16:34 |
Reporter | barlone | Assigned To | Bart Broersma | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Product Version | 2.1 (SVN) | ||||
Target Version | 2.2 | Fixed in Version | 2.2 | ||
Summary | 0037105: Win32: TBitBtn does not show Caption and Glyph without using manifest in resources | ||||
Description | Appear only under Windows with Win32 widgetset. Screenshot attached. | ||||
Steps To Reproduce | 1. Create new application, drop TBitBtn on it, set any Kind and Caption 2. BEFORE saving project unset "Use resource manifest" in project parameters 3. Run project | ||||
Tags | No tags attached. | ||||
Fixed in Revision | r63227 | ||||
LazTarget | - | ||||
Widgetset | Win32/Win64 | ||||
Attached Files |
|
related to | 0036678 | resolved | Bart Broersma | BitButton leaks GDI objects / 多次打开窗体关闭后bitbtn异常 |
|
|
|
I cannot reproduce that with Lazarus 2.1.0 r62605 FPC 3.2.0 i386-win32-win32/win64. I tested with a TBitBtn with Kind = bkOK and all the rest as default. I can see both the glyph and the caption. |
|
Thanks for the response, Bart. Did you unset "Use manifest resource (and enable theames)" before saving and run the project? TSpeedButton work fine for me (screenshot attached). |
|
Yes, I did uncheck that setting. I can see the difference in appearance when I run the project, so I know that setting has takern effect. (Actually: building the project saves the project, so saving it before is not necessary) I did not test other combinations of ButtonKind and glyphs and/or captions (default or not) though. Also, IIRC there is a setting for TBitButtons that controls wether or not the glyphs are shown (look in the OI, I don't have Lazarus at hand now). |
|
I`ve update FPC, all LCL and Lazarus code from trunk, rebuild IDE, try compile to 64bit - result is same |
|
Reproduce. x64. FPC 3.3.1. Lazarus 2.1.0 r63021. Windows 7. Put TBitBtn in new application. Uncheck "use manifest" - TBitBtn does not show Caption. Changing Kind or Caption - it still doesn't show. In Lazarus 2.0.8 work right. |
|
I cannot reproduce that with Lazarus 2.1.0 r62605 FPC 3.2.0 i386-win32-win32/win64, now compiled for win64. So, at least we know revision that still works. B.t.w. I cannot run Lazarus with fpc trunk due to 0037034. |
|
I can confirm this also with r63179 fpc 3.2.0RC1 compiled for Win64 and for Win32. So, now it can be bisected. |
|
Guilty revision is r62947: LCL-Win32: BitButton leaks GDI objects. Issue 0036678, patch from Anton Kavalenka. That patch deletes NewBitmap regardless of the state of ThemeServices. When ThemeServices is not available only OldBitMap should be destroyed AFAICS. The necessary DeleteObject already was called in the branch where ThemeServices.Available is True. |
|
I think for now we should revert r62947, since this is way more serious than the associated 0036678, which seems to have been unnoticed for at least 14 years (the affected codepath was already present in r7388). |
|
Without GDI object releasing the application would work for 1hr-8hr depending on amount of buttons and then ends up crashing entire GDI because GDI resources are limited and shared. see the patch in parent issue https://bugs.freepascal.org/view.php?id=36678#c123076 |
|
Applied second patch by Anton in associated issue 0036678. Please test and close if OK. |
|
thanks, it work for me |
Date Modified | Username | Field | Change |
---|---|---|---|
2020-05-18 16:56 | barlone | New Issue | |
2020-05-18 16:56 | barlone | File Added: screenshot.png | |
2020-05-18 20:14 | Bart Broersma | Note Added: 0122908 | |
2020-05-19 10:21 | barlone | Note Added: 0122926 | |
2020-05-19 10:21 | barlone | File Added: screenshot-2.png | |
2020-05-19 14:22 | Bart Broersma | Note Added: 0122931 | |
2020-05-19 14:23 | Bart Broersma | Note Edited: 0122931 | View Revisions |
2020-05-19 18:49 | barlone | Note Added: 0122936 | |
2020-05-19 21:00 | Serge Anvarov | Note Added: 0122940 | |
2020-05-24 11:04 | Bart Broersma | Note Added: 0123029 | |
2020-05-24 11:06 | Bart Broersma | Note Edited: 0123029 | View Revisions |
2020-05-24 11:17 | Bart Broersma | Status | new => confirmed |
2020-05-24 11:17 | Bart Broersma | LazTarget | => - |
2020-05-24 11:17 | Bart Broersma | Note Added: 0123030 | |
2020-05-24 11:17 | Bart Broersma | Note Edited: 0123030 | View Revisions |
2020-05-24 11:33 | Bart Broersma | Note Edited: 0123030 | View Revisions |
2020-05-24 14:20 | Bart Broersma | Note Added: 0123031 | |
2020-05-24 14:21 | Bart Broersma | Assigned To | => Juha Manninen |
2020-05-24 14:21 | Bart Broersma | Status | confirmed => assigned |
2020-05-24 14:37 | Juha Manninen | Relationship added | related to 0036678 |
2020-05-24 14:43 | Bart Broersma | Note Edited: 0123031 | View Revisions |
2020-05-25 22:54 | Bart Broersma | Note Added: 0123066 | |
2020-05-26 16:42 | Anton Kavalenka | Note Added: 0123075 | |
2020-05-26 16:48 | Anton Kavalenka | Note Edited: 0123075 | View Revisions |
2020-05-26 16:49 | Anton Kavalenka | Note Edited: 0123075 | View Revisions |
2020-05-26 17:19 | Anton Kavalenka | Note Edited: 0123075 | View Revisions |
2020-05-26 17:25 | Anton Kavalenka | Note Edited: 0123075 | View Revisions |
2020-05-26 17:25 | Anton Kavalenka | Note Edited: 0123075 | View Revisions |
2020-05-26 22:31 | Juha Manninen | Assigned To | Juha Manninen => Bart Broersma |
2020-05-26 23:59 | Bart Broersma | Status | assigned => resolved |
2020-05-26 23:59 | Bart Broersma | Resolution | open => fixed |
2020-05-26 23:59 | Bart Broersma | Fixed in Revision | => r63227 |
2020-05-26 23:59 | Bart Broersma | Widgetset | Win32/Win64 => Win32/Win64 |
2020-05-26 23:59 | Bart Broersma | Note Added: 0123085 | |
2020-05-26 23:59 | Bart Broersma | Fixed in Version | => 2.2 |
2020-05-26 23:59 | Bart Broersma | Target Version | => 2.2 |
2020-05-26 23:59 | Bart Broersma | Widgetset | Win32/Win64 => Win32/Win64 |
2020-05-29 16:34 | barlone | Status | resolved => closed |
2020-05-29 16:34 | barlone | Note Added: 0123128 |