Skip to content

FinceptTerminal is a modern finance application offering advanced market analytics, investment research, and economic data tools, designed for interactive exploration and data-driven decision-making in a user-friendly environment.

windows issues fixed

tilakpatel22876d6b6511ee
diff --git a/fincept-qt/.claude/scheduled_tasks.lock b/fincept-qt/.claude/scheduled_tasks.lock
index 59116c2e1..968e450d8 100644
--- a/fincept-qt/.claude/scheduled_tasks.lock
+++ b/fincept-qt/.claude/scheduled_tasks.lock
@@ -1 +1 @@
-{"sessionId":"e0edbf79-1ecb-4d3a-8836-78b45f96ecbe","pid":2836,"acquiredAt":1778054479103}
\ No newline at end of file
+{"sessionId":"8b77197b-4f11-47e8-9b2c-24a3c25a5d75","pid":8532,"acquiredAt":1778219754683}
\ No newline at end of file
diff --git a/fincept-qt/CMakeLists.txt b/fincept-qt/CMakeLists.txt
index f787d2945..697ec95b6 100644
--- a/fincept-qt/CMakeLists.txt
+++ b/fincept-qt/CMakeLists.txt
@@ -55,11 +55,15 @@ set(CMAKE_AUTOUIC ON)
# Fincept Terminal ships on 3 platforms and cannot tolerate compiler-version
# drift. These checks fail the build early with an actionable message rather
# than letting the user hit a cryptic template error 10 minutes into compile.
-if(MSVC AND MSVC_VERSION LESS 1938)
+if(MSVC AND MSVC_VERSION LESS 1940)
message(FATAL_ERROR
- "MSVC 19.38 (Visual Studio 2022 17.8) or newer required.\n"
+ "MSVC 19.40 (Visual Studio 2022 17.10) or newer required.\n"
"Detected MSVC_VERSION: ${MSVC_VERSION}\n"
- "Install VS 2022 17.8+ from https://visualstudio.microsoft.com/downloads/")
+ "Install VS 2022 17.10+ from https://visualstudio.microsoft.com/downloads/\n"
+ "Rationale: pinning to 17.10+ keeps the UCRT import lib in sync with "
+ "Windows 11 26H2 / Server 2025 shipped UCRT (10.0.26100+). Older toolchains "
+ "have been observed to produce STATUS_STACK_BUFFER_OVERRUN at startup on "
+ "26H2 (see issue #215).")
endif()
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 12.3)
message(FATAL_ERROR
diff --git a/fincept-qt/src/app/TerminalShell.cpp b/fincept-qt/src/app/TerminalShell.cpp
index d0c8bcf6d..c9e3f5619 100644
--- a/fincept-qt/src/app/TerminalShell.cpp
+++ b/fincept-qt/src/app/TerminalShell.cpp
@@ -41,53 +41,34 @@ TerminalShell& TerminalShell::instance() {
return s;
}
-// FT_TS: trace markers identical to FT_MARK in main.cpp, scoped to TerminalShell::initialise.
-#ifdef Q_OS_WIN
-# include <windows.h>
-# include <stdio.h>
-# include <string.h>
-# define FT_TS(n) do { char _msg[64]; _snprintf_s(_msg, 64, _TRUNCATE, "FT_TS %d\n", (n)); OutputDebugStringA(_msg); HANDLE _h = CreateFileA("C:\\Users\\Tilak\\AppData\\Local\\Temp\\ft_marks.txt", FILE_APPEND_DATA, FILE_SHARE_READ|FILE_SHARE_WRITE, NULL, OPEN_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL); if (_h != INVALID_HANDLE_VALUE) { DWORD _w; SetFilePointer(_h, 0, NULL, FILE_END); WriteFile(_h, _msg, (DWORD)strlen(_msg), &_w, NULL); CloseHandle(_h); } } while(0)
-#else
-# define FT_TS(n) do { fprintf(stderr, "FT_TS %d\n", (n)); fflush(stderr); } while(0)
-#endif
-
void TerminalShell::initialise() {
- FT_TS(100);
if (initialised_) {
LOG_WARN(kShellTag, "initialise() called twice — ignoring");
return;
}
LOG_INFO(kShellTag, "Shell initialising");
- FT_TS(101);
// Resolve and cache the active profile UUID so every later phase has
// a stable handle without re-reading the manifest. ProfileManager
// mints + persists a UUID on first read if the manifest is legacy.
active_profile_id_ = ProfileManager::instance().active_profile_id();
- FT_TS(102);
LOG_INFO(kShellTag, QString("Active profile: %1 (id=%2)")
.arg(ProfileManager::instance().active())
.arg(active_profile_id_.to_string()));
- FT_TS(103);
// Create the new per-profile directory tree (workspace.db, layouts/,
// crashes/). Distinct from AppPaths::ensure_all() which creates the
// legacy tree (data/, logs/, cache/, etc.) — both run, both are
// idempotent.
ProfilePaths::ensure_all();
- FT_TS(104);
// Touch the registries so their static singletons construct *before*
// any WindowFrame tries to register against them. Avoids a startup
// race where the first window's constructor runs faster than the
// registry's singleton init under aggressive optimisation.
(void) WindowRegistry::instance();
- FT_TS(105);
(void) ActionRegistry::instance();
- FT_TS(106);
(void) PanelRegistry::instance();
- FT_TS(107);
(void) ProfileManager::instance();
- FT_TS(108);
// Phase 6 trim: MonitorWatcher boots here so its QGuiApplication signal
// connections are in place before any frame restores. Phase 6's full
// workspace-variant matcher will subscribe to topology_changed.
@@ -137,19 +118,16 @@ void TerminalShell::initialise() {
.arg(w->window_id()).arg(target->name()));
}
});
- FT_TS(109);
// Phase 1b skeleton: LockOverlayController construction. Currently a
// no-op — the full lift is deferred (see auth/lock/LockOverlayController.h
// for rationale). Constructing it here keeps the dependency direction
// shell → controller correct so the future lift doesn't have to invert.
auth::LockOverlayController::instance().initialise();
- FT_TS(110);
// Phase 3 final: chat-bubble shell coordinator. Per-frame bubble
// widgets stay where they are; this just centralises the shell-side
// observation surface (frame add/remove tracking, future telemetry,
// future cross-frame chat-session linking).
ai_chat::ChatBubbleController::instance().initialise();
- FT_TS(111);
// Phase 6: open the per-profile LayoutCatalog so Launchpad's recent-
// layouts list + the layout.* actions can read/write immediately.
{
@@ -164,7 +142,6 @@ void TerminalShell::initialise() {
WorkspaceFwspImporter::run_once_if_needed();
}
}
- FT_TS(112);
// Phase 10: install telemetry providers per opt-in settings. Defaults
// off — no telemetry without consent.
@@ -203,29 +180,10 @@ void TerminalShell::initialise() {
// replaced WindowFrame's hard-coded keyboard wiring. Must happen before
// any WindowFrame is constructed so the per-frame hotkey-binding loop
// sees the full action set.
- FT_TS(113);
actions::register_builtins();
- FT_TS(114);
// ── Phase 2: workspace persistence + crash recovery ────────────────
workspace_db_ = &WorkspaceDb::instance();
- FT_TS(115);
- QString _ws_path = ProfilePaths::workspace_db();
- FT_TS(1150);
- const QByteArray _ws_path_utf8 = _ws_path.toUtf8();
-#ifdef Q_OS_WIN
- char _path_msg[512];
- _snprintf_s(_path_msg, 512, _TRUNCATE, "FT_TS workspace_db path: %s\n", _ws_path_utf8.constData());
- OutputDebugStringA(_path_msg);
- {
- HANDLE _h = CreateFileA("C:\\Users\\Tilak\\AppData\\Local\\Temp\\ft_marks.txt", FILE_APPEND_DATA, FILE_SHARE_READ|FILE_SHARE_WRITE, NULL, OPEN_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
- if (_h != INVALID_HANDLE_VALUE) { DWORD _w; SetFilePointer(_h, 0, NULL, FILE_END); WriteFile(_h, _path_msg, (DWORD)strlen(_path_msg), &_w, NULL); CloseHandle(_h); }
- }
-#else
- fprintf(stderr, "FT_TS workspace_db path: %s\n", _ws_path_utf8.constData());
- fflush(stderr);
-#endif
- auto db_open = workspace_db_->open(_ws_path);
- FT_TS(116);
+ auto db_open = workspace_db_->open(ProfilePaths::workspace_db());
if (db_open.is_err()) {
LOG_ERROR(kShellTag, QString("Failed to open workspace.db: %1")
.arg(QString::fromStdString(db_open.error())));
@@ -266,11 +224,9 @@ void TerminalShell::initialise() {
}
}
- FT_TS(120);
initialised_ = true;
LOG_INFO(kShellTag, "Shell initialised");
emit started();
- FT_TS(121);
}
void TerminalShell::shutdown() {
diff --git a/fincept-qt/src/app/main.cpp b/fincept-qt/src/app/main.cpp
index 9a3b288e0..33e3f83ba 100644
--- a/fincept-qt/src/app/main.cpp
+++ b/fincept-qt/src/app/main.cpp
@@ -92,14 +92,6 @@
# include <Windows.h>
#endif
-// FT_MARK: write a sequence number to a file so we can see how far startup progressed.
-// GUI-subsystem apps don't have a useful stderr, so we go straight to disk.
-#ifdef Q_OS_WIN
-# define FT_MARK(n) do { char _msg[64]; _snprintf_s(_msg, 64, _TRUNCATE, "FT_MARK %d\n", (n)); OutputDebugStringA(_msg); HANDLE _h = CreateFileA("C:\\Users\\Tilak\\AppData\\Local\\Temp\\ft_marks.txt", FILE_APPEND_DATA, FILE_SHARE_READ|FILE_SHARE_WRITE, NULL, OPEN_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL); if (_h != INVALID_HANDLE_VALUE) { DWORD _w; SetFilePointer(_h, 0, NULL, FILE_END); WriteFile(_h, _msg, (DWORD)strlen(_msg), &_w, NULL); CloseHandle(_h); } } while(0)
-#else
-# define FT_MARK(n) do { fprintf(stderr, "FT_MARK %d\n", (n)); fflush(stderr); } while(0)
-#endif
-
// Wire the two app-level lifecycle handlers that fire after the primary
// window exists: InstanceLock::message_received (a re-launch of the exe
// asks us to open another WindowFrame — args ignored, the request itself is
@@ -136,8 +128,6 @@ static void wire_app_lifecycle(QApplication& app, fincept::InstanceLock& lock) {
}
int main(int argc, char* argv[]) {
- FT_MARK(1);
-
// ── TLS backend selection (must happen before any Qt plugin loading) ────
// Force QtNetwork to use the OpenSSL TLS backend across platforms.
// - macOS: Apple SecureTransport (qtls_st.cpp) double-frees inside
@@ -192,7 +182,6 @@ int main(int argc, char* argv[]) {
// write the manifest. Create root now (single mkdir, idempotent).
QDir().mkpath(fincept::AppPaths::root());
}
- FT_MARK(2);
// Install the unhandled-exception filter BEFORE any Qt object is
// constructed. On Windows this writes a minidump to AppPaths::crashdumps()
@@ -272,12 +261,9 @@ int main(int argc, char* argv[]) {
//
// Must run BEFORE any service init so future phases that lift services
// into the shell can rely on it being present.
- FT_MARK(10);
fincept::TerminalShell::instance().initialise();
- FT_MARK(11);
QObject::connect(&app, &QCoreApplication::aboutToQuit,
[]() { fincept::TerminalShell::instance().shutdown(); });
- FT_MARK(12);
// Register DataHub payload meta-types (QuoteData, HistoryPoint, InfoData,
// NewsArticle, EconomicsResult) so they can flow through QVariant-keyed
@@ -297,9 +283,7 @@ int main(int argc, char* argv[]) {
QCoreApplication::applicationDirPath() + "/component_catalog.json",
"resources/component_catalog.json",
});
- FT_MARK(20);
fincept::services::MarketDataService::instance().ensure_registered_with_hub();
- FT_MARK(21);
// ── Sync services needed by the default dashboard ─────────────────────────
// Anything a default dashboard widget subscribes to during its first show
@@ -316,9 +300,7 @@ int main(int argc, char* argv[]) {
fincept::services::maritime::PortsCatalog::instance().ensure_registered_with_hub();
fincept::services::RelationshipMapService::instance().ensure_registered_with_hub();
fincept::services::ma::MAAnalyticsService::instance().ensure_registered_with_hub();
- FT_MARK(30);
fincept::wallet::TokenMetadataService::instance().load_from_storage();
- FT_MARK(35);
// ── Pre-warm the dashboard topics ────────────────────────────────────────
// The user spends real time on the login / setup / recovery flow before
@@ -512,10 +494,8 @@ int main(int argc, char* argv[]) {
LOG_INFO("App", "Deferred service init complete");
});
- FT_MARK(40);
// Create all application directories under %LOCALAPPDATA%/com.fincept.terminal
fincept::AppPaths::ensure_all();
- FT_MARK(41);
// ── One-time migration from legacy %APPDATA% location ─────────────────
// Current locations (under %LOCALAPPDATA%\com.fincept.terminal\):
@@ -559,9 +539,7 @@ int main(int argc, char* argv[]) {
QFile::remove(legacy2 + "-shm");
}
- FT_MARK(50);
fincept::Logger::instance().set_file(fincept::AppPaths::logs() + "/fincept.log");
- FT_MARK(51);
// P3.18 — route Qt's own qDebug/qWarning/qCritical messages into our log
// file so framework/3rd-party warnings are visible in Release builds.
diff --git a/fincept-qt/src/screens/about/AboutScreen.cpp b/fincept-qt/src/screens/about/AboutScreen.cpp
index 8c08c3eac..763e0d4bb 100644
--- a/fincept-qt/src/screens/about/AboutScreen.cpp
+++ b/fincept-qt/src/screens/about/AboutScreen.cpp
@@ -1,10 +1,12 @@
#include "screens/about/AboutScreen.h"
+#include "core/config/AppPaths.h"
#include "services/updater/UpdateService.h"
#include "ui/theme/Theme.h"
#include <QApplication>
#include <QDesktopServices>
+#include <QDir>
#include <QFrame>
#include <QGridLayout>
#include <QHBoxLayout>
@@ -246,6 +248,51 @@ AboutScreen::AboutScreen(QWidget* parent) : QWidget(parent) {
vl->addWidget(row);
}
+ // ── Diagnostics ───────────────────────────────────────────────────────────
+ // Surfaces the crash-dump folder path so users filing bug reports can
+ // attach minidumps without hunting through %LOCALAPPDATA% (see issue #215).
+ {
+ auto* panel = makePanel();
+ auto* pvl = new QVBoxLayout(panel);
+ pvl->setContentsMargins(0, 0, 0, 0);
+ pvl->setSpacing(0);
+ pvl->addWidget(makePanelHeader("⚙", "DIAGNOSTICS", ui::colors::AMBER));
+
+ auto* body = new QWidget(this);
+ body->setStyleSheet("background: transparent;");
+ auto* bhl = new QHBoxLayout(body);
+ bhl->setContentsMargins(14, 10, 14, 10);
+ bhl->setSpacing(12);
+
+ auto* left = new QVBoxLayout;
+ left->setSpacing(2);
+ auto* lbl = new QLabel("CRASH DUMPS");
+ lbl->setStyleSheet(SECTION_LABEL());
+ left->addWidget(lbl);
+ const QString crash_dir = QDir::toNativeSeparators(AppPaths::crashdumps());
+ auto* path = new QLabel(crash_dir);
+ path->setStyleSheet(MUTED());
+ path->setTextInteractionFlags(Qt::TextSelectableByMouse);
+ path->setWordWrap(true);
+ left->addWidget(path);
+ bhl->addLayout(left, 1);
+
+ auto* open_btn = new QPushButton(QStringLiteral("Open Folder"));
+ open_btn->setStyleSheet(LINK_BTN());
+ open_btn->setCursor(Qt::PointingHandCursor);
+ connect(open_btn, &QPushButton::clicked, this, [crash_dir]() {
+ // mkpath is idempotent; ensures the folder exists before
+ // QDesktopServices::openUrl on a freshly installed terminal
+ // that hasn't crashed yet.
+ QDir().mkpath(crash_dir);
+ QDesktopServices::openUrl(QUrl::fromLocalFile(crash_dir));
+ });
+ bhl->addWidget(open_btn, 0, Qt::AlignTop);
+
+ pvl->addWidget(body);
+ vl->addWidget(panel);
+ }
+
// ── Trademarks ────────────────────────────────────────────────────────────
{
auto* panel = makePanel();