win64 · Шаг 7. Решение проблем
Здесь собраны проблемы сборки и запуска TMC Suite под 64 бита и их решения. Все решения
уже внесены в проект. Чисто 64‑битные правки кода вынесены в отдельный журнал
08-porting-changes.md — здесь даны лишь ссылки на них.
7.1 Кнопка «Статистика» крашит программу (H и X моды) — Баг #1 · РЕШЁН
- Где:
kernels\PlanarRT_H\TmcDialogStatistics.cppиkernels\PlanarRT_X\TmcDialogStatistics.cpp, конструкторCTmcDialogStatistics::CTmcDialogStatistics, инициализацияcsTolerance. - Затронуто:
tmc_rth.exe,tmc_rtx.exe. - Симптом: при нажатии «View statistics» (Shift+F4) окно пытается открыться, и программа молча закрывается без сообщения. Одинаково в H и X (и одинаково на win32 и win64 — это не разрядность).
- Причина (установлена отладкой): в конструкторе стояло
csTolerance.Format("100 %");. Строка"100 %"уходит вCString::Formatкак строка формата:%начинает спецификатор, пробел — флаг, далее строка заканчивается → незавершённый спецификатор. Современный UCRT (printf:__stdio_common_vsprintf_s→format_validation) считает это недопустимым параметром: - в Debug —
_CRT_ASSERT; - в Release — обработчик недопустимого параметра CRT → молчаливое завершение процесса.
В старом компиляторе printf не валидировал формат так строго.
- Исправление (правка кода, математика не затронута): в обоих файлах
csTolerance.Format("100 %"); → csTolerance = "100 %"; (прямое присваивание; текст
тот же «100 %», движок формата не задействуется).
- Проверено: окно «Statistics» открывается полностью; Release‑сборки tmc_rth/tmc_rtx
(win32 и win64) пересобраны с исправлением.
- Статус: закрыто.
В
CLAUDE.md/BUILD_ORDER.mdбаг может быть помечен как «не исправлен» — это устаревшая отметка; актуально поISSUES.md— исправлен.
7.2 Вьюверы: «Encountered an improper argument» при запуске — Баг #5 · РЕШЁН
- Где: TMCGROUT, TMCROS, TMC_DN (общий код вьювера).
- Симптом: при запуске — окно MFC «Encountered an improper argument»; после OK
приложение стартует, но при «вызове графика из файла» — та же ошибка. При открытии
horns.soc— аварийный выход0xC0000409(STATUS_STACK_BUFFER_OVERRUN). Одинаково на win32 и win64 → не разрядность, а непортированный исходный код вьюверов. - Причина:
1.
CTMCGROUTDoc::MakeDocFileName()вызывалSetPathName(GetTitle())иSetPathName(ch1)без второго аргументаbAddToMRU(по умолчаниюTRUE). MFC пытался добавить в список недавних файлов неполный путь (GetTitle()— заголовок «TMCGROUT1»);CRecentFileList::Add→GetFullPathName/AfxFullPathс недопустимым путём →CInvalidArgException. 2. ВInitInstance()отсутствовалиAfxOleInit()(Shell/COM дляCRecentFileList) иSetRegistryKey()(без него настройки/MRU пишутся в%WINDIR%\*.INI). 3. ВStdAfx.hне было#include <afxdisp.h>. - Исправление (математика не затронута):
MakeDocFileName:SetPathName(GetTitle(), FALSE),SetPathName(ch1, FALSE).InitInstance:AfxOleInit();иSetRegistryKey("<имя_программы>")(ключиTMCGROUT,TMCROS,TMC_DN).StdAfx.h:#include <afxdisp.h>.- Файлы: в
Tmcgrout,Tmcrtout,DiaNapGr—TMCGROUT.cpp/TMCGROUT.CPP,TMCGROUTDoc.cpp,StdAfx.h. - Проверено: все вьюверы (win32 и win64) запускаются без ошибки и открывают
horns.soc. - Статус: закрыто.
7.3 Ядра (tmc_rth/tmc_rtx) и FieldView крашатся при открытии файла — Баг #6 · РЕШЁН
- Где:
kernels\PlanarRT_H\PlanRT_H.cppиkernels\PlanarRT_X\PlanRT_H.cpp(функцияCPlanRT_HApp::InitInstance);fieldview\FldView.cpp(CFldViewApp::InitInstance). - Затронуто:
tmc_rth.exe,tmc_rtx.exe,FieldView.exe. - Симптом: при открытии любого расчётного файла
.tpl(для ядер) или файла поля.dat(для FieldView) Windows показывает «Параметр задан неверно», программа молча закрывается, файл~$Prepr$~не создаётся. Код завершения процесса —0xC0000409(STATUS_STACK_BUFFER_OVERRUN). Проявляется одинаково на win32 и win64 — это не разрядность. Запуск без файла работает; краш только при открытии документа. Дополнительный эффект: из ядра FieldView «не вызывается» — кнопка «View Field and topology» вроде срабатывает, но окно не появляется и ошибки нет: ядро запускает FieldView черезCreateProcess(успешно), а сам FieldView мгновенно падает по той же причине. - Причина: это тот же дефект, что Баг #5 (раздел 7.2), но не применённый к ядрам
и FieldView. В
InitInstanceестьLoadStdProfileSettings(список недавних файлов, MRU) иRegisterShellFileTypes, но нетAfxOleInit()(у ядер ещё и нетSetRegistryKey). При открытии документа MFC вызываетCDocument::SetPathName→CWinApp::AddToRecentFileList→CRecentFileList::Add, и тот бросает необработанное исключениеCInvalidArgException(AfxThrowInvalidArgException). Никто его не ловит →terminate()→0xC0000409→ система показывает «Параметр задан неверно». Краш происходит вSetPathNameдо чтения данных, поэтому препроцессор и не создаёт~$Prepr$~. В старом компиляторе/окружении это не падало. - Исправление (правка кода инициализации, математика не затронута):
- В
CPlanRT_HApp::InitInstance(обе папки ядер) в начало добавленыAfxOleInit();иSetRegistryKey("PlanarRT_H")/SetRegistryKey("PlanarRT_X"). - В
CFldViewApp::InitInstanceдобавленAfxOleInit();, дефолтныйSetRegistryKey("Local AppWizard-Generated Applications")заменён наSetRegistryKey("FieldView"). - В
kernels\PlanarRT_H\StdAfx.hиkernels\PlanarRT_X\StdAfx.hдобавлен#include <afxdisp.h>(в FieldView он уже был). - Эффект: настройки и MRU теперь пишутся в реестр
HKCU\Software\<ключ>, а не в недоступный%WINDIR%\*.INI. - Проверено: все 4 конфигурации ядер (tmc_rth/tmc_rtx × win32/win64) и FieldView
(win32/win64) пересобраны; открытие
.tpl/.datбольше не вызывает краш,~$Prepr$~создаётся, FieldView запускается и рисует поля. - Статус: закрыто.
Примечание: этот баг — не про разрядность (проявляется и фиксится одинаково на win32 и win64), поэтому он остаётся в этом разделе, а не в
08-porting-changes.md. Подробный символизированный стек падения — в журналеISSUES.md(Баг #6).
7.4 «Параметр задан неверно» при открытии TEST_EPS.TPL (выход за границу строки в ReadSmatrix) — Баг #7 · РЕШЁН
- Где:
src\libs\TMCIndan\TmcRTH_IndanOutput.cpp, методCTmcRTH_IndanOutput::ReadSmatrix, цикл поиска точки-расширения в имени S-файла (примерно строки 468–475). - Затронуто:
tmc_rth.exe,tmc_rtx.exe(код в общей библиотеке TMCIndan). - Симптом: после исправления Бага #6 ядра открывают почти все
.tpl, но конкретноsamples\TPL\TEST_EPS.TPLпри открытии показывает модальное окно «Параметр задан неверно.» с кнопкой ОК. Это не краш — процесс остаётся жив (ждёт нажатия ОК). Другие.tplсчитаются нормально, на обеих платформах одинаково. - Причина: опечатка индекса — в цикле обращение
csFileNameSMatrix[i]вместоcsFileNameSMatrix[j]. Цикл должен перебирать символы имени поj, но читает фиксированный индексi— смещение разбора строки SMATRIX (≈17), тогда как имяtest1071имеет длину 8. В современной MFCCString::operator[]при индексе строго больше длины строки бросаетAtlThrow(E_INVALIDARG)→COleExceptionс кодом0x80070057(этоHRESULT_FROM_WIN32(ERROR_INVALID_PARAMETER)). Исключение бросается при чтении секции OUTPUT (вOnInitialUpdate→ReadData), его ловит штатный обработчик MFCCWinApp::ProcessWndProcException→CException::ReportError→AfxMessageBoxпоказывает системный текст «Параметр задан неверно». Старый компилятор в Release индекс не проверял (молча читал мусор), поэтому раньше «работало». - Почему только TEST_EPS: исключение возникает лишь когда индекс больше длины имени.
У соседнего метода чтения FILE (
ReadFile) аналогичный цикл стартует с индекса, равного длине строки (это допустимо —operator[]при индексе, равном длине, возвращает'\0'и не бросает), поэтому он безопасен для всех файлов. ВReadSmatrixиндекс заметно превышал длину именно для этого файла/имени. - Исправление (опечатка индекса, не математика): битый цикл заменён на безопасную
проверку наличия точки в имени через
strchr:
n = ( strchr( szBuf, '.' ) != NULL ) ? 1 : 0;
(где szBuf — то же имя файла). Смысл сохранён: если в имени нет точки-расширения,
ниже к нему добавляется .s.
- Пересборка: пересобрана библиотека TMCIndan.lib (win32+win64), затем
перелинкованы ядра tmc_rth/tmc_rtx (win32+win64) и FieldView.
- Проверено: все 4 ядра открывают TEST_EPS.TPL без окна ошибки, ~$Prepr$~
создаётся; контрольный прогон показал, что окно сообщения больше не вызывается.
- Статус: закрыто.
Примечание: этот баг — не про разрядность (проявляется и фиксится одинаково на win32 и win64), поэтому он остаётся в этом разделе, а не в
08-porting-changes.md.
7.5 64‑битные ошибки компиляции — где искать решение
Все правки, потребовавшиеся именно из‑за перехода на x64, подробно описаны в журнале
08-porting-changes.md. Кратко:
C2555(несовпадение типа возвратаDoModal) → П‑1:int DoModal()→INT_PTR DoModal(). Вьюверы и FieldView.C2440/C2737(карта сообщенийON_WM_TIMER) → П‑2:OnTimer(UINT)→OnTimer(UINT_PTR). Вьюверы и FieldView.error C3861: 'outp'/'inp' не найден→ П‑3 (нужна и для win32): ветка доступа к портам заменена наBeep(). Ядра H и X.C1083: gl\glaux.h не найден→ Ф4‑1 (нужна и для win32): удалён мёртвый include, убранglaux.lib. FieldView.
Полное обоснование каждой правки, с указанием файлов и подтверждением «математика не затронута», — в
08-porting-changes.md.
7.6 Ошибки сборки настроек (общие с win32)
C1041(несколькоcl.exeв один.pdb) → снять переопределенияObjectFileName/ProgramDataBaseFileName=.\Release/.- Toolset
v100не найден → переключить на v145 (Properties → General). - Жёсткие пути
E:\WORK,D:\work,c:\tmc→ удалить, подключитьCommon.props/LibOutput.props/ExeOutput.props. /MACHINE:I386в линкере → убрать (несовместима с x64).C2143/C2059(макросETIME) → С‑1:#ifdef ETIME / #undef ETIME / #endifпередenum ST_ITEMSвMAINWNDW.H.C1083: error.h не найден→ С‑2:#include <error.h>→#include <Error1.h>.
7.7 Линковка падает: «не найдена библиотека *.lib»
- Все 6 библиотек Фазы 1 лежат в
dist\win64\lib. - В проекте подключён
Common.props(добавляетdist\win64\libв Library Directories). - Конфигурация Release и платформа x64 совпадают у библиотек и у программы. Нельзя линковать 64‑битную программу с библиотекой, собранной под Win32.
7.8 OpenGL: линкер не находит opengl32.lib/glu32.lib
- Убедитесь, что установлен Windows SDK (см.
01-requirements.md). - Для платформы
x64библиотеки берутся изum\x64. Имя в линкере —opengl32.lib(одно и то же для x86/x64; нужную разрядность выбирает VS). Отдельной «OpenGL64» нет. - В списке линковки
glaux.libбыть не должно (см. Ф4‑1).
7.9 X‑мода: «рябь»/неустойчивость поля — сборка во float вместо double — Баг #11 · РЕШЁН КЛЮЧЕВОЕ
Это не разрядность (проявляется одинаково на win32 и win64) — это точность типа
_real. Обязательно проверьте при сборке из «голого» исходника.
- Затронуто:
tmc_rtx.exe(X‑мода). H‑мода устойчива и во float. - Симптом: в FieldView поле идёт растущей «ребристостью», волна «замирает», амплитуда нарастает; одиночный импульс не гаснет до конца, а потом снова раскачивается.
- Причина: в
src\Include\Typerth.hбыла активна одинарная точность_PREC_FLOAT(_real=float, 4 байта) вместо двойной_PREC_DOUBLE(double, 8 байт). Схема рассеяния X‑моды маргинально устойчива (собств. число такта ≈1.0): воfloatокругление накапливается и раскачивает поле, вdouble— нет. НЕ компилятор (VS2008 во float ломается так же, x87SSE2 идентично). Сверка с эталоном 2006 г.:doubleсовпадает до ~6 цифр и гасит импульс. - Решение (применено): в
src\Include\Typerth.hоставить#define _PREC_DOUBLE(а//#define _PREC_FLOAT) и пересобрать ВСЕ компоненты под x64 (и win32) —_realвходит в ABI общих структур и в формат файлов.sizeof(_real)→ 8 байт (#TMCGROFLD_Accuracy 8); вьюверы/FieldView собраны под double и читают это корректно. - Полный разбор —
ISSUES.md, Баг #11; то же решение вwin32\07-troubleshooting.md§ 7.8. - Статус: закрыто. Математика не менялась — восстановлена исходная двойная точность.
win64 · Step 7. Troubleshooting
This collects problems of building and running TMC Suite for 64 bits and their solutions.
All solutions are already applied in the project. Purely 64-bit code changes are moved to a
separate log 08-porting-changes.md — only references to them are given here.
7.1 The "Statistics" button crashes the program (H and X modes) — Bug #1 · FIXED
- Where:
kernels\PlanarRT_H\TmcDialogStatistics.cppandkernels\PlanarRT_X\TmcDialogStatistics.cpp, the constructorCTmcDialogStatistics::CTmcDialogStatistics, initialization ofcsTolerance. - Affected:
tmc_rth.exe,tmc_rtx.exe. - Symptom: pressing "View statistics" (Shift+F4) tries to open the window, and the program closes silently with no message. Identical in H and X (and identical on win32 and win64 — this is not bitness).
- Cause (established by debugging): the constructor had
csTolerance.Format("100 %");. The string"100 %"goes toCString::Formatas a format string:%begins a specifier, the space is a flag, then the string ends -> an incomplete specifier. The modern UCRT (printf:__stdio_common_vsprintf_s->format_validation) treats this as an invalid parameter: - in Debug —
_CRT_ASSERT; - in Release — the CRT invalid-parameter handler -> silent process termination.
In the old compiler printf did not validate the format so strictly.
- Fix (code change, math not affected): in both files
csTolerance.Format("100 %"); -> csTolerance = "100 %"; (direct assignment; the text is
the same "100 %", the format engine is not involved).
- Verified: the "Statistics" window opens fully; the Release builds of tmc_rth/tmc_rtx
(win32 and win64) were rebuilt with the fix.
- Status: closed.
In
CLAUDE.md/BUILD_ORDER.mdthe bug may be marked "not fixed" — that is an outdated note; perISSUES.mdit is fixed.
7.2 Viewers: "Encountered an improper argument" at startup — Bug #5 · FIXED
- Where: TMCGROUT, TMCROS, TMC_DN (shared viewer code).
- Symptom: at startup — the MFC window "Encountered an improper argument"; after OK
the application starts, but on "calling up a graph from a file" — the same error. When
opening
horns.soc— an abort0xC0000409(STATUS_STACK_BUFFER_OVERRUN). Identical on win32 and win64 -> not bitness but unported viewer source code. - Cause:
1.
CTMCGROUTDoc::MakeDocFileName()calledSetPathName(GetTitle())andSetPathName(ch1)without the second argumentbAddToMRU(defaultTRUE). MFC tried to add an incomplete path to the recent-files list (GetTitle()is the title "TMCGROUT1");CRecentFileList::Add->GetFullPathName/AfxFullPathwith an invalid path ->CInvalidArgException. 2.InitInstance()lackedAfxOleInit()(Shell/COM forCRecentFileList) andSetRegistryKey()(without it, settings/MRU are written to%WINDIR%\*.INI). 3.StdAfx.hlacked#include <afxdisp.h>. - Fix (math not affected):
MakeDocFileName:SetPathName(GetTitle(), FALSE),SetPathName(ch1, FALSE).InitInstance:AfxOleInit();andSetRegistryKey("<program name>")(keysTMCGROUT,TMCROS,TMC_DN).StdAfx.h:#include <afxdisp.h>.- Files: in
Tmcgrout,Tmcrtout,DiaNapGr—TMCGROUT.cpp/TMCGROUT.CPP,TMCGROUTDoc.cpp,StdAfx.h. - Verified: all viewers (win32 and win64) start without the error and open
horns.soc. - Status: closed.
7.3 Kernels (tmc_rth/tmc_rtx) and FieldView crash when opening a file — Bug #6 · FIXED
- Where:
kernels\PlanarRT_H\PlanRT_H.cppandkernels\PlanarRT_X\PlanRT_H.cpp(the functionCPlanRT_HApp::InitInstance);fieldview\FldView.cpp(CFldViewApp::InitInstance). - Affected:
tmc_rth.exe,tmc_rtx.exe,FieldView.exe. - Symptom: when opening any computation file
.tpl(for the kernels) or a field file.dat(for FieldView), Windows shows "The parameter is incorrect", the program closes silently, the file~$Prepr$~is not created. The process exit code is0xC0000409(STATUS_STACK_BUFFER_OVERRUN). It appears identically on win32 and win64 — this is not bitness. Starting without a file works; the crash is only on opening a document. Additional effect: FieldView "is not called" from the kernel — the "View Field and topology" button seems to trigger, but no window appears and there is no error: the kernel launches FieldView viaCreateProcess(successfully), and FieldView itself crashes instantly for the same reason. - Cause: the same defect as Bug #5 (section 7.2), but not applied to the kernels and
FieldView. In
InitInstancethere isLoadStdProfileSettings(recent files, MRU) andRegisterShellFileTypes, but noAfxOleInit()(the kernels also lackSetRegistryKey). When a document is opened, MFC callsCDocument::SetPathName->CWinApp::AddToRecentFileList->CRecentFileList::Add, which throws an unhandledCInvalidArgException(AfxThrowInvalidArgException). Nobody catches it ->terminate()->0xC0000409-> the system shows "The parameter is incorrect". The crash happens inSetPathNamebefore the data is read, which is why the preprocessor never creates~$Prepr$~. In the old compiler/environment it did not crash. - Fix (initialization code change, math not affected):
- In
CPlanRT_HApp::InitInstance(both kernel folders),AfxOleInit();andSetRegistryKey("PlanarRT_H")/SetRegistryKey("PlanarRT_X")were added at the beginning. - In
CFldViewApp::InitInstance,AfxOleInit();was added, the defaultSetRegistryKey("Local AppWizard-Generated Applications")was replaced withSetRegistryKey("FieldView"). - In
kernels\PlanarRT_H\StdAfx.handkernels\PlanarRT_X\StdAfx.h,#include <afxdisp.h>was added (FieldView already had it). - Effect: settings and MRU are now written to the registry
HKCU\Software\<key>, not to the inaccessible%WINDIR%\*.INI. - Verified: all 4 kernel configurations (tmc_rth/tmc_rtx × win32/win64) and FieldView
(win32/win64) were rebuilt; opening
.tpl/.datno longer crashes,~$Prepr$~is created, FieldView launches and draws fields. - Status: closed.
Note: this bug is not about bitness (it appears and is fixed identically on win32 and win64), so it stays in this section, not in
08-porting-changes.md. The detailed symbolized crash stack is in theISSUES.mdlog (Bug #6).
7.4 "The parameter is incorrect" when opening TEST_EPS.TPL (out-of-range string access in ReadSmatrix) — Bug #7 · FIXED
- Where:
src\libs\TMCIndan\TmcRTH_IndanOutput.cpp, the methodCTmcRTH_IndanOutput::ReadSmatrix, the loop searching for the extension dot in the S-file name (around lines 468–475). - Affected:
tmc_rth.exe,tmc_rtx.exe(code in the shared library TMCIndan). - Symptom: after fixing Bug #6 the kernels open almost all
.tpl, but specificallysamples\TPL\TEST_EPS.TPLshows, on opening, a modal window "The parameter is incorrect." with an OK button. This is not a crash — the process stays alive (waiting for OK). Other.tplfiles compute normally, identically on both platforms. - Cause: an index typo — in the loop the access is
csFileNameSMatrix[i]instead ofcsFileNameSMatrix[j]. The loop should iterate over the name characters viaj, but it reads a fixed indexi— the parse offset of the SMATRIX line (~17), whereas the nametest1071is 8 characters long. In modern MFC,CString::operator[]with an index strictly greater than the length throwsAtlThrow(E_INVALIDARG)->COleExceptionwith code0x80070057(which isHRESULT_FROM_WIN32(ERROR_INVALID_PARAMETER)). The exception is thrown while reading the OUTPUT section (inOnInitialUpdate->ReadData); the standard MFC handlerCWinApp::ProcessWndProcException->CException::ReportError->AfxMessageBoxshows the system text "The parameter is incorrect". The old compiler in Release did not check the index (it silently read garbage), so it "worked" before. - Why only TEST_EPS: the exception arises only when the index exceeds the name length.
The neighboring FILE reading method (
ReadFile) has a similar loop that starts at an index equal to the string length (which is allowed —operator[]with an index equal to the length returns'\0'and does not throw), so it is safe for all files. InReadSmatrixthe index noticeably exceeded the length for this particular file/name. - Fix (index typo, not math): the broken loop was replaced with a safe check for the
presence of a dot in the name via
strchr:
n = ( strchr( szBuf, '.' ) != NULL ) ? 1 : 0;
(where szBuf is the same file name). The meaning is preserved: if the name has no
extension dot, .s is appended below.
- Rebuild: the TMCIndan.lib library was rebuilt (win32+win64), then the kernels
tmc_rth/tmc_rtx (win32+win64) and FieldView were relinked.
- Verified: all 4 kernels open TEST_EPS.TPL without the error window, ~$Prepr$~ is
created; a control run showed that the message window is no longer raised.
- Status: closed.
Note: this bug is not about bitness (it appears and is fixed identically on win32 and win64), so it stays in this section, not in
08-porting-changes.md.
7.5 64-bit compilation errors — where to find the solution
All changes required specifically because of the move to x64 are described in detail in the
log 08-porting-changes.md. Briefly:
C2555(return-type mismatch ofDoModal) -> P-1:int DoModal()->INT_PTR DoModal(). Viewers and FieldView.C2440/C2737(theON_WM_TIMERmessage map) -> P-2:OnTimer(UINT)->OnTimer(UINT_PTR). Viewers and FieldView.error C3861: 'outp'/'inp' not found-> P-3 (needed for win32 too): the port-access branch was replaced withBeep(). Kernels H and X.C1083: gl\glaux.h not found-> F4-1 (needed for win32 too): the dead include was removed,glaux.libwas removed. FieldView.
The full justification of each change, with the files and the confirmation "the math is not affected", is in
08-porting-changes.md.
7.6 Settings build errors (shared with win32)
C1041(severalcl.exeinto one.pdb) -> remove the overridesObjectFileName/ProgramDataBaseFileName=.\Release/.- Toolset
v100not found -> switch to v145 (Properties -> General). - Hard paths
E:\WORK,D:\work,c:\tmc-> remove, attachCommon.props/LibOutput.props/ExeOutput.props. /MACHINE:I386in the linker -> remove (incompatible with x64).C2143/C2059(theETIMEmacro) -> C-1:#ifdef ETIME / #undef ETIME / #endifbeforeenum ST_ITEMSinMAINWNDW.H.C1083: error.h not found-> C-2:#include <error.h>->#include <Error1.h>.
7.7 Linking fails: "library *.lib not found"
- All 6 Phase 1 libraries are in
dist\win64\lib. Common.propsis attached in the project (it addsdist\win64\libto Library Directories).- The Release configuration and x64 platform match for the libraries and the program. You cannot link a 64-bit program with a library built for Win32.
7.8 OpenGL: the linker cannot find opengl32.lib/glu32.lib
- Make sure the Windows SDK is installed (see
01-requirements.md). - For the
x64platform the libraries are taken fromum\x64. The name in the linker isopengl32.lib(the same for x86/x64; VS picks the right bitness). There is no separate "OpenGL64". glaux.libmust not be in the link list (see F4-1).
7.9 X-mode: field "ripple"/instability — building in float instead of double — Bug #11 · FIXED · KEY
This is not bitness (it appears identically on win32 and win64) — it is the precision of the
_realtype. Be sure to check it when building from a "bare" source.
- Affected:
tmc_rtx.exe(X-mode). The H-mode is stable even in float. - Symptom: in FieldView the field develops growing "rippling", the wave "freezes", the amplitude grows; a single pulse does not fully decay and then swings up again.
- Cause: in
src\Include\Typerth.h, single precision_PREC_FLOAT(_real=float, 4 bytes) was active instead of double_PREC_DOUBLE(double, 8 bytes). The X-mode scattering scheme is marginally stable (the step eigenvalue ≈1.0): infloatrounding accumulates and swings the field, indoubleit does not. NOT the compiler (VS2008 in float breaks the same way, x87 vs SSE2 identical). A comparison with the 2006 reference:doublematches to ~6 digits and damps the pulse. - Solution (applied): in
src\Include\Typerth.hkeep#define _PREC_DOUBLE(and//#define _PREC_FLOAT) and rebuild ALL components for x64 (and win32) —_realis part of the ABI of the shared structures and of the file format.sizeof(_real)-> 8 bytes (#TMCGROFLD_Accuracy 8); the viewers/FieldView are built as double and read this correctly. - Full analysis —
ISSUES.md, Bug #11; the same solution inwin32\07-troubleshooting.md§ 7.8. - Status: closed. The math was not changed — the original double precision was restored.