[prev in list] [next in list] [prev in thread] [next in thread] 

List:       vtkusers
Subject:    Re: [vtkusers] Error at runtime using qmake for building project (vtkContextDevice2D)
From:       KOZLOVSKY Nicolas <nicolas.kozlovsky () fr ! thalesgroup ! com>
Date:       2016-01-29 7:47:25
Message-ID: F95815390044324EBC59883E2CAC225337799672E1 () THSONEA01CMS06P ! one ! grp
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


Hi all
Just to be sure, I tried with VTK 6.1.0 and it worked perfectly well with qmake \
compilation. I have tried also with VTK7.0 rc2, but same results as with VTK 6.3 ==> \
runtime error



De : KOZLOVSKY Nicolas
Envoyé : mardi 26 janvier 2016 09:21
À : vtkusers@vtk.org
Objet : RE: Error at runtime using qmake for building project (vtkContextDevice2D)

Hi
Thanks for the files, I looked to the files and I saw that we did the same things for \
openglRenderer initialization.

The difference I saw is the use of the render :

QVTKWidget *vtkWidget = new QVTKWidget;
setCentralWidget(vtkWidget);

vtkSmartPointer<vtkContextView> contextView = vtkSmartPointer<vtkContextView>::New();
contextView.Get()->SetRenderWindow(vtkWidget->GetRenderWindow());
contextView->GetRenderWindow()->SetSize(800, 800);
this->resize(800, 800);

In fact when in debug mode, the run stops in file vtkContextActor.cxx in function \
RenderOverlay

this->Context->GetDevice()->SetViewportSize(vtkVector2i(size));

It seems that the context is not initialized.

De : MOUSSAUD David 244079 [mailto:David.MOUSSAUD@cea.fr]
Envoyé : lundi 25 janvier 2016 14:18
À : KOZLOVSKY Nicolas; vtkusers@vtk.org<mailto:vtkusers@vtk.org>
Objet : RE:Error at runtime using qmake for building project (vtkContextDevice2D)


Hi Nicolas,

A couple weeks ago, i have joined my qmake project to an other thread \
(http://public.kitware.com/pipermail/vtkusers/2016-January/093650.html)



Here it is again attached in this email.

I'm using also vtk 6.3.



Regards,

David.



________________________________
De : vtkusers [vtkusers-bounces@vtk.org] de la part de KOZLOVSKY Nicolas \
[nicolas.kozlovsky@fr.thalesgroup.com] Envoyé : lundi 25 janvier 2016 12:57
À : vtkusers@vtk.org<mailto:vtkusers@vtk.org>
Objet : [vtkusers] Error at runtime using qmake for building project \
(vtkContextDevice2D) Hi all

I try to use QVTKWidget in a big project using qmake for building.
Each time I run my code, I got this error under Linux Ubuntu 1510) and VTK 6.3 :

In VTK-6.3.0/Rendering/Context2D/vtkContextDevice2D.cxx, line 27
Error: no override found for 'vtkContextDevice2D'.

I read a lot about this and put in the main.cpp :

#include <vtkAutoInit.h>
VTK_MODULE_INIT(vtkRenderingOpenGL)
VTK_MODULE_INIT(vtkInteractionStyle)

I have always the same error at runtime.
I try also to add this directive to .pro file:

DEFINES += "\"vtkRenderingCore_AUTOINIT=1 (vtkRenderingOpenGL)\""

But again same error at runtime.

If now I build the project with cmake, I have no problem everything is running fine.
How can I build with qmake ???

Thanks for any clues

Nicolas


[Attachment #5 (text/html)]

<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<html xmlns:v="urn:schemas-microsoft-com:vml" \
xmlns:o="urn:schemas-microsoft-com:office:office" \
xmlns:w="urn:schemas-microsoft-com:office:word" \
xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" \
xmlns="http://www.w3.org/TR/REC-html40"><head><meta name=Generator content="Microsoft \
Word 14 (filtered medium)"><!--[if !mso]><style>v\:* {behavior:url(#default#VML);} \
o\:* {behavior:url(#default#VML);} w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><style><!--
/* Font Definitions */
@font-face
	{font-family:Wingdings;
	panose-1:5 0 0 0 0 0 0 0 0 0;}
@font-face
	{font-family:Wingdings;
	panose-1:5 0 0 0 0 0 0 0 0 0;}
@font-face
	{font-family:Calibri;
	panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
	{font-family:Tahoma;
	panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
	{margin:0cm;
	margin-bottom:.0001pt;
	font-size:11.0pt;
	font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
	{mso-style-priority:99;
	color:blue;
	text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
	{mso-style-priority:99;
	color:purple;
	text-decoration:underline;}
p
	{mso-style-priority:99;
	margin:0cm;
	margin-bottom:.0001pt;
	font-size:12.0pt;
	font-family:"Times New Roman","serif";}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
	{mso-style-priority:99;
	mso-style-link:"Texte de bulles Car";
	margin:0cm;
	margin-bottom:.0001pt;
	font-size:8.0pt;
	font-family:"Tahoma","sans-serif";}
span.TextedebullesCar
	{mso-style-name:"Texte de bulles Car";
	mso-style-priority:99;
	mso-style-link:"Texte de bulles";
	font-family:"Tahoma","sans-serif";}
p.msochpdefault, li.msochpdefault, div.msochpdefault
	{mso-style-name:msochpdefault;
	mso-style-priority:99;
	margin:0cm;
	margin-bottom:.0001pt;
	font-size:12.0pt;
	font-family:"Calibri","sans-serif";}
span.emailstyle17
	{mso-style-name:emailstyle17;
	font-family:"Calibri","sans-serif";
	color:windowtext;}
span.EmailStyle22
	{mso-style-type:personal;
	font-family:"Calibri","sans-serif";
	color:#1F497D;}
span.EmailStyle23
	{mso-style-type:personal-reply;
	font-family:"Calibri","sans-serif";
	color:#1F497D;}
.MsoChpDefault
	{mso-style-type:export-only;
	font-size:10.0pt;}
@page WordSection1
	{size:612.0pt 792.0pt;
	margin:70.85pt 70.85pt 70.85pt 70.85pt;}
div.WordSection1
	{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=FR link=blue vlink=purple><div \
class=WordSection1><p class=MsoNormal><span lang=EN-US style='color:#1F497D'>Hi \
all<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US \
style='color:#1F497D'>Just to be sure, I tried with VTK 6.1.0 and it worked perfectly \
well with qmake compilation. I have tried also with VTK7.0 rc2, but same results as \
with VTK 6.3 </span><span lang=EN-US \
style='font-family:Wingdings;color:#1F497D'>è</span><span lang=EN-US \
style='color:#1F497D'> runtime error<o:p></o:p></span></p><p class=MsoNormal><span \
lang=EN-US style='color:#1F497D'><o:p>&nbsp;</o:p></span></p><div><p \
class=MsoNormal><span lang=EN-US \
style='color:#1F497D'><o:p>&nbsp;</o:p></span></p></div><p class=MsoNormal><span \
lang=EN-US style='color:#1F497D'><o:p>&nbsp;</o:p></span></p><div><div \
style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm'><p \
class=MsoNormal><b><span \
style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>De&nbsp;:</span></b><span \
style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> KOZLOVSKY Nicolas \
<br><b>Envoyé&nbsp;:</b> mardi 26 janvier 2016 09:21<br><b>À&nbsp;:</b> \
vtkusers@vtk.org<br><b>Objet&nbsp;:</b> RE: Error at runtime using qmake for building \
project (vtkContextDevice2D)<o:p></o:p></span></p></div></div><p \
class=MsoNormal><o:p>&nbsp;</o:p></p><p class=MsoNormal><span lang=EN-US \
style='color:#1F497D'>Hi<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US \
style='color:#1F497D'>Thanks for the files, I looked to the files and I saw that we \
did the same things for openglRenderer initialization.<o:p></o:p></span></p><p \
class=MsoNormal><span lang=EN-US style='color:#1F497D'><o:p>&nbsp;</o:p></span></p><p \
class=MsoNormal><span lang=EN-US style='color:#1F497D'>The difference I saw is the \
use of the render :<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US \
style='color:#1F497D'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span lang=EN-US \
style='color:#1F497D'>QVTKWidget *vtkWidget = new QVTKWidget;<o:p></o:p></span></p><p \
class=MsoNormal><span lang=EN-US \
style='color:#1F497D'>setCentralWidget(vtkWidget);<o:p></o:p></span></p><p \
class=MsoNormal><span lang=EN-US style='color:#1F497D'><o:p>&nbsp;</o:p></span></p><p \
class=MsoNormal><span lang=EN-US \
style='color:#1F497D'>vtkSmartPointer&lt;vtkContextView&gt; contextView = \
vtkSmartPointer&lt;vtkContextView&gt;::New();<o:p></o:p></span></p><p \
class=MsoNormal><span lang=NL \
style='color:#1F497D'>contextView.Get()-&gt;SetRenderWindow(vtkWidget-&gt;GetRenderWindow());<o:p></o:p></span></p><p \
class=MsoNormal><span lang=EN-US \
style='color:#1F497D'>contextView-&gt;GetRenderWindow()-&gt;SetSize(800, \
800);<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US \
style='color:#1F497D'>this-&gt;resize(800, 800);<o:p></o:p></span></p><p \
class=MsoNormal><span lang=EN-US style='color:#1F497D'><o:p>&nbsp;</o:p></span></p><p \
class=MsoNormal><span lang=EN-US style='color:#1F497D'>In fact when in debug mode, \
the run stops in file vtkContextActor.cxx in function \
RenderOverlay<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US \
style='color:#1F497D'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span lang=EN-US \
style='color:#1F497D'>this-&gt;Context-&gt;GetDevice()-&gt;SetViewportSize(vtkVector2i(size));<o:p></o:p></span></p><p \
class=MsoNormal><span lang=EN-US style='color:#1F497D'><o:p>&nbsp;</o:p></span></p><p \
class=MsoNormal><span lang=EN-US style='color:#1F497D'>It seems that the context is \
not initialized.<o:p></o:p></span></p><p class=MsoNormal><span \
style='color:#1F497D'><o:p>&nbsp;</o:p></span></p><div><div \
style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm'><p \
class=MsoNormal><b><span \
style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>De&nbsp;:</span></b><span \
style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> MOUSSAUD David 244079 [<a \
href="mailto:David.MOUSSAUD@cea.fr">mailto:David.MOUSSAUD@cea.fr</a>] \
<br><b>Envoyé&nbsp;:</b> lundi 25 janvier 2016 14:18<br><b>À&nbsp;:</b> KOZLOVSKY \
Nicolas; <a href="mailto:vtkusers@vtk.org">vtkusers@vtk.org</a><br><b>Objet&nbsp;:</b> \
RE:Error at runtime using qmake for building project \
(vtkContextDevice2D)<o:p></o:p></span></p></div></div><p \
class=MsoNormal><o:p>&nbsp;</o:p></p><div><p><span \
style='font-size:10.0pt;font-family:"Tahoma","sans-serif";color:black'>Hi \
Nicolas,<o:p></o:p></span></p><p><span \
style='font-size:10.0pt;font-family:"Tahoma","sans-serif";color:black'>A couple weeks \
ago, i have joined my&nbsp;qmake project to an other thread (<a \
href="http://public.kitware.com/pipermail/vtkusers/2016-January/093650.html">http://pu \
blic.kitware.com/pipermail/vtkusers/2016-January/093650.html</a>)<o:p></o:p></span></p><p><span \
style='font-size:10.0pt;font-family:"Tahoma","sans-serif";color:black'>&nbsp;<o:p></o:p></span></p><p><span \
style='font-size:10.0pt;font-family:"Tahoma","sans-serif";color:black'>Here it is \
again attached in this email. <o:p></o:p></span></p><p><span \
style='font-size:10.0pt;font-family:"Tahoma","sans-serif";color:black'>I'm using also \
vtk 6.3.<o:p></o:p></span></p><p><span \
style='font-size:10.0pt;font-family:"Tahoma","sans-serif";color:black'>&nbsp;<o:p></o:p></span></p><p><span \
style='font-size:10.0pt;font-family:"Tahoma","sans-serif";color:black'>Regards,<o:p></o:p></span></p><p><span \
style='font-size:10.0pt;font-family:"Tahoma","sans-serif";color:black'>David.<o:p></o:p></span></p><p><span \
style='font-size:10.0pt;font-family:"Tahoma","sans-serif";color:black'>&nbsp;<o:p></o:p></span></p><div><div \
class=MsoNormal align=center style='text-align:center'><span \
style='font-size:12.0pt;font-family:"Times New Roman","serif";color:black'><hr size=2 \
width="100%" align=center></span></div><div id=divRpF663477><p class=MsoNormal \
style='margin-bottom:12.0pt'><b><span \
style='font-size:10.0pt;font-family:"Tahoma","sans-serif";color:black'>De \
:</span></b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif";color:black'> \
vtkusers [vtkusers-bounces@vtk.org] de la part de KOZLOVSKY Nicolas \
[nicolas.kozlovsky@fr.thalesgroup.com]<br><b>Envoyé :</b> lundi 25 janvier 2016 \
12:57<br><b>À :</b> <a \
href="mailto:vtkusers@vtk.org">vtkusers@vtk.org</a><br><b>Objet :</b> [vtkusers] \
Error at runtime using qmake for building project (vtkContextDevice2D)</span><span \
style='font-size:12.0pt;font-family:"Times New \
Roman","serif";color:black'><o:p></o:p></span></p></div><div><div><p \
class=MsoNormal><span style='color:black'>Hi all<o:p></o:p></span></p><p \
class=MsoNormal><span style='color:black'>&nbsp;<o:p></o:p></span></p><p \
class=MsoNormal><span lang=EN-US style='color:black'>I try to use QVTKWidget in a big \
project using qmake for building.</span><span \
style='color:black'><o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US \
style='color:black'>Each time I run my code, I got this error under Linux Ubuntu \
1510) and VTK 6.3 :</span><span style='color:black'><o:p></o:p></span></p><p \
class=MsoNormal><span style='color:black'>&nbsp;<o:p></o:p></span></p><p \
class=MsoNormal><span lang=EN-US style='color:black'>In \
VTK-6.3.0/Rendering/Context2D/vtkContextDevice2D.cxx, line 27</span><span \
style='color:black'><o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US \
style='color:black'>Error: no override found for 'vtkContextDevice2D'.</span><span \
style='color:black'><o:p></o:p></span></p><p class=MsoNormal><span \
style='color:black'>&nbsp;<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US \
style='color:black'>I read a lot about this and put in the main.cpp :</span><span \
style='color:black'><o:p></o:p></span></p><p class=MsoNormal><span \
style='color:black'>&nbsp;<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US \
style='color:black'>#include &lt;vtkAutoInit.h&gt;</span><span \
style='color:black'><o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US \
style='color:black'>VTK_MODULE_INIT(vtkRenderingOpenGL)</span><span \
style='color:black'><o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US \
style='color:black'>VTK_MODULE_INIT(vtkInteractionStyle)</span><span \
style='color:black'><o:p></o:p></span></p><p class=MsoNormal><span \
style='color:black'>&nbsp;<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US \
style='color:black'>I have always the same error at runtime.</span><span \
style='color:black'><o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US \
style='color:black'>I try also to add this directive to .pro file:</span><span \
style='color:black'><o:p></o:p></span></p><p class=MsoNormal><span \
style='color:black'>&nbsp;<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US \
style='color:black'>DEFINES += &#8220;\&#8221;vtkRenderingCore_AUTOINIT=1 \
(vtkRenderingOpenGL)\&#8221;&#8221;</span><span \
style='color:black'><o:p></o:p></span></p><p class=MsoNormal><span \
style='color:black'>&nbsp;<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US \
style='color:black'>But again same error at runtime.</span><span \
style='color:black'><o:p></o:p></span></p><p class=MsoNormal><span \
style='color:black'>&nbsp;<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US \
style='color:black'>If now I build the project with cmake, I have no problem \
everything is running fine.</span><span style='color:black'><o:p></o:p></span></p><p \
class=MsoNormal><span lang=EN-US style='color:black'>How can I build with qmake \
???</span><span style='color:black'><o:p></o:p></span></p><p class=MsoNormal><span \
style='color:black'>&nbsp;<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US \
style='color:black'>Thanks for any clues</span><span \
style='color:black'><o:p></o:p></span></p><p class=MsoNormal><span \
style='color:black'>&nbsp;<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US \
style='color:black'>Nicolas</span><span style='color:black'><o:p></o:p></span></p><p \
class=MsoNormal><span \
style='color:black'>&nbsp;<o:p></o:p></span></p></div></div></div></div></div></body></html>



["M  Nicolas KOZLOVSKY.vcf" (text/x-vcard)]

_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ

Search the list archives at: http://markmail.org/search/?q=vtkusers

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/vtkusers


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic