Delgine 3D Tools & Content DeleD Community Edition
Forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

3D viewport error when click-move near->outside border

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    DeleD Community Edition Forum Index -> DeleD Development
View previous topic :: View next topic  
Author Message
Paul-Jan
Site Admin


Joined: 08 Aug 2004
Posts: 3066
Location: Lage Zwaluwe

PostPosted: Sat Feb 06, 2010 1:23 pm    Post subject: 3D viewport error when click-move near->outside border Reply with quote

Fik submitted a patch for this (bug 2925379, patch 2946176), but I am stumbling over some minor issues preventing me from committing things as they are. Help everyone! Very Happy
- The code isn't compatible with Delphi 6/7, as those versions don't expose the onMouseLeave event. Delphi 7 is still very popular so I'm trying to keep things backwards compatible (it's also the compiler used to build the distribution binaries Wink)
- I introduced the event manually (using CM_MOUSELEAVE, under a conditional version define), and I think the patch-code is called the way it is supposed to, but like Fik's patch comment stated: the problem with the mouse cursor disappearing on the viewport (until the next click) is still there. My problem is that is the only issue I ever had in the first place, so what is it that you guys are experiencing that this patch does fix?

Without reproduction it's rather hard to tell if I rewrote the patch correctly. I could just commit things or supply an alternative patch to test, but you guys could then only verify the delphi 2006+ code path anyway. So I really need reproduction I guess...
Back to top
View user's profile Send private message Visit poster's website
chronozphere
DeleD PRO user


Joined: 20 Jun 2006
Posts: 1010
Location: Netherlands

PostPosted: Sat Feb 06, 2010 1:50 pm    Post subject: Reply with quote

fik's patch seems to work for me (Turbo delphi 2006). Nice work! Very Happy

Two sidenotes:
- It doesn't fix the "entire" problem, because the other views suffer from the same problem
- Allthough the camera doesn't go bezerk anymore, the cursor is still hidden, which is not what we want.
Back to top
View user's profile Send private message
Paul-Jan
Site Admin


Joined: 08 Aug 2004
Posts: 3066
Location: Lage Zwaluwe

PostPosted: Sat Feb 06, 2010 6:40 pm    Post subject: Reply with quote

Explain "the camera goes bezerk", because for me it doesn't, it stays fixed when I move the cursor outside the window (starting at the border)... I just get the cursor artifact.

I trust Fik's code works fine, but what I need to know is if _my_ (delphi 7 compatible) version also works fine. What I can do is committing this "blind"and ask you guys to test the beta binaries on monday.

I don't care much for the other views, you are much much more likely to trigger this issue in the 3D view, right?
Back to top
View user's profile Send private message Visit poster's website
chronozphere
DeleD PRO user


Joined: 20 Jun 2006
Posts: 1010
Location: Netherlands

PostPosted: Sat Feb 06, 2010 7:19 pm    Post subject: Reply with quote

Quote:

Explain "the camera goes bezerk", because for me it doesn't, it stays fixed when I move the cursor outside the window (starting at the border)... I just get the cursor artifact.


Well.. maybe the camera doesn't go bezerk. The mouse is invisible and the camera will move when you move your mouse. There is no apparent way to get out of this situations (but right click works).

After fik's patch the camera doesn't move anymore (when the bug is "activated"), but the cursor is still invisible.

Quote:

I don't care much for the other views, you are much much more likely to trigger this issue in the 3D view, right?


All viewports are controlled by right-dragging, so chances are equal. Smile
With some good abstraction, we can fix the all the viewports in the same time (but I don't think these abstractions are there Sad, Every viewport has its own mouse handling, nothing generic AFAIK )
Back to top
View user's profile Send private message
fik
Member


Joined: 11 Oct 2006
Posts: 303

PostPosted: Sun Feb 07, 2010 10:09 pm    Post subject: Reply with quote

Hi sorry patch not compatible with delphi 6/7 didn't know that didn't expose mouse leave event.
Here is a little video to show the problem behaviour.
http://www.mediafire.com/download.php?3gmigjjddg1
The first time move is taken out of active screen slowly and then released. the second is moved out very fast and then released . As you can see normal(first )mouse returns to active screen properly. Wrong (second ) it does not return when button released and when you bring mouse over with no buttons pressed it moves view in strange ways and mouse jumps.
Hope this helps you see to recreate bug on your machine.

Have never noticed that you can cause this in other views to but yes it does now I try it.

Edit:- I have done more investigation and its because when you move mouse out of active window fast enough(not always very fast ). The mouse and location gets lost.
Mouseup never gets called, not sure if this is windows or delphi fault. Suspect windows as call gets made to mouse leave. When with mouse button down it shold be locked, so that this dosen't happen.
I now have a fix which cures all problem including cursor, but it still uses mouseleave. If delphi6/7 doesn't support this I have no idea how to rectify Sad
This fault happens to me even with compiled exe downloaded from sourceforge so not caused by versions compiled just with Delphi 2006. Suggestions ?
Back to top
View user's profile Send private message
Paul-Jan
Site Admin


Joined: 08 Aug 2004
Posts: 3066
Location: Lage Zwaluwe

PostPosted: Mon Feb 08, 2010 6:58 am    Post subject: Reply with quote

Awesome, please submit your new code as a patch! I'll simply make the code delphi 6/7 compatible again, then commit it.

I want the code to be delphi 7 compatible at the project level, but that doesn't mean you (as a valued contributor) have to personally worry about it too much, it's much easier to fix for someone with that Delphi version available.
Back to top
View user's profile Send private message Visit poster's website
AWM Mars
Member


Joined: 06 Jan 2010
Posts: 1195
Location: Wilts England

PostPosted: Mon Feb 08, 2010 4:03 pm    Post subject: Reply with quote

I have noticed the cursor out of the window event, I can sometimes 'cure' it by pressing ESC on the keyboard. I suspect its a nVidia driver issue, as I have encountered several 'issues' recently after updating my GC driver. These seem to have gone away since, I rolled back to Oct 2009's driver.
_________________
Politeness is priceless when received, cost nothing to own or give, yet some cannot afford.

Checkout:
http://www.awm.mars.yourinside.com/
http://www.bccservices.co.uk
http://www.localtradecheck.co.uk


Last edited by AWM Mars on Mon Feb 08, 2010 10:32 pm; edited 1 time in total
Back to top
View user's profile Send private message Visit poster's website
Paul-Jan
Site Admin


Joined: 08 Aug 2004
Posts: 3066
Location: Lage Zwaluwe

PostPosted: Mon Feb 08, 2010 7:03 pm    Post subject: Reply with quote

Well, the good thing is it isn't driver-specific, it (i.e. the cursor disappearing) occurs on NVidia, ATI and Intel (shudder) type graphics cards. I'm sure we are pretty close to solving this one, it is just going to be closed whether the fix will make it into 2.42 or a subsequent version.
Back to top
View user's profile Send private message Visit poster's website
fik
Member


Joined: 11 Oct 2006
Posts: 303

PostPosted: Tue Feb 09, 2010 12:51 am    Post subject: Reply with quote

Just uploaded new fix. Think this is better as keeps cursor.

AWM Mars as Paul-Jan says this is not a driver issue. It seems to be a windows messaging problem when mouse moves to fast while being dragged out of a window.
Back to top
View user's profile Send private message
AWM Mars
Member


Joined: 06 Jan 2010
Posts: 1195
Location: Wilts England

PostPosted: Tue Feb 09, 2010 3:17 pm    Post subject: Reply with quote

Oh well, glad you guys found the wee bug. I did have issues with the OpenGL driver causing crashing in DeleD. When I rolled back to the Oct 2009 version, the crashing stopped.
It was related to selecting a vertice and deleting it. Seems if its connected to others forming a chain, it crashes. I also work round this now, by deleting from an end, not in the middle, except when its a circle or a linked shape, then I try and select the all the linked parts in one go.
_________________
Politeness is priceless when received, cost nothing to own or give, yet some cannot afford.

Checkout:
http://www.awm.mars.yourinside.com/
http://www.bccservices.co.uk
http://www.localtradecheck.co.uk
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    DeleD Community Edition Forum Index -> DeleD Development 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