https://bugs.documentfoundation.org/show_bug.cgi?id=156126
Julien Nabet <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|[email protected] |[email protected] |desktop.org | Status|NEW |ASSIGNED --- Comment #2 from Julien Nabet <[email protected]> --- On pc Debian x86-64 with master sources updated today, I could reproduce this. Here's the relevant part of the assertion: #5 0x00007f2f392533a2 in __assert_fail (assertion=0x7f2f32fdb6fb "index >= 0 && index < pData->length", file=0x7f2f3307795c "/home/julien/lo/libreoffice/include/rtl/strbuf.hxx", line=519, function=0x7f2f32fe77d6 "char &rtl::OStringBuffer::operator[](sal_Int32)") at ./assert/assert.c:101 #6 0x00007f2f33eb5b8d in rtl::OStringBuffer::operator[](int) (this=0x7fff2cb51638, index=0) at include/rtl/strbuf.hxx:519 #7 0x00007f2f33eb42fa in PaletteGPL::LoadPalette() (this=0x56260583ad90) at svx/source/tbxctrls/Palette.cxx:268 #8 0x00007f2f33eb40a0 in PaletteGPL::LoadColorSet(SvxColorValueSet&) (this=0x56260583ad90, rColorSet=...) at svx/source/tbxctrls/Palette.cxx:208 #9 0x00007f2f33ebb7f5 in PaletteManager::ReloadColorSet(SvxColorValueSet&) (this=0x5626059e3ef0, rColorSet=...) at svx/source/tbxctrls/PaletteManager.cxx:248 Now taking Office2016 palette, I see: 1 GIMP Palette 2 Name: Office 2016 3 Columns: 12 4 # 5 255 255 255 6 0 0 0 7 231 230 230 8 68 84 106 9 68 114 196 10 237 125 49 11 165 165 165 12 255 192 0 13 91 155 213 14 112 173 71 15 255 255 255 16 255 255 255 17 18 242 242 242 19 127 127 127 20 208 206 206 21 214 220 228 ... Notice that line 17 is empty. Now let's look at the code which loads GPL palette: 252 void PaletteGPL::LoadPalette() 253 { 254 if( mbLoadedPalette ) return; 255 mbLoadedPalette = true; 256 257 // TODO add error handling!!! 258 SvFileStream aFile(maFPath, StreamMode::READ); 259 mbValidPalette = ReadPaletteHeader( aFile ); 260 261 if( !mbValidPalette ) return; 262 263 OStringBuffer aLine; 264 do { 265 if (aLine[0] != '#' && aLine[0] != '\n') 266 { 267 // TODO check if r,g,b are 0<= x <=255, or just clamp? 268 sal_Int32 nIndex = 0; 269 OString token; So after having created "aLine" var line 263, we test aLine[0] line 265 but aLine is empty here. I've submitted this patch: https://gerrit.libreoffice.org/c/core/+/156421 -- You are receiving this mail because: You are the assignee for the bug.
