Pet bug bounty

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, LCMark

malte
Posts: 1098
Joined: Thu Feb 23, 2006 8:34 pm
Location: Ostenfeld germany
Contact:

Pet bug bounty

Post by malte » Fri May 17, 2013 10:29 am

Now, actually I am not (yet) in the situation that I can mess with the guts of the engine. Sooooo... I really need to have a specific bug fixed. How do I a) start looking what might cause it and b) go about fixing it (while I am learning C) :-)

The bug in question is:

http://quality.runrev.com/show_bug.cgi?id=10384

Bottle of Whisk(e)y to the one who helps fixing :-)

Best,

Malte

shaosean
Posts: 906
Joined: Thu Nov 04, 2010 7:53 am

Re: Pet bug bounty

Post by shaosean » Fri May 17, 2013 10:33 am

can you post what the bug is, not everyone has access to the bug database..

malte
Posts: 1098
Joined: Thu Feb 23, 2006 8:34 pm
Location: Ostenfeld germany
Contact:

Re: Pet bug bounty

Post by malte » Fri May 17, 2013 11:08 am

Hi s.

Modal dialogue prevents alt tab on windows to get back to LC app

If a modal dialogue is open you can not use alt + Tab on windows to come back to your liveCode application.

Cheers,

Malte

shaosean
Posts: 906
Joined: Thu Nov 04, 2010 7:53 am

Re: Pet bug bounty

Post by shaosean » Fri May 17, 2013 7:49 pm

Good God Windows sucks :P

mwieder
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3581
Joined: Mon Jan 22, 2007 7:36 am
Location: Berkeley, CA, US
Contact:

Re: Pet bug bounty

Post by mwieder » Sat May 18, 2013 11:16 pm

Looks like this is an issue that was first reported in 2006.
I so do not want to mess with this.
Whisky's tempting, though...

malte
Posts: 1098
Joined: Thu Feb 23, 2006 8:34 pm
Location: Ostenfeld germany
Contact:

Re: Pet bug bounty

Post by malte » Sun May 19, 2013 12:04 am

2 bottles then... <g>

shaosean
Posts: 906
Joined: Thu Nov 04, 2010 7:53 am

Re: Pet bug bounty

Post by shaosean » Sun May 19, 2013 5:27 am

From what I can tell, this is standard Windows behaviour when there is a modal dialog open and has nothing to do with Windows.. Either pick a different window type (modeless) or live with it ;-)

snm
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 253
Joined: Fri Dec 09, 2011 11:17 am
Location: Warszawa / Poland

Re: Pet bug bounty

Post by snm » Sun May 19, 2013 8:48 am

It's not my busines, but shaosean should get two botles of whisk(e)y :)

Marek

malte
Posts: 1098
Joined: Thu Feb 23, 2006 8:34 pm
Location: Ostenfeld germany
Contact:

Re: Pet bug bounty

Post by malte » Sun May 19, 2013 9:05 am

Actually no, as far as I can see it is not. Or at least there are other Windows programs that can have modals open and can be alt tabbed back to.

Cheers,

Malte

trevordevore
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 1005
Joined: Sat Apr 08, 2006 3:06 pm
Location: Overland Park, Kansas
Contact:

Re: Pet bug bounty

Post by trevordevore » Sun May 19, 2013 1:53 pm

My original report has some more details about how other applications behave. The LiveCode behavior is not standard.

http://quality.runrev.com/show_bug.cgi?id=3865
Trevor DeVore
ScreenSteps - https://www.screensteps.com

LiveCode Repos - https://github.com/search?q=user%3Atrevordevore+topic:livecode
LiveCode Builder Repos - https://github.com/search?q=user%3Atrevordevore+topic:livecode-builder

shaosean
Posts: 906
Joined: Thu Nov 04, 2010 7:53 am

Re: Pet bug bounty

Post by shaosean » Mon May 20, 2013 4:49 am

Again, not everyone has access to the bug database so would you be so kind as to post the content of it?

shaosean
Posts: 906
Joined: Thu Nov 04, 2010 7:53 am

Re: Pet bug bounty

Post by shaosean » Mon May 20, 2013 4:52 am

A side effect of displaying a dialog box using the native win32 api is that the normal message loop processing of the application is disabled and replaced by a special dialog box message processing loop. This has various unpleasant side-effects and I think possibly the alt-tab issue is one of them. The MFC class library gets around this by "faking" a modal dialog box. It does this by explicitly calling EnableWindow(FALSE) on the parent window, effectively making it look like the dialog box is modal.

BvG
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 1236
Joined: Sat Apr 08, 2006 1:10 pm
Location: Zurich
Contact:

Re: Pet bug bounty

Post by BvG » Mon May 20, 2013 10:38 am

ShaoSean: everyone should currently have access to the bug database. Previously it was pay-to-read, but that's gone now, so you should be able to create a login, or email support if it doesn't work.
Various teststacks and stuff:
http://bjoernke.com

Chat with other RunRev developers:
chat.freenode.net:6666 #livecode

LCMark
Livecode Staff Member
Livecode Staff Member
Posts: 1209
Joined: Thu Apr 11, 2013 11:27 am

Re: Pet bug bounty

Post by LCMark » Mon May 20, 2013 11:48 am

It would be great if someone could figure out what needs to be done to make this work correctly.

The engine doesn't use the Win32 'modal loop' as this isn't compatible with the way the engine works for commands that block (such as ask / answer etc.). Also, the engine supports application and window modality - again something which Win32 doesn't support with the higher-level Modal loop it provides.

In terms of what the current problem is, I'm not entirely sure (despite having looked at it a few times). There are various aspects of Window relationships (child, parent, owner) and the enablement state whose interactions are not clearly documented (on MSDN). Also, the code for window stacking and display in the Windows engine has had so many small corrections for bug-fixes over the years it is now a bit spaghetti like.

So, moving forward on this, if someone can find some example code that is very clear that shows a modal dialog subordinate to a main window without using the Win32 Modal loop functionality and preserves alt-Tab behavior (and other behaviors that are expected!) we can compare with what the engine is doing and see how to apply an appropriate fix.

malte
Posts: 1098
Joined: Thu Feb 23, 2006 8:34 pm
Location: Ostenfeld germany
Contact:

Re: Pet bug bounty

Post by malte » Mon May 20, 2013 4:04 pm

Quick search on stackOverflow yields this:

http://stackoverflow.com/questions/1405 ... dal-dialog

and in detail this:

http://msdn.microsoft.com/en-us/library ... FilterText

The discussion on SO said if the owner argument is set when using Form.ShowDialog, it does not vanish from the task switcher anymore.

"The Form.ShowDialog method has an optional argument, owner, that can be used to specify a parent-child relationship for a form."

Now, I am not sure if that is used by the engine of course... Please excuse my dumbness there.

Locked

Return to “Engine Contributors”