FLTK logo

[fltk.general] Re: Some issues with latest FLUID

FLTK matrix user chat room
(using Element browser app)   FLTK gitter user chat room   GitHub FLTK Project   FLTK News RSS Feed  
  FLTK Apps      FLTK Library      Forums      Links     Login 
 All Forums  |  Back to fltk.general  ]
 
Previous Message ]New Message | Reply ]Next Message ]

Re: Some issues with latest FLUID Mo_Al_ Nov 24, 2022  
  Crudely commenting `delete[] newarray;` in the `HBITMAP Fl_GDI_Graphics_Driver::create_bitmask(int w, int h, const uchar *data)` method seems to resolve the issue. 

Maybe CreateBitmap requires the data to be still alive?

On Thursday, November 24, 2022 at 3:08:58 PM UTC+3 Mo_Al_ wrote:
Debugging things in VS it seems the problem lies in fltk.lib in the gdi driver code:

     fluid.exe!operator delete(void * block) Line 38    C++
     fluid.exe!operator delete[](void * block) Line 32    C++
>    fluid.exe!Fl_GDI_Graphics_Driver::create_bitmask(int w, int h, const unsigned char * data) Line 393    C++
     fluid.exe!Fl_GDI_Graphics_Driver::cache(Fl_Pixmap * img) Line 806    C++
     fluid.exe!Fl_Graphics_Driver::draw_pixmap(Fl_Pixmap * pxm, int XP, int YP, int WP, int HP, int cx, int cy) Line 242    C++
     fluid.exe!Fl_Pixmap::draw(int XP, int YP, int WP, int HP, int cx, int cy) Line 48    C++
     fluid.exe!Fl_Image::draw(int X, int Y) Line 295    C++
     fluid.exe!Fl_Tree_Item::draw(int X, int & Y, int W, Fl_Tree_Item * itemfocus, int & tree_item_xmax, int lastchild, int render) Line 1104    C++
     fluid.exe!Fl_Tree::draw() Line 733    C++
     fluid.exe!Fl_Group::draw_child(Fl_Widget & widget) Line 961    C++
     fluid.exe!Fl_Group::draw_children() Line 917    C++
     fluid.exe!Fl_Group::draw() Line 932    C++
     fluid.exe!Fl_Group::draw_child(Fl_Widget & widget) Line 961    C++
     fluid.exe!Fl_Group::draw_children() Line 917    C++
     fluid.exe!Fl_Window::draw() Line 523    C++
     fluid.exe!Overlay_Window::draw() Line 344    C++
     fluid.exe!Fl_Window_Driver::draw() Line 82    C++
     fluid.exe!Fl_WinAPI_Window_Driver::flush_overlay() Line 349    C++
     fluid.exe!Fl_Overlay_Window::flush() Line 53    C++
     fluid.exe!Fl_Window_Driver::flush() Line 204    C++
     fluid.exe!Fl::flush() Line 755    C++
     fluid.exe!Fl_WinAPI_System_Driver::wait(double time_to_wait) Line 521    C++
     fluid.exe!Fl::wait(double time_to_wait) Line 581    C++
     fluid.exe!Fl::run() Line 600    C++
     fluid.exe!main(int argc, char * * argv) Line 2023    C++
     fluid.exe!WinMain(HINSTANCE__ * hInstance, HINSTANCE__ * hPrevInstance, char * lpCmdLine, int nCmdShow) Line 113    C
On Thursday, November 24, 2022 at 2:43:34 PM UTC+3 Mo_Al_ wrote:
Thanks for checking things out.
The second issue I only noticed on Windows. This is a backtrace using windbg (since I don't think valgrind runs on windows):
HEAP[fluid.exe]: Heap block at 00000144B3F1D290 modified at 00000144B3F1D2E0 past requested size of 40 (52d8.224c): Break instruction exception - code 80000003 (first chance) ntdll!RtlpBreakPointHeap+0x16: 00007ff9`ba2a70ce cc int 3

I'll try to build a debug build of fluid and run again via windbg.
On Thursday, November 24, 2022 at 1:43:21 PM UTC+3 Matthias Melcher wrote:
may64...@gmail.com schrieb am Donnerstag, 24. November 2022 um 09:17:21 UTC+1:
- The orientation changes (HORIZONTAL -> VERTICAL) when adding widgets into the Fl_Flex:
Ooopsie. I bailed out of the function when there were no children without actually changing the type. Fixed. 

- I had a spurious crash on windows when adding widgets into the Fl_Flex:
I tried to trigger this under Valgrind, but did not find anything. If you have anything repeatable, that would be really helpful.

I did fix two other Valgrind hits though: git commit 6f36a6362982b08574e27a61d9c8716fe5aac8a8
 

--
You received this message because you are subscribed to the Google Groups "fltk.general" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fltkgeneral+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/fltkgeneral/058c50a1-9ab7-4b24-9db5-6a17f7bb8d23n%40googlegroups.com.
Direct Link to Message ]
 
     
Previous Message ]New Message | Reply ]Next Message ]
 
 

Comments are owned by the poster. All other content is copyright 1998-2024 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to 'erco@seriss.com'.