Menu

#622 mapwindow.c: remove log_calls() debug artifact (backtrace/execinfo)

Next Release
open
nobody
cleanup (1)
V5.3.1GA
Windows
5
2026-05-22
2026-05-11
No

The GTK3V2MAIN-specific file app/bin/mapwindow.c contains a debug-only function log_calls() (lines 95-117) that uses backtrace() and backtrace_symbols() from <execinfo.h> to print call-stack information to the log. It is guarded with #ifndef WIN32 and is called from MapRedraw() and MapChangeScale().</execinfo.h>

This appears to be a development artifact introduced during GTK3 porting work. It is not present in the default branch.

The function should be removed before GTK3V2MAIN is merged upstream:

  • execinfo.h / backtrace() is not available on all POSIX platforms (notably musl libc / Alpine Linux)
  • It adds overhead on every map redraw and scale change even when logging is disabled
  • The call-stack information duplicates what a debugger or a standard LOG() call already provides

Fix: remove log_calls(), the #include <stdio.h> / #include <execinfo.h> block at lines 92-93, and the two call sites in MapRedraw() (~line 258) and MapChangeScale() (~line 349).</execinfo.h></stdio.h>

Discussion

  • Allen D Byrne

    Allen D Byrne - 2026-05-22
    • Description has changed:

    Diff:

    
    
    • status: --> open
    • assigned_to: Allen D Byrne
    • XTrackCAD Version: --> V5.3.1GA
    • OS Level: -->
    • Operating System: --> Windows
    • Priority: --> 5
    • Milestone: --> Next Release
     
  • Allen D Byrne

    Allen D Byrne - 2026-05-22
    • assigned_to: Allen D Byrne --> nobody
     

Anonymous
Anonymous

Add attachments
Cancel





MongoDB Logo MongoDB