rubberduck-vba / Rubberduck

Every programmer needs a rubberduck. COM add-in for the VBA & VB6 IDE (VBE).
https://rubberduckvba.com
GNU General Public License v3.0
1.92k stars 302 forks source link

Excel shutdown when opening a class node in Code Explorer #6197

Closed gitqube closed 9 months ago

gitqube commented 9 months ago

Version 2.5.9.6316 OS: Microsoft Windows NT 10.0.19045.0, x64 Host Product: Microsoft Office x64 Host Version: 16.0.17029.20140 Host Executable: EXCEL.EXE

Description When I try to unfold a certain class in the Code Explorer, Excel crashes completely (immediate shutdown and auto-restart). Project does compile and run without errors. Error is reproducable. Happens always.

I am sorry I cannot provide the source code. But I will append a log file.

RubberduckLog.txt

retailcoder commented 9 months ago

Seems related to another issue that was reported recently. Do you happen to have any @Obsolete annotations? If so, removing them could work around the problem until it's fixed.

gitqube commented 9 months ago

Yes, remove @Obsolete helped.

THANK YOU :-)

tommy9 commented 9 months ago

I had a go at reproducing the error and it appears to be a xaml error in ToolBar.xaml:

            <DataTrigger Binding="{Binding IsObsolete}" Value="True">
                <Setter Property="Foreground" Value="{StaticResource CaptionDisabledColor}" />
                <Setter Property="TextDecorations" Value="Strikethrough" />
            </DataTrigger>

The Foreground property should be set to a brush but it is set to CaptionDisabledColor. I think it just needs to change to CaptionDisabledBrush. I'll prepare a pull request.