Recent

Author Topic: BGRA Controls  (Read 247673 times)


lainz

  • Hero Member
  • *****
  • Posts: 4691
  • Web, Desktop & Android developer
    • https://lainz.github.io/
Re: BGRA Controls
« Reply #526 on: August 16, 2024, 12:09:43 am »
Thankyou!

the_magik_mushroom

  • New Member
  • *
  • Posts: 18
Re: BGRA Controls
« Reply #527 on: January 21, 2025, 03:08:28 am »
I've found a bug (Access violation) with TBCFluentSlider when closing another app that use a sharedmemory segment from my main lazarus app, I get this error:

Access violation.
Press OK to ignore and risk data corruption.
Press Abort to kill the program.



I can't provide a sample sorry but I've spend an entire week tracking that problem thinking it was coming from my code.

Code: Pascal  [Select][+][-]
  1. #0 BGRABLEND_$$_DRAWEXPANDEDPIXELINLINENOALPHACHECK$PBGRAPIXEL$TEXPANDEDPIXEL$BYTE+21 at :0
  2. #1 BGRACANVAS$_$TBGRACANVAS_$__$$_TEXTRECT$TRECT$LONGINT$LONGINT$ANSISTRING$TTEXTSTYLE+781 at :0
  3. #2 BGRAPOLYGON_$$_FILLSHAPEANTIALIAS$crcBEB7A9B4+5679 at :0
  4. #3 BGRAPOLYGON_$$_FILLELLIPSEANTIALIAS$crc0D4ED718+163 at :0
  5. #4 UNIVERSALDRAWER$_$TUNIVERSALDRAWER_$__$$_FILLELLIPSEANTIALIAS$crc0D4ED718+24 at :0
  6. #5 BGRABITMAPTYPES$_$TCUSTOMUNIVERSALBITMAP_$__$$_FILLELLIPSEANTIALIAS$crcE6E242BC+75 at :0
  7. #6 BGRABITMAPTYPES$_$TGENERICUNIVERSALBITMAP$2$CRCA6578794_$__$$_FILLELLIPSEANTIALIAS$crc3555B6E0+71 at :0
  8. #7 BCFLUENTSLIDER$_$TBCFLUENTSLIDER_$__$$_DRAWTHUMB+160 at :0
  9. #8 BCFLUENTSLIDER$_$TBCFLUENTSLIDER_$__$$_REDRAWBITMAPCONTENT+117 at :0
  10. #9 BGRAGRAPHICCONTROL$_$TCUSTOMBGRAGRAPHICCONTROL_$__$$_BGRASETSIZE$LONGINT$LONGINT+109 at :0
  11. #10 BGRAGRAPHICCONTROL$_$TCUSTOMBGRAGRAPHICCONTROL_$__$$_PAINT+42 at :0
  12. #11 CONTROLS$_$TGRAPHICCONTROL_$__$$_WMPAINT$TLMPAINT+137 at :0
  13. #12 SYSTEM$_$TOBJECT_$__$$_DISPATCH$formal+131 at :0
  14. #13 CONTROLS$_$TCONTROL_$__$$_WNDPROC$TMESSAGE+424 at :0
  15. #14 CONTROLS$_$TCONTROL_$__$$_PERFORM$LONGWORD$LONGINT$LONGINT$$LONGINT+70 at :0
  16. #15 CONTROLS$_$TWINCONTROL_$__$$_PAINTCONTROLS$LONGWORD$TCONTROL+471 at :0
  17. #16 CONTROLS$_$TWINCONTROL_$__$$_PAINTHANDLER$TLMPAINT+556 at :0
  18. #17 CONTROLS$_$TWINCONTROL_$__$$_WMPAINT$TLMPAINT+151 at :0
  19. #18 CONTROLS$_$TCUSTOMCONTROL_$__$$_WMPAINT$TLMPAINT+68 at :0
  20. #19 SYSTEM$_$TOBJECT_$__$$_DISPATCH$formal+131 at :0
  21. #20 CONTROLS$_$TCONTROL_$__$$_WNDPROC$TMESSAGE+424 at :0
  22. #21 CONTROLS$_$TWINCONTROL_$__$$_WNDPROC$TMESSAGE+783 at :0
  23. #22 LCLMESSAGEGLUE_$$_DELIVERMESSAGE$TOBJECT$formal$$LONGINT+160 at :0
  24. #23 WIN32INT$_$TWINDOWPROCHELPER_$__$$_SENDPAINTMESSAGE$LONGWORD+975 at :0
  25. #24 WIN32INT$_$TWINDOWPROCHELPER_$__$$_DOWINDOWPROC$$LONGINT+4150 at :0
  26. #25 WIN32INT_$$_WINDOWPROC$LONGWORD$LONGWORD$LONGINT$LONGINT$$LONGINT+114 at :0
  27. #26 user32:GetMessagePos+1763 at :0
  28. #27 user32:MsgWaitForMultipleObjectsEx+1997 at :0
  29. #28 user32:MsgWaitForMultipleObjectsEx+624 at :0
  30. #29 user32:SystemParametersInfoW+713 at :0
  31. #30 ntdll:KiUserCallbackDispatcher+54 at :0
  32. #31 user32:DispatchMessageW+16 at :0
  33. #32 WIN32INT$_$TWIN32WIDGETSET_$__$$_APPPROCESSMESSAGES+393 at :0
  34. #33 FORMS$_$TAPPLICATION_$__$$_HANDLEMESSAGE+70 at :0
  35. #34 FORMS$_$TAPPLICATION_$__$$_RUNLOOP+57 at :0
  36. #35 INTERFACEBASE$_$TWIDGETSET_$__$$_APPRUN$TAPPLICATIONMAINLOOP+34 at :0
  37. #36 FORMS$_$TAPPLICATION_$__$$_RUN+113 at :0
  38. #37 $main at project1.lpr:25
  39. #38 SYSTEM_$$_EXE_ENTRY$TENTRYINFORMATION+71 at :0
  40. #39 _WinMainCRTStartup+45 at :0
  41. #40 KERNEL32:BaseThreadInitThunk+25 at :0
  42. #41 ntdll:RtlInitializeExceptionChain+107 at :0
  43. #42 ntdll:RtlGetAppContainerNamedObjectPath+561 at :0
  44.  

The stack trace indicates that the access violation occurred during rendering operations, specifically while using the BGRABitmap library for antialiased drawing and rendering graphical controls. The issue seems related to drawing operations, possibly due to:

- Invalid or Uninitialized Objects:
        A TBGRABitmap object, or a similar rendering object, may not be initialized or may have been prematurely freed.

-Out-of-Bounds Drawing:
        Drawing functions like FillEllipseAntialias and others are called with coordinates or sizes that are outside the valid dimensions of the bitmap or control.

-Memory Corruption or Resource Management:
        Memory corruption could have occurred due to improper management of resources, such as failing to free or allocate properly.

lainz

  • Hero Member
  • *****
  • Posts: 4691
  • Web, Desktop & Android developer
    • https://lainz.github.io/
Re: BGRA Controls
« Reply #528 on: January 21, 2025, 03:18:14 am »
I've found a bug (Access violation) with TBCFluentSlider when closing another app that use a sharedmemory segment from my main lazarus app, I get this error:

Access violation.
Press OK to ignore and risk data corruption.
Press Abort to kill the program.



I can't provide a sample sorry but I've spend an entire week tracking that problem thinking it was coming from my code.

Code: Pascal  [Select][+][-]
  1. #0 BGRABLEND_$$_DRAWEXPANDEDPIXELINLINENOALPHACHECK$PBGRAPIXEL$TEXPANDEDPIXEL$BYTE+21 at :0
  2. #1 BGRACANVAS$_$TBGRACANVAS_$__$$_TEXTRECT$TRECT$LONGINT$LONGINT$ANSISTRING$TTEXTSTYLE+781 at :0
  3. #2 BGRAPOLYGON_$$_FILLSHAPEANTIALIAS$crcBEB7A9B4+5679 at :0
  4. #3 BGRAPOLYGON_$$_FILLELLIPSEANTIALIAS$crc0D4ED718+163 at :0
  5. #4 UNIVERSALDRAWER$_$TUNIVERSALDRAWER_$__$$_FILLELLIPSEANTIALIAS$crc0D4ED718+24 at :0
  6. #5 BGRABITMAPTYPES$_$TCUSTOMUNIVERSALBITMAP_$__$$_FILLELLIPSEANTIALIAS$crcE6E242BC+75 at :0
  7. #6 BGRABITMAPTYPES$_$TGENERICUNIVERSALBITMAP$2$CRCA6578794_$__$$_FILLELLIPSEANTIALIAS$crc3555B6E0+71 at :0
  8. #7 BCFLUENTSLIDER$_$TBCFLUENTSLIDER_$__$$_DRAWTHUMB+160 at :0
  9. #8 BCFLUENTSLIDER$_$TBCFLUENTSLIDER_$__$$_REDRAWBITMAPCONTENT+117 at :0
  10. #9 BGRAGRAPHICCONTROL$_$TCUSTOMBGRAGRAPHICCONTROL_$__$$_BGRASETSIZE$LONGINT$LONGINT+109 at :0
  11. #10 BGRAGRAPHICCONTROL$_$TCUSTOMBGRAGRAPHICCONTROL_$__$$_PAINT+42 at :0
  12. #11 CONTROLS$_$TGRAPHICCONTROL_$__$$_WMPAINT$TLMPAINT+137 at :0
  13. #12 SYSTEM$_$TOBJECT_$__$$_DISPATCH$formal+131 at :0
  14. #13 CONTROLS$_$TCONTROL_$__$$_WNDPROC$TMESSAGE+424 at :0
  15. #14 CONTROLS$_$TCONTROL_$__$$_PERFORM$LONGWORD$LONGINT$LONGINT$$LONGINT+70 at :0
  16. #15 CONTROLS$_$TWINCONTROL_$__$$_PAINTCONTROLS$LONGWORD$TCONTROL+471 at :0
  17. #16 CONTROLS$_$TWINCONTROL_$__$$_PAINTHANDLER$TLMPAINT+556 at :0
  18. #17 CONTROLS$_$TWINCONTROL_$__$$_WMPAINT$TLMPAINT+151 at :0
  19. #18 CONTROLS$_$TCUSTOMCONTROL_$__$$_WMPAINT$TLMPAINT+68 at :0
  20. #19 SYSTEM$_$TOBJECT_$__$$_DISPATCH$formal+131 at :0
  21. #20 CONTROLS$_$TCONTROL_$__$$_WNDPROC$TMESSAGE+424 at :0
  22. #21 CONTROLS$_$TWINCONTROL_$__$$_WNDPROC$TMESSAGE+783 at :0
  23. #22 LCLMESSAGEGLUE_$$_DELIVERMESSAGE$TOBJECT$formal$$LONGINT+160 at :0
  24. #23 WIN32INT$_$TWINDOWPROCHELPER_$__$$_SENDPAINTMESSAGE$LONGWORD+975 at :0
  25. #24 WIN32INT$_$TWINDOWPROCHELPER_$__$$_DOWINDOWPROC$$LONGINT+4150 at :0
  26. #25 WIN32INT_$$_WINDOWPROC$LONGWORD$LONGWORD$LONGINT$LONGINT$$LONGINT+114 at :0
  27. #26 user32:GetMessagePos+1763 at :0
  28. #27 user32:MsgWaitForMultipleObjectsEx+1997 at :0
  29. #28 user32:MsgWaitForMultipleObjectsEx+624 at :0
  30. #29 user32:SystemParametersInfoW+713 at :0
  31. #30 ntdll:KiUserCallbackDispatcher+54 at :0
  32. #31 user32:DispatchMessageW+16 at :0
  33. #32 WIN32INT$_$TWIN32WIDGETSET_$__$$_APPPROCESSMESSAGES+393 at :0
  34. #33 FORMS$_$TAPPLICATION_$__$$_HANDLEMESSAGE+70 at :0
  35. #34 FORMS$_$TAPPLICATION_$__$$_RUNLOOP+57 at :0
  36. #35 INTERFACEBASE$_$TWIDGETSET_$__$$_APPRUN$TAPPLICATIONMAINLOOP+34 at :0
  37. #36 FORMS$_$TAPPLICATION_$__$$_RUN+113 at :0
  38. #37 $main at project1.lpr:25
  39. #38 SYSTEM_$$_EXE_ENTRY$TENTRYINFORMATION+71 at :0
  40. #39 _WinMainCRTStartup+45 at :0
  41. #40 KERNEL32:BaseThreadInitThunk+25 at :0
  42. #41 ntdll:RtlInitializeExceptionChain+107 at :0
  43. #42 ntdll:RtlGetAppContainerNamedObjectPath+561 at :0
  44.  

The stack trace indicates that the access violation occurred during rendering operations, specifically while using the BGRABitmap library for antialiased drawing and rendering graphical controls. The issue seems related to drawing operations, possibly due to:

- Invalid or Uninitialized Objects:
        A TBGRABitmap object, or a similar rendering object, may not be initialized or may have been prematurely freed.

-Out-of-Bounds Drawing:
        Drawing functions like FillEllipseAntialias and others are called with coordinates or sizes that are outside the valid dimensions of the bitmap or control.

-Memory Corruption or Resource Management:
        Memory corruption could have occurred due to improper management of resources, such as failing to free or allocate properly.

Hi. Please send the bug report at bgrabitmap github.

And without a demo app we can't fix it... Try creating the bare minimum with your apps.
« Last Edit: January 21, 2025, 03:20:23 am by lainz »

the_magik_mushroom

  • New Member
  • *
  • Posts: 18
Re: BGRA Controls
« Reply #529 on: January 21, 2025, 03:20:53 am »
I do not have a github account sorry, if someone can post for me, thank you  :-*

lainz

  • Hero Member
  • *****
  • Posts: 4691
  • Web, Desktop & Android developer
    • https://lainz.github.io/
Re: BGRA Controls
« Reply #530 on: January 21, 2025, 03:22:52 am »
I do not have a github account sorry, if someone can post for me, thank you  :-*

I can report it tomorrow.

But without a demo is hard to fix...

circular

  • Hero Member
  • *****
  • Posts: 4391
    • Personal webpage
Re: BGRA Controls
« Reply #531 on: January 22, 2025, 11:10:43 am »
@the_magik_mushroom

In order to be able to reproduce the bug and debug it, we need a sample project. It is understandable you would like to keep your code private. So we suggest to make a new little project that demonstrate the bug.

Regards
Conscience is the debugger of the mind

Mastropiero

  • New Member
  • *
  • Posts: 29
Issues with TBCComboBox
« Reply #532 on: March 08, 2025, 12:50:56 pm »
Hello, I'm developing an application using TBBCComboBox and found two issues (not sure if bugs or I'm doing something wrong):

Issue #1:

I have two TBCComboBox controls on a form (Form2) that is being shown from Form1 with .show (non modal). If I touch any of the combos (e.g. showing the dropdown list), when I close Form2, it happens that Form1 gets minimized or hidden (the user must find Form1 manually). This happens only after some kind of interaction with the combos. If I don't use any of them and close Form2, then Form1 remains on focus. It does not happen if I use a standard TComboBox control instead.  The issue happens on Windows but not on Linux (using QT6, don't know about GTK).


Issue #2:

Using the same scenario as issue #1 on Linux (QT6) when I click the combobox (dropdown list style), the dropdown list is shown behind the form containing the combo, so it can't be seen or clicked. This issue doesn't occur on Windows.


Platforms used:

-Windows 10
-Linux Debian (using QT6)
-FPP 3.2.2
-Lazarus 4.0RC2
-BGRA controls: 9.0.1.6
-BGRA bitmap: 11.6.2.0

« Last Edit: March 08, 2025, 02:54:17 pm by Mastropiero »

circular

  • Hero Member
  • *****
  • Posts: 4391
    • Personal webpage
Re: BGRA Controls
« Reply #533 on: March 12, 2025, 07:08:24 am »
New version of BGRAControls (v9.0.1.7)
requires latest BGRABitmap (v11.6.4)

- TBGRAImageManipulation: add Opacity property
- TBCLeaRingSlider: add Caption and Text layout, centering
- TBCLeaLed, TBCLeaSelector: centering
- TBCFluentProgressRing: fix background on Linux
- TBCLeaQLED: alignment and phong effect
- TBCLeaSelector: fix phong light position
- TBGRAImageList: stretch proportionally, draw overlay
- TShapeLineBGRA: add line style, adjust centering
- TBGRAFlashProgressBar: add marquee and multiprogress modes, add BorderSpacing property
- TBGRAKnob: add TaperType property
- TBCMaterialEdit: generic component version
- added TSuperGauge
- added BGRADialogs unit: list all image types
- various fixes
Conscience is the debugger of the mind

circular

  • Hero Member
  • *****
  • Posts: 4391
    • Personal webpage
Re: BGRA Controls
« Reply #534 on: March 12, 2025, 11:03:13 pm »
Hello, I'm developing an application using TBBCComboBox and found two issues (not sure if bugs or I'm doing something wrong)
Hello Mastropiero and thank you for the message. I've added the issue on GitHub (#231) and replied there.
Conscience is the debugger of the mind

 

TinyPortal © 2005-2018