FLTK logo

Re: [fltk/fltk] Read Access Violation in FL_Browser in x64 (Windows) (#197)

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.issues  ]
 
Previous Message ]New Message | Reply ]Next Message ]

Re: [fltk/fltk] Read Access Violation in FL_Browser in x64 (Windows) (#197) erco77 Mar 03, 2021  
 


On 3/3/21 7:36 AM, Jeffrey Paranich wrote:
>
> Long time FLTK user; who has always used 32-bit library with no issues. I successfully compiled ftlk.lib version 1.3.5 with x64 flags in Visual
> Studio 2017 and have been using the library in my 64-bit software (a GUI that collects API data). However after hours of program execution (1 to 10
> hours), inevitably, Fl_Browser::item_height (Fl_Browser.cxx line 409) will eventually throw an exception for a Read Access Violation (a system level
> exception, not a C++ exception).
>
> I checked some previous versions of FLTK and this function has been unchanged for a long time, so I'm pretty sure this is a 64 bit compilation
> issue. I'm not all too sure where to begin looking; I've left all the preprocessor definitions as WIN32 as it mentions on the FLTK homepage they are
> valid for both 32 and 64-bit builds. Also I've set flag /MACHINE:X64.
>
> As this is a system level exception I can't really put a try/catch in the FLTK source code in this area, so looking to find a root cause - my
> suspicion is a build issue. Any advice/help is greatly appreciated! Thanks.
>

    Usually when I encounter issues like this, it's usually because either #include files were
    pulled in from a different version of FLTK than linked (or dynamically loaded), or not all
    parts of the application were rebuilt (old OBJ files).

    It might not be related at all to 32bit vs. 64bit, but just two different 64bit builds
    that are incompatible with each other, for whatever reason (such as changing the ABI
    flags but not rebuilding all of FLTK)

    First make sure your #include's for FLTK are coming from the same directory as the
    FLTK libs you're linking against (dynamic or static), and do a 'make clean; make' on
    both FLTK and your own project.

    Often when one gets problems like this, and adding printf() statements to the code
    magically "fixes" it, it's because the act of adding a print statement touches the source
    code file and causes it to be rebuilt, and /that's/ what fixes the problem.


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.

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'.