Page MenuHomePhabricator

type_info objects may get hidden visibility on gcc < 4.5
Closed, ResolvedPublic

Description

expected behaviour: when you click on "Volumerendering" in the Volume Visualization plugin, the checknox should be toggled and a volume visualization of the selected image should show up

actual behaviour: checkbox is not checked, no volume visualization comes up and the log window shows the following:
#46.210# ERROR: In /local/muellerm/Dropbox/mitk/mitk/Core/Code/DataManagement/mitkPropertyList.cpp, l.75: Trying to set existing property to a property with different type. Use ReplaceProperty() instead.

tested on: ubuntu 10.04, sandboxapp, commit "bug-8996-adapt-to-new-navidata-file-format"

is this maybe related to the changes in the property system?

Event Timeline

This bug could not be reproduced on Windows and nor on Linux machines of Jan and Thomas vB.

Matt reporting on sourceforge mailing list:

Hi there,

There may be a potential issue in QmitkVolumeVizualizationView. When I do the
following:

  1. Load nifti image
  2. Display the Volume Visualization view.
  3. Select my image in the Datamanager
  4. Select the Volumerendering checkbox in the QmitkVolumeVisualizationView

the checkbox however jumps immediately back to unchecked. It won't turn on and
stay on. Hence I can't volume render.

At first, I thought the reason was that in
QmitkVolumeVisualizationView::OnEnableRendering, the property is already
present, so when you try and set the value, you get a warning saying, that
rather than set the property, you should use ReplaceProperty instead. So, I
tried changing the code to use Replace property. This appeared to set the
property (at least no warning/error messages were produced), however, in
UpdateInterface, the section of code that reads:

bool enabled = false;

m_SelectedNode->GetBoolProperty("volumerendering",enabled);
m_Controls->m_EnableRenderingCB->setEnabled(true);

It turns out that the GetBoolProperty was always returning false, (despite the
fact, I had just used ReplaceProperty to set it to true).

The short term work around is that if you open the Property List editor, you
can set the volumerendering property to be on, then go back to the Volume
Visualisation View and then the checkbox can be forced to On.

However, it appears that there is definitely an issue with properties seemingly
not updating.

Im happy to raise a bug, but it may be me missing the point, so can someone
check this, and double check if this is all true?

Thanks as always

Matt

related to T8481: problems with symbol visibility when using dlopen with RTLD_GLOBAL, dynamic_cast`s fail when used across shared object boundaries! adding dependency

This is not directly related to 8481, although the general problem is the same.

Long story short: multiply defined type_info objects are not properly exported and hence gcc < 4.5 marks them as hidden if they are generated in a DSO with default visibility "hidden".

The previous comment was from me :-)

Pushed branch bug-9117-export-typeinfo-objects

[e88d3f]: Merge branch 'bug-9117-export-typeinfo-objects'

  • bug-9117-export-typ

Merged commits:

2011-08-31 20:08:34 Michael Mueller [96f91a]
Always export template specialization for correct type_info handling.


2011-08-31 20:08:01 Michael Mueller [42cd14]
Use gcc pragma directives to force default visibility for ITK events.


2011-08-31 19:45:11 Michael Mueller [83e726]
Improved the import/export macros for MITK modules.

  • Added support for gcc visibility
  • Removed MitkCore and Qmitk macros from mitkCommon.h

[c093ed]: Merge branch 'bug-9117-export-typeinfo-objects'

  • bug-9117-export-typ

Merged commits:

2011-09-01 15:39:10 Sascha Zelzer [5a4ea8]
COMP: Added missing export declaration

[c343d0]: Merge branch 'bug-9117-export-typeinfo-objects'

  • bug-9117-export-typ

Merged commits:

2011-09-02 16:30:26 Sascha Zelzer [1054a2]
COMP: Added visibility pragma for itkEventObject.h

This header defines classes whose type_info nodes must have
default visibility.


2011-09-02 16:29:21 Sascha Zelzer [1b9be6]
COMP: Fixed include statements

Modules without a dependency to Mitk can not include mitkCommon.h


2011-09-01 15:39:10 Sascha Zelzer [f5b417]
COMP: Added missing export declaration