Hermes agent installation error


[X] Installation failed: Cannot bind argument to parameter 'Path' because it is an empty string.

 iex (irm https://hermes-agent.nousresearch.com/install.ps1)
[hermes] long profile root: C:\Users\Alice

+---------------------------------------------------------+
|             * Hermes Agent Installer                    |
+---------------------------------------------------------+
|  An open source AI agent by Nous Research.              |
+---------------------------------------------------------+

[OK] Managed uv found (uv 0.12.6 (7938ca5d5 2026-08-25 x86_64-pc-windows-msvc))
-> Checking Git...
[OK] Git found (git version 2.55.0.windows.5 hub version 2.14.2)

[X] Installation failed: Cannot bind argument to parameter 'Path' because it is an empty string.

-> If the error is unclear, try downloading and running the script directly:
  Invoke-WebRequest -Uri 'https://hermes-agent.nousresearch.com/install.ps1' -OutFile install.ps1
  .\install.ps1

 

 

原因はSet-GitBashEnvVarという関数にありました。

gitコマンドが本物のgit.exeではなく、エイリアスや関数として解決されている場合にクラッシュします。最も典型的なのがhubラッパー経由でgitが呼ばれているケースで、これはまさにあなたのログのgit version 2.55.0.windows.5 hub version 2.14.2という出力と一致します(hub versionが表示されている=hub経由でgitが動いている)。

技術的には、gitがエイリアス/関数のとき(Get-Command git).Sourceが空文字列になり、その空文字列をSplit-Pathに渡した結果、Split-Pathが例外を投げてインストーラー全体が落ちる、という流れです。issue #55646を修正するPRとして提出されています。

対処法
修正版がマージ済みならそれを使う— まずPRのステータス(マージ済みか)を確認する必要があります
回避策(マージ待ちの場合):hub経由でなく素のgit.exeを直接使うようにする


なるほど、

 

󰍲 Administrator  ~   v1.27.1   v26.8.2   v8.5.10   v25.0.4     12:16 
 Get-Command git

CommandType     Name                                               Version    Source
-----------     ----                                               -------    ------
Alias           git -> hub.exe


󰍲 Administrator  ~   v1.27.1   v26.8.2   v8.5.10   v25.0.4     12:17 
 Get-Command git.exe -All

CommandType     Name                                               Version    Source
-----------     ----                                               -------    ------
Application     git.exe                                            2.55.0.5   C:\Users\Alice\scoop\apps\git\current\cmd\git.exe
Application     git.exe                                            0.0.0.0    C:\Users\Alice\scoop\shims\git.exe
Application     git.exe                                            2.55.0.3   C:\Program Files\Git\cmd\git.exe


󰍲 Administrator  ~   v1.27.1   v26.8.2   v8.5.10   v25.0.4     12:17 
 Remove-Item Alias:git -Force

󰍲 Administrator  ~   v1.27.1   v26.8.2   v8.5.10   v25.0.4     12:17 
 Get-Command git

CommandType     Name                                               Version    Source
-----------     ----                                               -------    ------
Application     git.exe                                            2.55.0.5   C:\Users\Alice\scoop\apps\git\current\cmd\git.exe


󰍲 Administrator  ~   v1.27.1   v26.8.2   v8.5.10   v25.0.4     12:18 
 iex (irm https://hermes-agent.nousresearch.com/install.ps1)
[hermes] long profile root: C:\Users\Alice

+---------------------------------------------------------+
|             * Hermes Agent Installer                    |
+---------------------------------------------------------+
|  An open source AI agent by Nous Research.              |
+---------------------------------------------------------+

[OK] Managed uv found (uv 0.12.6 (7938ca5d5 2026-08-25 x86_64-pc-windows-msvc))
-> Checking Git...
[OK] Git found (git version 2.55.0.windows.5)
-> Set HERMES_GIT_BASH_PATH=C:\Users\Alice\scoop\apps\git\current\bin\bash.exe
[OK] Git Bash can launch MSYS programs
-> Checking Node.js (for browser tools)...
[OK] Node.js v26.8.2 with npm 11.2.0 found
-> Checking ripgrep (fast file search)...
[OK] ripgrep 15.2.0 (rev e89fff89ac) found
-> Checking ffmpeg (TTS voice messages)...
[OK] ffmpeg found
-> Installing to C:\Users\Alice\AppData\Local\hermes\hermes-agent...
-> Existing installation found, updating...
-> Discarded npm lockfile churn (1 file(s))
-> Local changes detected, stashing before update...
Saved working directory and index state On main: hermes-install-autostash-20260913-121859
From https://github.com/NousResearch/hermes-agent
 * branch            main       -> FETCH_HEAD
Already on 'main'
Your branch is up to date with 'origin/main'.
From https://github.com/NousResearch/hermes-agent
 * branch            main       -> FETCH_HEAD
Already up to date.
[!] Local changes were stashed before updating.
[!] Restoring them may reapply local customizations onto the updated codebase.
Restore local changes now? [Y/n]:

■

 

上級者向け C++ 塾

DLL をアンロードして差し替える
遅延ロード・ホットスワップ完全ガイド

GetProcAddress を一切使わず、リンカの遅延ロード機構と __FUnloadDelayLoadedDLL2 だけでプラグインを実行中に差し替える。 内部構造から実装パターンまで余すところなく解説する。

Windows API MSVC /DELAYLOAD delayimp.lib スレッドセーフ IAT パッチ ホットリロード

01 通常手法の何が問題か

「DLL を差し替えたい」と思ったとき、最初に思いつくのは FreeLibrary → ファイル上書き → LoadLibrary のサイクルだ。 しかしこれには根本的な問題がいくつかある。

静的インポート(Import Address Table)との衝突

静的インポートとしてリンクした DLL は、 ローダーが起動時に IAT(Import Address Table)へ関数ポインタを書き込む。 FreeLibrary でアンロードしても IAT のポインタはそのまま残り、 次の呼び出しで解放済みアドレスに飛ぶ。即クラッシュ。

参照カウントと依存 DLL

Windows の DLL ローダーは参照カウント方式を採る。 自分が LoadLibrary した DLL でも、 そこから依存されている DLL が他のモジュールから参照されていれば FreeLibrary しても実際にはアンロードされない。 ファイルはロックされたまま上書き不可になる。

GetProcAddress 方式の限界

「ならば全部 GetProcAddress で動的に呼べばいい」という解もある。 しかし、既存コードのシグネチャを全て関数ポインタ型に書き換えるコストは膨大だ。 また、呼び出し側がポインタを保持している間は DLL をアンロードできない。

手法 静的インポートと共存 通常の関数呼び出し文法 実行中差し替え コード改変量
FreeLibrary + LoadLibrary(直) ✗ 不可 ✗ 不可 ✗ 危険 少
GetProcAddress 全面採用 ○ ✗ 関数ポインタ経由 △ 管理が複雑 大量
/DELAYLOAD + __FUnload(本記事) ○ ○ 通常通り ○ 安全 最小限
核心
遅延ロードは「通常の関数呼び出し文法を保ちつつ、IAT を自分でコントロールできる」 唯一の標準的手段だ。__FUnloadDelayLoadedDLL2 を呼ぶと IAT が stub に戻り、 次の呼び出しで再ロードが走る。これがホットスワップの核心。

02 遅延ロードの仕組み

リンカオプション

対象 DLL を遅延ロードにするには、リンカに /DELAYLOAD:plugin.dll を渡すだけでいい。 同時に delayimp.lib をリンクする(MSVC では自動追加されることが多い)。

CMakeLists.txt / .vcxproj cmake / msbuild
# CMake の場合
target_link_options(MyApp PRIVATE
    /DELAYLOAD:plugin.dll
)
target_link_libraries(MyApp PRIVATE
    delayimp   # delayimp.lib
    plugin     # import lib(依然として必要)
)

コンパイラが生成するもの

リンカは plugin.dll からインポートしている全関数について、 通常の IAT エントリの代わりに「遅延 IAT(Delay IAT)」を生成する。 初期値はすべて __delayLoadHelper2 というスタブへの間接ジャンプだ。

遅延ロードの初回呼び出しフロー MyApp から plugin_func を呼ぶと Delay-IAT 経由で __delayLoadHelper2 に飛び、LoadLibrary + GetProcAddress を実行し IAT を書き換えてから実際の関数を呼ぶ MyApp.exe plugin_func() Delay-IAT plugin_func → stub plugin_init → stub __delayLoadHelper2 LoadLibrary() GetProcAddress() IAT を書き換え ✓ plugin.dll plugin_func() Delay-IAT(書き換え後) plugin_func → 実アドレス plugin_init → stub ①呼び出し ②stub jump ③Load ④IAT 書き換え MyApp.exe plugin_func() ←2回目 ⑤直接ジャンプ 初回のみ __delayLoadHelper2 経由。2回目以降は IAT 直参照(≒静的インポートと同コスト)

2 回目以降の呼び出しは IAT に実際の関数アドレスが書き込まれているため、 通常の静的インポートと同じコストになる。 パフォーマンスペナルティは初回 1 回のみだ。

03 Delay-IAT の内部構造

/DELAYLOAD を指定してリンクすると、 PE(Portable Executable)ファイルの .didat セクション内に ImgDelayDescr 構造体の配列が生成される。

delayimp.h(SDK)から抜粋・簡略化 C / WinSDK
// 各遅延ロード DLL ごとに 1 エントリ存在する
struct ImgDelayDescr {
    DWORD   grAttrs;        // フラグ(RVA ベースかどうか等)
    RVA     rvaDLLName;    // DLL 名文字列の RVA
    RVA     rvaHmod;       // ロード済みモジュールハンドルを格納するセル
    RVA     rvaIAT;        // ← 通常の IAT と同じ構造、ここを書き換える
    RVA     rvaINT;        // 名前テーブル(変わらない)
    RVA     rvaBoundIAT;   // バインド済みアドレス(あれば)
    RVA     rvaUnloadIAT;  // ← アンロード後に復元するためのスナップショット
    DWORD   dwTimeStamp;
};

重要なのは rvaUnloadIAT だ。 これはロード前の「stub アドレス群のスナップショット」を持っている。 __FUnloadDelayLoadedDLL2 はこれを使って IAT をリセットし、 rvaHmod のモジュールハンドルをゼロにする。

ロード後の IAT エントリ

rvaIAT[i] → 実際の関数アドレス(plugin.dll 内)

呼び出しは直接ここにジャンプ → 高速

アンロード後の IAT エントリ

rvaIAT[i] → stub(__delayLoadHelper2 経由)

次の呼び出しで再ロードが走る

⚠ 重要
rvaUnloadIAT を生成するには、リンカオプションに /DELAY:UNLOAD を追加しなければならない。 これがないと __FUnloadDelayLoadedDLL2 は何もせず FALSE を返す。
CMakeLists.txt cmake
target_link_options(MyApp PRIVATE
    /DELAYLOAD:plugin.dll
    /DELAY:UNLOAD    # ← これが必須!rvaUnloadIAT を生成する
)
target_link_libraries(MyApp PRIVATE delayimp plugin)

04 __FUnloadDelayLoadedDLL2 の使い方

この関数は delayimp.h で宣言されており、 delayimp.lib に実装されている。 シグネチャはシンプルだ。

delayimp.h C++
#include <delayimp.h>

// 引数はDLL名(大文字小文字不問)
// 成功 → TRUE、/DELAY:UNLOAD なし or 名前不一致 → FALSE
BOOL __FUnloadDelayLoadedDLL2(LPCSTR szDll);

内部では以下を行う:

① 検索
ImgDelayDescr テーブルを線形スキャン

引数の DLL 名と rvaDLLName を _stricmp で比較。マッチしたエントリを対象とする。

② IAT 復元
rvaUnloadIAT の内容を rvaIAT にコピー

スナップショットから stub ポインタ群を IAT に書き戻す。書き込みには WriteProcessMemory が使われる(IAT は読み取り専用保護されているため)。

③ ハンドル解放
FreeLibrary(hmod) を呼び、rvaHmod をゼロにする

参照カウントをデクリメント。他にホルダーがいなければここで実際にアンロードされる。

④ 完了
次の呼び出しで __delayLoadHelper2 が走り再ロードされる

ホットスワップであれば、この「次の呼び出し」の前に新しい DLL ファイルを所定のパスに配置しておく。

minimal_unload.cpp C++
#include <windows.h>
#include <delayimp.h>
#include "plugin.h"   // plugin_func() の宣言

void demo() {
    // 1回目: __delayLoadHelper2 が走り plugin.dll がロードされる
    plugin_func();

    // アンロード(IAT を stub に戻し FreeLibrary)
    BOOL ok = __FUnloadDelayLoadedDLL2("plugin.dll");
    if (!ok) {
        // /DELAY:UNLOAD なし or DLL 名ミスマッチ
        OutputDebugStringA("Unload failed\n");
        return;
    }

    // ← ここで新しい plugin.dll を配置(後述)
    SwapPluginFile();

    // 2回目の呼び出しで新しい DLL が自動ロードされる
    plugin_func();   // ← 新バージョンが実行される!
}
豆知識:DLL 名の比較
引数は ファイル名部分のみ(例: "plugin.dll")で OK。 フルパスや拡張子なしは不一致になる。 ImgDelayDescr::rvaDLLName に記録されているのはリンク時に /DELAYLOAD: に渡した文字列そのものだ。

05 遅延ロードフックでロードパスを制御する

__delayLoadHelper2 は処理の各ステージでグローバルフックポインタ を参照する。これを設定することでロードを横取りできる。

delayimp.h(関連部分) C / WinSDK
// 通知フック:ロード成功通知を受け取る(戻り値で上書き可能)
extern PfnDliHook __pfnDliNotifyHook2;

// 失敗フック:ロード失敗時に代替アドレスを返せる
extern PfnDliHook __pfnDliFailureHook2;

// フックに渡される構造体
struct DelayLoadInfo {
    DWORD           cb;          // sizeof(DelayLoadInfo)
    PCImgDelayDescr pidd;        // 対象の ImgDelayDescr
    FARPROC *       ppfn;        // IAT エントリへのポインタ
    LPCSTR          szDll;       // DLL 名
    DelayLoadProc   dlp;         // 関数名 or 序数
    HMODULE         hmodCur;     // ロード済みハンドル
    FARPROC         pfnCur;      // 解決済みアドレス
    DWORD           dwLastError;
};

// 通知コード(dliNotePreLoadLibrary が最重要)
enum dliNotification {
    dliStartProcessing,         // 処理開始
    dliNotePreLoadLibrary,       // LoadLibrary 直前 → ここでパスを差し替えられる
    dliNotePreGetProcAddress,    // GetProcAddress 直前
    dliNoteEndProcessing,        // 正常完了
    dliFailLoadLibrary,          // LoadLibrary 失敗
    dliFailGetProcAddress        // GetProcAddress 失敗
};

フックでロードパスをリダイレクト

dliNotePreLoadLibrary で HMODULE を返すと、 ヘルパーはその値を LoadLibrary の代わりに使う。 これを利用してバージョン番号付きのコピーファイルを読み込ませる。

plugin_hook.cpp C++
#include <windows.h>
#include <delayimp.h>
#include <atomic>
#include <string>

// ロード先パスを保持するグローバル(スワップ時に更新)
static std::atomic<const char*> g_pluginPath{ "plugin.dll" };

static FARPROC NotifyHook(dliNotification dliNotify, DelayLoadInfo* pdli) {
    if (dliNotify == dliNotePreLoadLibrary) {
        // この DLL が対象の場合だけリダイレクト
        if (_stricmp(pdli->szDll, "plugin.dll") == 0) {
            HMODULE h = LoadLibraryA(g_pluginPath.load());
            return reinterpret_cast<FARPROC>(h);
            // NULL なら通常のロードにフォールバックされる
        }
    }
    return nullptr;
}

// グローバルフックポインタへの登録(.obj が参照されるよう TU に置く)
extern "C" PfnDliHook __pfnDliNotifyHook2 = NotifyHook;

// 外部から呼ぶ:次ロード時に使うパスを設定
void SetPluginPath(const char* path) {
    g_pluginPath.store(path);
}
⚠ リンク順に注意
__pfnDliNotifyHook2 は delayimp.lib に nullptr として定義されている 弱シンボルだ。自前の定義が同じ翻訳単位 (.obj) に存在しないと リンカが脱落させる場合がある。 #pragma comment(linker, "/INCLUDE:__pfnDliNotifyHook2") で強制的に参照させると確実。

06 ホットスワップ完全実装

ここまでの部品を組み合わせた実用的な PluginManager クラスを示す。 要件:

  • 通常の関数呼び出し文法を変えない
  • ファイルロックを回避するために一時コピーをロードする
  • スワップ中に関数を呼んだ場合のクラッシュを防ぐ(読み書きロック)
  • 失敗時は旧バージョンを維持する
plugin_manager.h C++
#pragma once
#include <windows.h>
#include <delayimp.h>
#include <shared_mutex>
#include <filesystem>
#include <atomic>
#include <string>
#include <stdexcept>

namespace fs = std::filesystem;

class PluginManager {
public:
    /// dllName : 遅延ロードに渡した名前と完全一致(例 "plugin.dll")
    /// stagingDir : 一時コピーを置くディレクトリ
    explicit PluginManager(std::string dllName,
                            fs::path    stagingDir = fs::temp_directory_path());

    /// ホットスワップ実行
    /// newSource : 新しいバイナリのフルパス
    /// 戻り値 : true=成功, false=失敗(旧バージョン継続動作)
    bool Swap(const fs::path& newSource);

    /// 呼び出し側がロックを取得するためのアクセサ
    /// RAII ガード経由で使うこと(後述のマクロ参照)
    std::shared_mutex& GetMutex() { return m_mtx; }

private:
    std::string     m_dllName;
    fs::path        m_stagingDir;
    fs::path        m_activePath;   // 現在ロード中のコピーパス
    std::atomic<std::string*> m_loadPath; // フックが参照
    std::shared_mutex m_mtx;
    int m_gen{ 0 };   // バージョン番号(ファイル名のサフィックス)

    fs::path MakeStagingPath(int gen) const;
};
plugin_manager.cpp C++
#include "plugin_manager.h"
#include <format>   // C++20

// ─── フックのグローバル変数(このファイル内で定義) ───
static PluginManager* g_instance = nullptr;

static FARPROC DliHook(dliNotification notify, DelayLoadInfo* pdli) {
    if (notify != dliNotePreLoadLibrary || !g_instance) return nullptr;
    if (_stricmp(pdli->szDll, g_instance->GetDllName().c_str()) != 0)
        return nullptr;

    auto* path = g_instance->m_loadPath.load(std::memory_order_acquire);
    if (!path) return nullptr;

    HMODULE h = LoadLibraryA(path->c_str());
    return reinterpret_cast<FARPROC>(h);
}

// 弱シンボルを上書き
extern "C" PfnDliHook __pfnDliNotifyHook2 = DliHook;
#pragma comment(linker, "/INCLUDE:__pfnDliNotifyHook2")

// ─── PluginManager 実装 ───
PluginManager::PluginManager(std::string dllName, fs::path stagingDir)
    : m_dllName(std::move(dllName))
    , m_stagingDir(std::move(stagingDir))
    , m_loadPath(nullptr)
{
    g_instance = this;  // シングルトン前提(複数管理は要拡張)
    fs::create_directories(m_stagingDir);
}

fs::path PluginManager::MakeStagingPath(int gen) const {
    // 例: %TEMP%/plugin_gen002.dll
    auto stem = fs::path(m_dllName).stem().string();
    auto name = std::format("{}_gen{:03d}.dll", stem, gen);
    return m_stagingDir / name;
}

bool PluginManager::Swap(const fs::path& newSource) {
    // Step 1: 新バイナリをステージングディレクトリへコピー(まだロードしない)
    int nextGen = m_gen + 1;
    auto nextPath = MakeStagingPath(nextGen);
    std::error_code ec;
    fs::copy_file(newSource, nextPath,
                  fs::copy_options::overwrite_existing, ec);
    if (ec) return false;   // コピー失敗 → 旧バージョン継続

    // Step 2: フックが参照するパスを先に更新(release セマンティクス)
    auto* nextStr = new std::string(nextPath.string());
    auto* oldStr  = m_loadPath.exchange(nextStr, std::memory_order_acq_rel);

    // Step 3: 排他ロックを取得してアンロード
    {
        std::unique_lock lk(m_mtx);

        BOOL unloaded = __FUnloadDelayLoadedDLL2(m_dllName.c_str());
        if (!unloaded) {
            // ロールバック: パスを元に戻す
            m_loadPath.store(oldStr, std::memory_order_release);
            delete nextStr;
            fs::remove(nextPath, ec);
            return false;
        }

        // 旧ステージングファイルを削除(この時点でアンロード済みなのでロックなし)
        if (!m_activePath.empty()) {
            fs::remove(m_activePath, ec);
        }
        m_activePath = nextPath;
        m_gen = nextGen;
    }

    delete oldStr;

    // Step 4: ロード済み確認(フックを通じて nextPath からロードされる)
    // ここで初めて新 DLL の関数が呼ばれる
    return true;
}

呼び出し側でのロック取得

スワップ中に旧 DLL の関数が呼ばれるとクラッシュするため、 shared_mutex の読み取りロックを取って呼び出す。 マクロで糖衣構文にすると既存コードの変更が最小になる。

plugin_call.h C++
#pragma once
#include "plugin_manager.h"
#include "plugin.h"

extern PluginManager g_pluginMgr;

// 共有ロックを取ってから呼び出す糖衣マクロ
#define PLUGIN_CALL(expr) \
    do { \
        std::shared_lock _lk(g_pluginMgr.GetMutex()); \
        (expr); \
    } while(0)

// 使用例
// PLUGIN_CALL(plugin_func());             // OK
// PLUGIN_CALL(int r = plugin_calc(42));   // OK(r はスコープ外なので注意)
main.cpp(使用例) C++
#include "plugin_call.h"
#include <thread>
#include <chrono>

PluginManager g_pluginMgr{ "plugin.dll" };

void WorkerThread() {
    while (true) {
        PLUGIN_CALL(plugin_func());   // スワップ中は自動待機
        std::this_thread::sleep_for(std::chrono::milliseconds(16));
    }
}

int main() {
    std::thread t(WorkerThread);

    // 監視スレッドや UI からスワップ指示
    std::this_thread::sleep_for(std::chrono::seconds(5));
    bool ok = g_pluginMgr.Swap("C:/builds/plugin_v2.dll");
    printf("Swap %s\n", ok ? "OK" : "FAILED");

    t.join();
}

07 スレッドセーフ設計の詳細

ホットスワップ中のスレッド状態遷移 WorkerThread は shared_lock で plugin_func を呼ぶ。Swap スレッドは unique_lock でアンロードとロードを行う間、WorkerThread は待機する。 time Worker shared_lock ✓ 待機(blocked) 新 DLL で再開 Swap ファイルコピー unique_lock + Unload 解放 unique_lock 取得 unique_lock 解放 T1 T2 T3 T4

T1 以前は Worker が shared_lock で plugin_func を呼んでいる。
T2 で Swap スレッドが unique_lock を取得しようとすると、 Worker の現在の shared_lock が解放されるまで待機する。
T2〜T3 の間に __FUnloadDelayLoadedDLL2 と IAT リセットを完了する。
T3 で unique_lock を解放すると T4 以降は Worker が新 DLL で動作する。

🚫 これをやってはいけない
アンロード後・再ロード前にロックなしで関数を呼ぶのは即クラッシュ。 IAT は stub に戻っているが、stub が発火して LoadLibrary する前に 別スレッドが旧 DLL のアドレスに飛もうとする競合が起きる。 unique_lock の期間外では絶対に直接呼ばないこと。

08 落とし穴と注意点

1. import lib が依然として必要

/DELAYLOAD は DLL のロードを遅らせるだけで、 import library (.lib) のリンクは引き続き必要だ。 .lib にはシンボル解決に必要なスタブ情報が含まれている。

2. 依存 DLL の連鎖

plugin.dll が util.dll に依存している場合、 plugin.dll をアンロードしても util.dll は アンロードされない(ローダーの参照カウントが残る)。 util.dll 自体を差し替えたいなら、それも /DELAYLOAD にして 同様のフックで管理する必要がある。

3. DLL_PROCESS_DETACH の呼ばれ方

__FUnloadDelayLoadedDLL2 は内部で FreeLibrary を呼ぶため、 参照カウントがゼロになれば DllMain(DLL_PROCESS_DETACH) が発火する。 旧 DLL が静的オブジェクトのデストラクタを持っている場合、 これがスワップ中の Worker スレッドと競合する可能性がある。 プラグイン側でスレッドセーフな cleanup を実装することが望ましい。

4. x64 の例外ハンドラテーブル

64-bit Windows は SEH(構造化例外処理)のために PE ヘッダに .pdata(RUNTIME_FUNCTION テーブル)を持つ。 アンロード直後にそのアドレス範囲でスタック巻き戻しが走ると 例外処理が壊れる。unique_lock で確実に全ワーカーを アンロード中は足止めすることで回避できる。

5. デバッガとのシンボル同期

スワップ後にデバッガが旧シンボルを参照し続けることがある。 WinDbg / Visual Studio デバッガは LoadLibrary イベントを 監視しているため、フックから返した HMODULE の場合でも 通常は自動再読み込みされる。 確認できない場合は .reload /f plugin_gen002.dll(WinDbg)で手動再読み込み。

6. /DELAYLOAD が効かないケース

状況 結果 対処
/DELAY:UNLOAD なし __FUnloadDelayLoadedDLL2 が FALSE を返す 必ず /DELAY:UNLOAD を追加
DLL 名の大文字小文字違い デスクリプタが見つからず FALSE /DELAYLOAD: に渡した名前をそのまま使う
静的インポートとの混在 静的側の IAT がクラッシュ源になる 同一 DLL を静的と遅延で混在させない
__pfnDliNotifyHook2 がリンカに脱落 フックが呼ばれず通常パスでロード #pragma comment(linker, "/INCLUDE:...") で強制参照
まとめ
/DELAYLOAD + /DELAY:UNLOAD + __FUnloadDelayLoadedDLL2 + __pfnDliNotifyHook2 の 4 点セットが揃えば、 通常の関数呼び出し文法を変えることなく、 DLL のホットスワップが実現できる。 スレッドセーフ性は shared_mutex で確保し、 ファイルロックは一時コピー方式で回避する。 この組み合わせは DAW プラグイン、ゲームエンジンのモジュール、 リアルタイム設定リロードなど幅広い場面で使える実用的なパターンだ。

■

IntelliJ IdeaでJDKをどう正しく配置しても
java: モジュール 'projectUntitledName' の JDK 'temurin-25' が見つかりません

と言われた時の解決策
AIに聞いてもmisc.xmlが正しくないとかprojectの構造のSDKがおかしいと答えるがそこはmisc.xmlが参照しているから関係ないのに的外れなこといったりでガチ取り組んで12時間ぐらいハマった

 

vscjava.migrate-java-to-azure-1.21.0-win32-x64のagents\modernize-java-upgrade.agent.mdが
11から25にversion上げる?と聞かれYesと答えたのが運の尽き


JPSでbuild限定
runnerをmavenに委譲したりすれば問題なくbuildできる。

 

%LOCALAPPDATA%\JetBrains\\IntelliJIdea2026.1\log\build-log\build.log

2026-06-17 11:56:38,810 [      7]   INFO - #o.j.j.c.BuildMain - ==================================================
2026-06-17 11:56:38,827 [     24]   INFO - #o.j.j.c.BuildMain - Build process started. Classpath: C:/df/ide/ideaIUwin/plugins/java/lib/jps-launcher.jar
2026-06-17 11:56:39,028 [      8]   INFO - #o.j.j.c.BuildMain - ==================================================
2026-06-17 11:56:39,044 [     24]   INFO - #o.j.j.c.BuildMain - Build process started. Classpath: C:/df/ide/ideaIUwin/plugins/java/lib/jps-launcher.jar
2026-06-17 11:56:39,110 [    307]   INFO - #o.j.j.c.BuildMain - Connection to IDE established in 264 ms
2026-06-17 11:56:39,215 [    412]   INFO - #c.i.o.u.LowMemoryWatcherManager - Use ExponentiallySmoothingTracker(90000 ms)
2026-06-17 11:56:39,217 [    414]   INFO - #c.i.o.u.LowMemoryWatcherManager - Subscribing to MemoryPool[tenured-LOA]{max: 43915264, threshold: 38672384 (0.95 * max)}
2026-06-17 11:56:39,217 [    414]   INFO - #c.i.o.u.LowMemoryWatcherManager - Subscribing to MemoryPool[tenured-SOA]{max: 687990784, threshold: 653591232 (0.95 * max)}
2026-06-17 11:56:39,219 [    416]   INFO - #c.i.o.u.LowMemoryWatcherManager - Skip regular GC time updating because org.jetbrains.jps.service.impl.SharedThreadPoolImpl@96a7280bis not a ScheduledExecutorService
2026-06-17 11:56:39,227 [    424]   INFO - #o.j.j.c.JpsModelLoaderImpl - Loading model: project path = C:/projectUntitledName, global options path = C:/Users/Alice/AppData/Roaming/JetBrains/IntelliJIdea2026.1/options
2026-06-17 11:56:39,307 [    287]   INFO - #o.j.j.c.BuildMain - Connection to IDE established in 245 ms
2026-06-17 11:56:39,401 [    598]   INFO - #o.j.j.m.s.JpsProjectLoader - External project config dir is used: C:\Users\Alice\AppData\Local\JetBrains\IntelliJIdea2026.1\projects\projectUntitledName.7f09ee0d\external_build_system\project
2026-06-17 11:56:39,411 [    608]   INFO - #o.j.j.m.s.JpsProjectLoader - External project config dir is used for modules: C:\Users\Alice\AppData\Local\JetBrains\IntelliJIdea2026.1\projects\projectUntitledName.7f09ee0d\external_build_system\modules
2026-06-17 11:56:39,417 [    397]   INFO - #c.i.o.u.LowMemoryWatcherManager - Use ExponentiallySmoothingTracker(90000 ms)
2026-06-17 11:56:39,418 [    398]   INFO - #c.i.o.u.LowMemoryWatcherManager - Subscribing to MemoryPool[tenured-LOA]{max: 36595712, threshold: 31352832 (0.95 * max)}
2026-06-17 11:56:39,419 [    399]   INFO - #c.i.o.u.LowMemoryWatcherManager - Subscribing to MemoryPool[tenured-SOA]{max: 695310336, threshold: 660544832 (0.95 * max)}
2026-06-17 11:56:39,421 [    401]   INFO - #c.i.o.u.LowMemoryWatcherManager - Skip regular GC time updating because org.jetbrains.jps.service.impl.SharedThreadPoolImpl@77a010c9is not a ScheduledExecutorService
2026-06-17 11:56:39,428 [    408]   INFO - #o.j.j.c.JpsModelLoaderImpl - Loading model: project path = C:/Users/Alice/IdeaProjects/untitled, global options path = C:/Users/Alice/AppData/Roaming/JetBrains/IntelliJIdea2026.1/options
2026-06-17 11:56:39,440 [    637]   INFO - #o.j.j.c.JpsModelLoaderImpl - Model loaded in 213 ms
2026-06-17 11:56:39,441 [    638]   INFO - #o.j.j.c.JpsModelLoaderImpl - Project has 3 modules, 44 libraries
2026-06-17 11:56:39,527 [    724]   INFO - #c.i.u.i.PageCacheUtils - File page caching params:
    DEFAULT_PAGE_SIZE: 10485760
    Direct memory to use, max: 713031680
    FilePageCache: regular
    Regular FilePageCache: 629145600 bytes
    DirectByteBuffers pool: 0 bytes
2026-06-17 11:56:39,582 [    562]   INFO - #o.j.j.m.s.JpsProjectLoader - External project config dir is used: C:\Users\Alice\AppData\Local\JetBrains\IntelliJIdea2026.1\projects\untitled.65419df1\external_build_system\project
2026-06-17 11:56:39,584 [    564]   INFO - #o.j.j.m.s.JpsProjectLoader - External project config dir is used for modules: C:\Users\Alice\AppData\Local\JetBrains\IntelliJIdea2026.1\projects\untitled.65419df1\external_build_system\modules
2026-06-17 11:56:39,611 [    591]   INFO - #o.j.j.c.JpsModelLoaderImpl - Model loaded in 182 ms
2026-06-17 11:56:39,612 [    592]   INFO - #o.j.j.c.JpsModelLoaderImpl - Project has 1 modules, 0 libraries
2026-06-17 11:56:39,705 [    902]   INFO - #o.j.j.i.s.BuildDataManager - Using DependencyGraph-based build incremental analysis
2026-06-17 11:56:39,745 [    725]   INFO - #c.i.u.i.PageCacheUtils - File page caching params:
    DEFAULT_PAGE_SIZE: 10485760
    Direct memory to use, max: 713031680
    FilePageCache: regular
    Regular FilePageCache: 629145600 bytes
    DirectByteBuffers pool: 0 bytes
2026-06-17 11:56:39,928 [    908]   INFO - #o.j.j.i.s.BuildDataManager - Using DependencyGraph-based build incremental analysis
2026-06-17 11:56:39,979 [    959]   INFO - #o.j.j.i.IncProjectBuilder - Building project; isRebuild:false; isMake:true parallel compilation:true; dependency graph enabled:true; library dependencies tracking enabled:false
2026-06-17 11:56:39,981 [   1178]   INFO - #o.j.j.i.s.BuildDataManager - DependencyGraph total differentiate linear time PT0S
2026-06-17 11:56:39,981 [   1178]   INFO - #o.j.j.i.s.BuildDataManager - DependencyGraph total integrate     linear time PT0S
2026-06-17 11:56:39,981 [    961]   INFO - #o.j.k.j.b.KotlinBuilder - is Kotlin incremental compilation enabled for JVM: true
2026-06-17 11:56:39,981 [   1178]   INFO - #o.j.j.c.BuildSession - FilePageCache stats: pageHits=0, pageFastCacheHits=663, regularPageLoads=35, pageLoadsAboveSizeThreshold=0, pageLoadUs=218627, pageDisposalUs=343, capacityInBytes=629145600, disposedBuffers=35 maxRegisteredFiles=98 maxCacheSizeInBytes=35684352totalSizeCachedBytes=0
2026-06-17 11:56:39,985 [    965]   INFO - #o.j.k.j.b.KotlinBuilder - is Kotlin compiler daemon enabled: true
2026-06-17 11:56:39,985 [    965]   INFO - #o.j.k.j.b.KotlinBuilder - Label in local history: build started 3468b570
2026-06-17 11:56:39,998 [    978]   INFO - #o.j.j.b.i.CompilerReferenceIndex - backward reference index version doesn't exist
2026-06-17 11:56:40,003 [    983]   INFO - #o.j.j.b.i.CompilerReferenceIndex - backward reference index version doesn't exist
2026-06-17 11:56:40,030 [   1010]   INFO - #o.j.j.i.IncProjectBuilder - Cleaned output directories in 2 ms
2026-06-17 11:56:40,137 [   1117]   INFO - #o.j.k.j.b.KotlinBuilder - KotlinTargetsIndex created in 19 ms
2026-06-17 11:56:40,149 [   1129]   INFO - #o.j.k.j.b.KotlinBuilder - Total Kotlin global compile context initialization time: 32 ms
2026-06-17 11:56:40,165 [   1145]   INFO - #o.j.j.i.s.BuildDataManager - DependencyGraph untitled differentiate done in PT0.0106312S
2026-06-17 11:56:40,175 [   1155]   INFO - #o.j.j.i.Builder - 依存関係解析により 0 件の影響を受けるファイルを検出しました
2026-06-17 11:56:40,178 [   1158]   INFO - #o.j.j.i.s.BuildDataManager - DependencyGraph untitled integrate done in PT0.0022129S
2026-06-17 11:56:40,206 [   1186]   INFO - #o.j.j.i.IncProjectBuilder - ビルダー Java がビルドの停止を要求しました
org.jetbrains.jps.incremental.StopBuildException: ビルダー Java がビルドの停止を要求しました
2026-06-17 11:56:40,226 [   1206]   INFO - #o.j.j.i.s.BuildDataManager - DependencyGraph total differentiate linear time PT0.0106312S
2026-06-17 11:56:40,226 [   1206]   INFO - #o.j.j.i.s.BuildDataManager - DependencyGraph total integrate     linear time PT0.0022129S
2026-06-17 11:56:40,226 [   1206]   INFO - #o.j.j.c.BuildSession - FilePageCache stats: pageHits=0, pageFastCacheHits=278, regularPageLoads=14, pageLoadsAboveSizeThreshold=0, pageLoadUs=121451, pageDisposalUs=33, capacityInBytes=629145600, disposedBuffers=14 maxRegisteredFiles=35 maxCacheSizeInBytes=12582912totalSizeCachedBytes=0
2026-06-17 11:56:40,808 [      6]   INFO - #o.j.j.c.BuildMain - ==================================================
2026-06-17 11:56:40,822 [     20]   INFO - #o.j.j.c.BuildMain - Build process started. Classpath: C:/df/ide/ideaIUwin/plugins/java/lib/jps-launcher.jar
2026-06-17 11:56:41,211 [    409]   INFO - #o.j.j.c.BuildMain - Connection to IDE established in 376 ms
2026-06-17 11:56:41,253 [    451]   INFO - #o.j.j.c.JpsModelLoaderImpl - Loading model: project path = C:/Users/Alice/IdeaProjects/untitled, global options path = C:/Users/Alice/AppData/Roaming/JetBrains/IntelliJIdea2026.1/options
2026-06-17 11:56:41,542 [    740]   INFO - #o.j.j.m.s.JpsProjectLoader - External project config dir is used: C:\Users\Alice\AppData\Local\JetBrains\IntelliJIdea2026.1\projects\untitled.65419df1\external_build_system\project
2026-06-17 11:56:41,547 [    745]   INFO - #o.j.j.m.s.JpsProjectLoader - External project config dir is used for modules: C:\Users\Alice\AppData\Local\JetBrains\IntelliJIdea2026.1\projects\untitled.65419df1\external_build_system\modules
2026-06-17 11:56:41,604 [    802]   INFO - #o.j.j.c.JpsModelLoaderImpl - Model loaded in 350 ms
2026-06-17 11:56:41,606 [    804]   INFO - #o.j.j.c.JpsModelLoaderImpl - Project has 1 modules, 0 libraries
2026-06-17 11:56:41,847 [   1045]   INFO - #c.i.u.i.PageCacheUtils - File page caching params:
    DEFAULT_PAGE_SIZE: 10485760
    Direct memory to use, max: 713031680
    FilePageCache: regular
    Regular FilePageCache: 629145600 bytes
    DirectByteBuffers pool: 0 bytes
2026-06-17 11:56:41,991 [   1189]   INFO - #o.j.j.i.s.BuildDataManager - Using DependencyGraph-based build incremental analysis
2026-06-17 11:56:42,143 [   1341]   INFO - #o.j.j.c.BuildMain - Pre-loaded process ready in 1336 ms
2026-06-17 11:58:58,772 [ 137970]   INFO - #o.j.j.c.BuildMain - Build canceled, but no build session is running. Exiting.
2026-06-17 11:58:58,819 [ 138017]   INFO - #o.j.j.i.s.BuildDataManager - DependencyGraph total differentiate linear time PT0S
2026-06-17 11:58:58,819 [ 138017]   INFO - #o.j.j.i.s.BuildDataManager - DependencyGraph total integrate     linear time PT0S
2026-06-17 12:01:45,344 [      9]   INFO - #o.j.j.c.BuildMain - ==================================================
2026-06-17 12:01:45,360 [     25]   INFO - #o.j.j.c.BuildMain - Build process started. Classpath: C:/df/ide/ideaIUwin/plugins/java/lib/jps-launcher.jar
2026-06-17 12:01:45,619 [    284]   INFO - #o.j.j.c.BuildMain - Connection to IDE established in 240 ms
2026-06-17 12:01:45,744 [    409]   INFO - #c.i.o.u.LowMemoryWatcherManager - Use ExponentiallySmoothingTracker(90000 ms)
2026-06-17 12:01:45,746 [    411]   INFO - #c.i.o.u.LowMemoryWatcherManager - Subscribing to MemoryPool[tenured-LOA]{max: 36595712, threshold: 31352832 (0.95 * max)}
2026-06-17 12:01:45,746 [    411]   INFO - #c.i.o.u.LowMemoryWatcherManager - Subscribing to MemoryPool[tenured-SOA]{max: 695310336, threshold: 660544832 (0.95 * max)}
2026-06-17 12:01:45,748 [    413]   INFO - #c.i.o.u.LowMemoryWatcherManager - Skip regular GC time updating because org.jetbrains.jps.service.impl.SharedThreadPoolImpl@349e1ac8is not a ScheduledExecutorService
2026-06-17 12:01:45,754 [    419]   INFO - #o.j.j.c.JpsModelLoaderImpl - Loading model: project path = C:/Users/Alice/IdeaProjects/untitled, global options path = C:/Users/Alice/AppData/Roaming/JetBrains/IntelliJIdea2026.1/options
2026-06-17 12:01:45,909 [    574]   INFO - #o.j.j.m.s.JpsProjectLoader - External project config dir is used: C:\Users\Alice\AppData\Local\JetBrains\IntelliJIdea2026.1\projects\untitled.65419df1\external_build_system\project
2026-06-17 12:01:45,911 [    576]   INFO - #o.j.j.m.s.JpsProjectLoader - External project config dir is used for modules: C:\Users\Alice\AppData\Local\JetBrains\IntelliJIdea2026.1\projects\untitled.65419df1\external_build_system\modules
2026-06-17 12:01:45,931 [    596]   INFO - #o.j.j.c.JpsModelLoaderImpl - Model loaded in 177 ms
2026-06-17 12:01:45,932 [    597]   INFO - #o.j.j.c.JpsModelLoaderImpl - Project has 1 modules, 0 libraries
2026-06-17 12:01:46,052 [    717]   INFO - #c.i.u.i.PageCacheUtils - File page caching params:
    DEFAULT_PAGE_SIZE: 10485760
    Direct memory to use, max: 713031680
    FilePageCache: regular
    Regular FilePageCache: 629145600 bytes
    DirectByteBuffers pool: 0 bytes
2026-06-17 12:01:46,201 [      8]   INFO - #o.j.j.c.BuildMain - ==================================================
2026-06-17 12:01:46,215 [     22]   INFO - #o.j.j.c.BuildMain - Build process started. Classpath: C:/df/ide/ideaIUwin/plugins/java/lib/jps-launcher.jar
2026-06-17 12:01:46,221 [    886]   INFO - #o.j.j.i.s.BuildDataManager - Using DependencyGraph-based build incremental analysis
2026-06-17 12:01:46,268 [    933]   INFO - #o.j.j.i.IncProjectBuilder - Building project; isRebuild:false; isMake:true parallel compilation:true; dependency graph enabled:true; library dependencies tracking enabled:false
2026-06-17 12:01:46,270 [    935]   INFO - #o.j.k.j.b.KotlinBuilder - is Kotlin incremental compilation enabled for JVM: true
2026-06-17 12:01:46,274 [    939]   INFO - #o.j.k.j.b.KotlinBuilder - is Kotlin compiler daemon enabled: true
2026-06-17 12:01:46,275 [    940]   INFO - #o.j.k.j.b.KotlinBuilder - Label in local history: build started c32b491e
2026-06-17 12:01:46,282 [    947]   INFO - #o.j.j.b.i.CompilerReferenceIndex - backward reference index version doesn't exist
2026-06-17 12:01:46,284 [    949]   INFO - #o.j.j.b.i.CompilerReferenceIndex - backward reference index version doesn't exist
2026-06-17 12:01:46,312 [    977]   INFO - #o.j.j.i.IncProjectBuilder - Cleaned output directories in 2 ms
2026-06-17 12:01:46,443 [   1108]   INFO - #o.j.k.j.b.KotlinBuilder - KotlinTargetsIndex created in 30 ms
2026-06-17 12:01:46,453 [   1118]   INFO - #o.j.k.j.b.KotlinBuilder - Total Kotlin global compile context initialization time: 41 ms
2026-06-17 12:01:46,472 [   1137]   INFO - #o.j.j.i.s.BuildDataManager - DependencyGraph untitled differentiate done in PT0.0115346S
2026-06-17 12:01:46,488 [   1153]   INFO - #o.j.j.i.Builder - 依存関係解析により 0 件の影響を受けるファイルを検出しました
2026-06-17 12:01:46,498 [   1163]   INFO - #o.j.j.i.s.BuildDataManager - DependencyGraph untitled integrate done in PT0.0087937S
2026-06-17 12:01:46,513 [    320]   INFO - #o.j.j.c.BuildMain - Connection to IDE established in 285 ms
2026-06-17 12:01:46,526 [   1191]   INFO - #o.j.j.i.IncProjectBuilder - ビルダー Java がビルドの停止を要求しました
org.jetbrains.jps.incremental.StopBuildException: ビルダー Java がビルドの停止を要求しました
2026-06-17 12:01:46,546 [   1211]   INFO - #o.j.j.i.s.BuildDataManager - DependencyGraph total differentiate linear time PT0.0115346S
2026-06-17 12:01:46,546 [   1211]   INFO - #o.j.j.i.s.BuildDataManager - DependencyGraph total integrate     linear time PT0.0087937S
2026-06-17 12:01:46,547 [   1212]   INFO - #o.j.j.c.BuildSession - FilePageCache stats: pageHits=0, pageFastCacheHits=278, regularPageLoads=14, pageLoadsAboveSizeThreshold=0, pageLoadUs=101802, pageDisposalUs=29, capacityInBytes=629145600, disposedBuffers=14 maxRegisteredFiles=35 maxCacheSizeInBytes=12582912totalSizeCachedBytes=0
2026-06-17 12:01:46,624 [    431]   INFO - #c.i.o.u.LowMemoryWatcherManager - Use ExponentiallySmoothingTracker(90000 ms)
2026-06-17 12:01:46,625 [    432]   INFO - #c.i.o.u.LowMemoryWatcherManager - Subscribing to MemoryPool[tenured-LOA]{max: 43915264, threshold: 38672384 (0.95 * max)}
2026-06-17 12:01:46,626 [    433]   INFO - #c.i.o.u.LowMemoryWatcherManager - Subscribing to MemoryPool[tenured-SOA]{max: 687990784, threshold: 653591232 (0.95 * max)}
2026-06-17 12:01:46,627 [    434]   INFO - #c.i.o.u.LowMemoryWatcherManager - Skip regular GC time updating because org.jetbrains.jps.service.impl.SharedThreadPoolImpl@babbdaceis not a ScheduledExecutorService
2026-06-17 12:01:46,635 [    442]   INFO - #o.j.j.c.JpsModelLoaderImpl - Loading model: project path = C:/projectUntitledName, global options path = C:/Users/Alice/AppData/Roaming/JetBrains/IntelliJIdea2026.1/options
2026-06-17 12:01:46,789 [    596]   INFO - #o.j.j.m.s.JpsProjectLoader - External project config dir is used: C:\Users\Alice\AppData\Local\JetBrains\IntelliJIdea2026.1\projects\projectUntitledName.7f09ee0d\external_build_system\project
2026-06-17 12:01:46,796 [    603]   INFO - #o.j.j.m.s.JpsProjectLoader - External project config dir is used for modules: C:\Users\Alice\AppData\Local\JetBrains\IntelliJIdea2026.1\projects\projectUntitledName.7f09ee0d\external_build_system\modules
2026-06-17 12:01:46,822 [    629]   INFO - #o.j.j.c.JpsModelLoaderImpl - Model loaded in 187 ms
2026-06-17 12:01:46,823 [    630]   INFO - #o.j.j.c.JpsModelLoaderImpl - Project has 3 modules, 44 libraries
2026-06-17 12:01:46,891 [    698]   INFO - #c.i.u.i.PageCacheUtils - File page caching params:
    DEFAULT_PAGE_SIZE: 10485760
    Direct memory to use, max: 713031680
    FilePageCache: regular
    Regular FilePageCache: 629145600 bytes
    DirectByteBuffers pool: 0 bytes
2026-06-17 12:01:47,043 [    850]   INFO - #o.j.j.i.s.BuildDataManager - Using DependencyGraph-based build incremental analysis
2026-06-17 12:01:47,083 [      8]   INFO - #o.j.j.c.BuildMain - ==================================================
2026-06-17 12:01:47,097 [     22]   INFO - #o.j.j.c.BuildMain - Build process started. Classpath: C:/df/ide/ideaIUwin/plugins/java/lib/jps-launcher.jar
2026-06-17 12:01:47,305 [   1112]   INFO - #o.j.j.i.s.BuildDataManager - DependencyGraph total differentiate linear time PT0S
2026-06-17 12:01:47,306 [   1113]   INFO - #o.j.j.i.s.BuildDataManager - DependencyGraph total integrate     linear time PT0S
2026-06-17 12:01:47,306 [   1113]   INFO - #o.j.j.c.BuildSession - FilePageCache stats: pageHits=0, pageFastCacheHits=663, regularPageLoads=35, pageLoadsAboveSizeThreshold=0, pageLoadUs=191488, pageDisposalUs=80, capacityInBytes=629145600, disposedBuffers=35 maxRegisteredFiles=98 maxCacheSizeInBytes=35684352totalSizeCachedBytes=0
2026-06-17 12:01:47,362 [    287]   INFO - #o.j.j.c.BuildMain - Connection to IDE established in 251 ms
2026-06-17 12:01:47,394 [    319]   INFO - #o.j.j.c.JpsModelLoaderImpl - Loading model: project path = C:/Users/Alice/IdeaProjects/untitled, global options path = C:/Users/Alice/AppData/Roaming/JetBrains/IntelliJIdea2026.1/options
2026-06-17 12:01:47,552 [    477]   INFO - #o.j.j.m.s.JpsProjectLoader - External project config dir is used: C:\Users\Alice\AppData\Local\JetBrains\IntelliJIdea2026.1\projects\untitled.65419df1\external_build_system\project
2026-06-17 12:01:47,554 [    479]   INFO - #o.j.j.m.s.JpsProjectLoader - External project config dir is used for modules: C:\Users\Alice\AppData\Local\JetBrains\IntelliJIdea2026.1\projects\untitled.65419df1\external_build_system\modules
2026-06-17 12:01:47,583 [    508]   INFO - #o.j.j.c.JpsModelLoaderImpl - Model loaded in 188 ms
2026-06-17 12:01:47,583 [    508]   INFO - #o.j.j.c.JpsModelLoaderImpl - Project has 1 modules, 0 libraries
2026-06-17 12:01:47,691 [    616]   INFO - #c.i.u.i.PageCacheUtils - File page caching params:
    DEFAULT_PAGE_SIZE: 10485760
    Direct memory to use, max: 713031680
    FilePageCache: regular
    Regular FilePageCache: 629145600 bytes
    DirectByteBuffers pool: 0 bytes
2026-06-17 12:01:47,838 [    763]   INFO - #o.j.j.i.s.BuildDataManager - Using DependencyGraph-based build incremental analysis
2026-06-17 12:01:47,914 [    839]   INFO - #o.j.j.c.BuildMain - Pre-loaded process ready in 831 ms

 

 

JPS(Java Builder) が

Java Builder
↓
モジュール設定確認
↓
temurin-25が存在しない
↓
StopBuildException


解決策
%APPDATA%\JetBrains\IntelliJIdea2026.1\settingsRepositoryをsettingsRepository_なんかにリネームした後IntelliJ Idea立ち上げてなんらかを実行
JPSが正しくbuildするのでその後終了してsettingsRepository_をsettingsRepositoryに戻す

Hyper-V上のUbuntu Serverの自動起動とIP固定

Hyper-V のDefault Switch「既定のスイッチ」は再起動のたびにサブネットが変わる仕様

外部スイッチに切り替える方法なので
意地でもDefault Switchで運用する方法ではない

Step 1:
# Windowsホストの物理NIC名を確認
Get-NetAdapter

恐らくイーサネットというのが現れると思う

# 外部スイッチ作成(NIC名を合わせる、ここではNetAdapterName)
New-VMSwitch -Name "cat" -NetAdapterName "イーサネット" -AllowManagementOS $true

Step 2:VMのNICを外部スイッチに切り替え
# VM名を確認
Get-VM
# Rename-VM -Name "新しい仮想マシン" -NewName "cat-srv" でVM名を変更可

# NICを切り替え(VM名を合わせる)
Get-VMNetworkAdapter -VMName "cat-srv" | Connect-VMNetworkAdapter -SwitchName "cat"

 


Hyper-V側

bash
$ls /etc/netplan/
# → 50-cloud-init.yaml 等が見えるはず

Netplanはファイルを数字順に読み込み、後のファイルが上書きする。
50-cloud-init.yamlcloud-initが自動生成(dhcp4: true)
99-static.yamlを手動作成(50より後なので上書き)


#cloud-init によるnetplan ファイルの生成禁止

$sudo bash -c 'echo "network: {config: disabled}" > /etc/cloud/cloud.cfg.d/99-disable-network.cfg'


$ip add
ここで見えたIPを設定する。
inet 192.168.1.4/24 brd 192.168.1.255 scope global eth0

GWが 192.168.1.1 かどうか事前確認
$ ip route | grep default
default via 192.168.1.1 dev eth0 proto static

# 静的IP設定ファイル作成
$sudo nano /etc/netplan/99-static.yaml


network:
  version: 2
  ethernets:
    eth0:
      dhcp4: false
      addresses:
        - 192.168.1.4/24
      routes:
        - to: default
          via: 192.168.1.1
      nameservers:
        addresses: [192.168.1.1, 8.8.8.8]

Ctrl+O 保存しCtrl+Xで抜ける。

dhcp4はfalse

$sudo chmod 600 /etc/netplan/99-static.yaml
$sudo netplan apply

 

Seagateにログインすると"このメール アドレスのアカウントが見つかりませんでした。"と弾かれる問題を解決する方法

登録済みのメールアドレスでログインすると
このメール アドレスのアカウントが見つかりませんでした。
と表示される場合、下にある

"アカウントをお持ちでない場合、作成できます "のLinkをクリックして登録済みのメールアドレスを入力する。

登録済みのメールアドレスに確認コードが出るのでそこから再登録するとログイン出来た。

ログイン後RMA履歴も登録済みのHDDドライブも残っている。

ちなみに、WDの場合は電話しないと駄目だった。

ffmpegの-ssでハマった。

ffmpeg -i input.mp4 -ss 10:00 -to 24:00 -c copy output.mp4
再生時破綻する
デコードしながら 10:00 まで進むっぽい

ffmpeg -ss 10:00 -to 24:00 -i input.mp4 -c copy output.mp4
キーフレーム単位
再生時破綻しない

どうやら-iの後に-ssを前後すると動作が変わるっぽい


To extract specific part of input: seeking has to be performed on which first.
"-ss" can be used to seek within the input several ways. 
https://trac.ffmpeg.org/wiki/Seeking

金融商品仲介(SBI証券)口座へのコース変更 SBI新生銀行からSBI証券に遷移後に表示されない

金融商品仲介(SBI証券)口座開設

金融商品仲介(SBI証券)口座へのコース変更


金融商品仲介(SBI証券)口座
金融商品仲介(SBI証券)口座コース変更の手続き


お申し込み前のご確認
ご本人さま確認
お届け出情報のご確認
SBI証券でのお手続きへ

SBI新生銀行のお手続きはこれで終了です。

続いて、SBI証券でのお手続きに進みます。
以下の「SBI証券でのお手続きへ」ボタンをクリックすると、お客さまの情報がSBI証券に送信され、SBI証券のwebサイトへと遷移しますので、そちらの画面から引き続き手続きを行ってください。SBI証券のwebサイトへ遷移後、ログインが必要となりますので、お手元にSBI証券のユーザーネームとログインパスワードを予めご準備ください。

 SBI証券でのお手続きへ


これ以降SBI証券から遷移してもSBI新生銀行から情報を引き継がれないのであれこれ違うブラウザでしたが重要なお知らせの下にある青い"あとで確認する"押したら引き続き表示された。