OpenSceneGraph Forum Forum Index OpenSceneGraph Forum
Official forum which mirrors the existent OSG mailing lists. Messages posted here are forwarded to the mailing list and vice versa.
 
   FAQFAQ    SearchSearch    MemberlistMemberlist    RulesRules    UsergroupsUsergroups    RegisterRegister 
 Mail2Forum SettingsMail2Forum Settings  ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
   AlbumAlbum  OpenSceneGraph IRC ChatOpenSceneGraph IRC Chat   SmartFeedSmartFeed 

osgViewer::GraphicsWindowEmbedded constructor raises error in Debug mode under Visual Studio 2015


 
Post new topic   Reply to topic    OpenSceneGraph Forum Forum Index -> Submission
View previous topic :: View next topic  
Author Message
Davide Raccagni
Guest





PostPosted: Wed Sep 28, 2016 9:19 am    Post subject:
osgViewer::GraphicsWindowEmbedded constructor raises error in Debug mode under Visual Studio 2015
Reply with quote

Hello,I have developed a Qt widget based on QOpenGLWidget. It uses internally an instance of osgViewer::GraphicsWindowEmbedded. The constructor osgViewer::GraphicsWindowEmbedded(int x, int y, int width, int height) crashes in Debug mode with Visual Studio 2015, while it works in Release mode. Apparently the reason is that _traits->sharedContext is not properly initialized to 0 in Debug mode.


Regards,
Davide Raccagni

------------------
Post generated by Mail2Forum
Back to top
robertosfield
OSG Project Lead


Joined: 18 Mar 2009
Posts: 10799

PostPosted: Fri Oct 07, 2016 9:31 am    Post subject:
osgViewer::GraphicsWindowEmbedded constructor raises error in Debug mode under Visual Studio 2015
Reply with quote

HI Davide,

I have just done a code review of GraphicsContext::Traits, the
oberserver_ptr<> that is used for _shadrerContext pointer and the
GraphicsWindowEmbedded implementation and haven't spotted any problems
with initialization.

The only thing possibly missing is a copy constructor and copy
operator for Traits, which would leave the compile to implement this.
The class should probably hide this methods or implement them
explicitly, however, I can't say whether this has an influence over
what you are seeing as you haven't provided code. Once I and others
have code that can reproduce issues we can start to look into them,
without it we're stuck making vague guesses about what may or may not
be in your code/usage case that is causing problems.

What issues like this it's best to post them to the osg-users mailing
list/forum as the osg-submissions mailing list is meant for code
submissions and not general support.

Cheers,
Robert.

On 28 September 2016 at 10:16, Davide Raccagni
<> wrote:
Quote:
Hello,
I have developed a Qt widget based on QOpenGLWidget. It uses internally an
instance of osgViewer::GraphicsWindowEmbedded. The constructor
osgViewer::GraphicsWindowEmbedded(int x, int y, int width, int height)
crashes in Debug mode with Visual Studio 2015, while it works in Release
mode. Apparently the reason is that _traits->sharedContext is not properly
initialized to 0 in Debug mode.

Regards,
Davide Raccagni





------------------
Post generated by Mail2Forum
Back to top
View user's profile Send private message
Davide Raccagni
Guest





PostPosted: Wed Oct 12, 2016 11:14 am    Post subject:
osgViewer::GraphicsWindowEmbedded constructor raises error in Debug mode under Visual Studio 2015
Reply with quote

Hello,by using the previous commit, the problem seems to be solved.


Regards,
Davide


On Wed, Sep 28, 2016 at 11:16 AM, Davide Raccagni < (
Only registered users can see emails on this board!
Get registred or enter the forums!
)> wrote:
Quote:
Hello,I have developed a Qt widget based on QOpenGLWidget. It uses internally an instance of osgViewer::GraphicsWindowEmbedded. The constructor osgViewer::GraphicsWindowEmbedded(int x, int y, int width, int height) crashes in Debug mode with Visual Studio 2015, while it works in Release mode. Apparently the reason is that _traits->sharedContext is not properly initialized to 0 in Debug mode.


Regards,
Davide Raccagni



------------------
Post generated by Mail2Forum
Back to top
robertosfield
OSG Project Lead


Joined: 18 Mar 2009
Posts: 10799

PostPosted: Wed Oct 12, 2016 12:43 pm    Post subject:
osgViewer::GraphicsWindowEmbedded constructor raises error in Debug mode under Visual Studio 2015
Reply with quote

Hi Davide,

On 12 October 2016 at 12:11, Davide Raccagni <> wrote:
Quote:
by using the previous commit, the problem seems to be solved.

Previous to what commit?

If there is a problem with what is available in the OSG github repo,
if not I'd also like to know so I know that this thread is closed.

Robert.


------------------
Post generated by Mail2Forum
Back to top
View user's profile Send private message
robertosfield
OSG Project Lead


Joined: 18 Mar 2009
Posts: 10799

PostPosted: Wed Nov 16, 2016 9:56 am    Post subject:
osgViewer::GraphicsWindowEmbedded constructor raises error in Debug mode under Visual Studio 2015
Reply with quote

Hi Davide.

I didn't get a reply to my question back in October. Could clarify
what commit you were talking about?

Robert.

On 12 October 2016 at 13:41, Robert Osfield <> wrote:
Quote:
On 12 October 2016 at 12:11, Davide Raccagni <> wrote:
Quote:
by using the previous commit, the problem seems to be solved.

Previous to what commit?

If there is a problem with what is available in the OSG github repo,
if not I'd also like to know so I know that this thread is closed.


------------------
Post generated by Mail2Forum
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    OpenSceneGraph Forum Forum Index -> Submission All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum

Similar Topics
Topic Author Forum Replies Posted
No new posts 3rdParty package precompiled with Vis... zonk Announcement [ANN] 0 Wed Mar 22, 2017 3:51 pm View latest post
No new posts problem with shapefile height when lo... vinothrajendran4 General 2 Thu Feb 16, 2017 12:22 pm View latest post
No new posts Error building terrain with shapefile... robertosfield VirtualPlanetBuilder [vpb] 0 Mon Feb 06, 2017 9:11 am View latest post
No new posts Error building terrain with shapefile... vinothrajendran4 VirtualPlanetBuilder [vpb] 0 Mon Feb 06, 2017 6:24 am View latest post
No new posts Visual flicker when using multi-pass ... hartwigw General 3 Sat Jan 07, 2017 6:21 pm View latest post


Board Security Anti Bot Question MOD - phpBB MOD against Spam Bots
Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP