Description: Using cppumaker on Windows with types.rdb and types/offapi.rdb leads to crash assert. Steps to Reproduce: 1. Build LibreOffice 26.8 dev master on Windows with --enable-dbgutil and --enable-odk: https://wiki.documentfoundation.org/Development/BuildingOnWindows 2. Use cppumaker with the command: "C:\cygwin64\home\user\lode\dev\core\instdir\sdk/bin/cppumaker" -Gc -Oc:/libreofficedev26.8_sdk/WINexample.out/inc C:\cygwin64\home\user\lode\dev\core\instdir\program\types.rdb C:\cygwin64\home\user\lode\dev\core\instdir\program\types\offapi.rdb (You may need to tune the path for cppumaker, types.rdb and offapi.rdb depending on how you build. The above path is for a build with the help of Cygwin, and not wsl) Actual Results: A window showing assertion failure is shown, displaying: Debug Assertion Failed! Program: ...\cppumaker.exe File: ...\include\vector Line 1941 Expression: vector subscript out of range [Abort][Retry][Ignore] Expected Results: No crash assert should happen in debug mode Reproducible: Always User Profile Reset: No Additional Info: Crash assert happens in a debug build with odk enabled: Version: 26.8.0.0.alpha0+ (X86_64) Build ID: f25dbabaec77368a30a8561a9d04120add4e9aa2 CPU threads: 20; OS: Windows 11 X86_64 (build 26200); UI render: Skia/Vulkan; VCL: win Locale: en-US (en_US); UI: en-US Calc: CL threaded No crash happens with LibreOffice 25.8 stable (release build): Version: 25.8.3.2 (X86_64) Build ID: 8ca8d55c161d602844f5428fa4b58097424e324e CPU threads: 20; OS: Windows 11 X86_64 (build 26200); UI render: Skia/Vulkan; VCL: win Locale: en-US (en_US); UI: en-US Calc: CL threaded "C:\Program Files\LibreOffice\sdk\bin\cppumaker.exe" -Gc -Oc:/libreoffice25.8_sdk/WINexample.out/inc "C:/Program Files/LibreOffice/program/types.rdb" "C:/Program Files/LibreOffice/program/types/offapi.rdb"
Stack trace from Visual Studio 2026: cppumaker.exe!std::vector<unoidl::EnumTypeEntity::Member,std::allocator<unoidl::EnumTypeEntity::Member>>::operator[](const unsigned __int64 _Pos) Line 1940 at C:\Program Files\Microsoft Visual Studio\18\Community\VC\Tools\MSVC\14.50.35717\include\vector(1940) cppumaker.exe!`anonymous namespace'::EnumType::dumpComprehensiveGetCppuType(FileStream & o) Line 3430 at codemaker\source\cppumaker\cpputype.cxx(3430) cppumaker.exe!`anonymous namespace'::CppuType::dumpGetCppuType(FileStream & out) Line 628 at codemaker\source\cppumaker\cpputype.cxx(628) cppumaker.exe!`anonymous namespace'::EnumType::dumpHppFile(FileStream & o, codemaker::cppumaker::Includes & includes) Line 3359 at codemaker\source\cppumaker\cpputype.cxx(3359) cppumaker.exe!`anonymous namespace'::CppuType::dumpFile(std::basic_string_view<char16_t,std::char_traits<char16_t>> uri, std::basic_string_view<char16_t,std::char_traits<char16_t>> name, codemaker::cppumaker::FileType eFileType, const CppuOptions & options) Line 447 at codemaker\source\cppumaker\cpputype.cxx(447) cppumaker.exe!`anonymous namespace'::CppuType::dumpFiles(const rtl::OUString & uri, const CppuOptions & options) Line 317 at codemaker\source\cppumaker\cpputype.cxx(317) cppumaker.exe!`anonymous namespace'::CppuType::dump(const CppuOptions & options) Line 417 at codemaker\source\cppumaker\cpputype.cxx(417) cppumaker.exe!produce(const rtl::OUString & name, const rtl::Reference<TypeManager> & manager, codemaker::GeneratedTypeSet & generated, const CppuOptions & options) Line 4054 at codemaker\source\cppumaker\cpputype.cxx(4054) cppumaker.exe!produce(const rtl::OUString & name, const rtl::Reference<TypeManager> & manager, codemaker::GeneratedTypeSet & generated, const CppuOptions & options) Line 4045 at codemaker\source\cppumaker\cpputype.cxx(4045) cppumaker.exe!produce(const rtl::OUString & name, const rtl::Reference<TypeManager> & manager, codemaker::GeneratedTypeSet & generated, const CppuOptions & options) Line 4045 at codemaker\source\cppumaker\cpputype.cxx(4045) cppumaker.exe!produce(const rtl::OUString & name, const rtl::Reference<TypeManager> & manager, codemaker::GeneratedTypeSet & generated, const CppuOptions & options) Line 4045 at codemaker\source\cppumaker\cpputype.cxx(4045) cppumaker.exe!produce(const rtl::OUString & name, const rtl::Reference<TypeManager> & manager, codemaker::GeneratedTypeSet & generated, const CppuOptions & options) Line 4045 at codemaker\source\cppumaker\cpputype.cxx(4045) cppumaker.exe!produce(const rtl::OUString & name, const rtl::Reference<TypeManager> & manager, codemaker::GeneratedTypeSet & generated, const CppuOptions & options) Line 4045 at codemaker\source\cppumaker\cpputype.cxx(4045) cppumaker.exe!sal_main_with_args(int argc, char * * argv) Line 72 at codemaker\source\cppumaker\cppumaker.cxx(72) cppumaker.exe!main(int argc, char * * argv) Line 40 at codemaker\source\cppumaker\cppumaker.cxx(40)
The problem happens in Enumerations in C:\libreofficedev26.8_sdk\WINexample.out\inc $ grep -rl "typelib_typedescription_newEnum" com/sun/star/beans/PropertyState.hpp com/sun/star/reflection/FieldAccessMode.hpp com/sun/star/reflection/MethodMode.hpp com/sun/star/reflection/ParamMode.hpp com/sun/star/reflection/TypeDescriptionSearchDepth.hpp com/sun/star/registry/RegistryKeyType.hpp com/sun/star/registry/RegistryValueType.hpp com/sun/star/uno/TypeClass.hpp To simplify the test, you may try the IDL file(s) above, which contain certain enumerations: $ instdir/sdk/bin/cppumaker -Gc -O. udkapi/com/sun/star/uno/TypeClass.idl Segmentation fault Or: $ instdir/sdk/bin/cppumaker -Gc -O. udkapi/com/sun/star/registry/RegistryKeyType.idl This one leads to assertion failure dialog. The exact same commands work on Windows LO stable release binaries and also Linux, and create .hdl/.hpp files, although I get errors for some other types like com.sun.star.uno.RuntimeException which is not an issue here.