Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Thu 21 Aug 2014, 12:17
All times are UTC - 4
 Forum index » Advanced Topics » Cutting edge
Gtkdialog Development
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 43 of 55 [821 Posts]   Goto page: Previous 1, 2, 3, ..., 41, 42, 43, 44, 45, ..., 53, 54, 55 Next
Author Message
peebee


Joined: 21 Sep 2008
Posts: 1388
Location: Malvern, Worcs, UK

PostPosted: Mon 19 Nov 2012, 05:44    Post subject:  

thunor wrote:
Hi rerwin
Gtkdialog can exit in two ways and one of those used to be dodgy but there was a workaround which was commonly used and it is this:
Code:
...
   <action signal="hide">exit:EXIT-WM</action>
</window>

Thunor


Hi Thunor

I am trying to test this for rerwin as I've got the right hardware setup (but not the developer skills)........

Grateful if you could confirm:

1. is the patch you've given a REPLACEMENT for the existing exit statement (<action type=\"exit\">Exit-NOW</action>) or an ADDITIONAL statement immediately before </window>?

2. is the case of exit: significant - the later test in the script tests $EXIT

3. the patch given gives a syntax error - I'm guessing it should be:
<action signal=\"hide\">exit:EXIT-WM</action> ??

I've tried both the replacement approach (this just makes the script exit early without functioning) and the additional line approach (doesn't seem to have any effect).....

I have determined that the exit button is not the one described above by rerwin but the earlier one in the same main-dialog script.

Cheers
peebee

_________________
LxPup-14.03 = Puppy + LXDE
Back to top
View user's profile Send private message 
thunor


Joined: 14 Oct 2010
Posts: 350
Location: Minas Tirith, in the Pelennor Fields fighting the Easterlings

PostPosted: Mon 19 Nov 2012, 08:22    Post subject:  

Hi peebee

1. Additional
2. No
3. Yes

Open Frisbee in Geany. At line 607 is this:
Code:
echo "$$ $0 Executing gtldialog3 MAIN_DIALOG" >> /tmp/udevtrace-modem.log  #DEBUG
RETVALS=`gtkdialog3 --program=MAIN_DIALOG --center`
echo "$$ $0 Resumed after gtldialog3 MAIN_DIALOG" >> /tmp/udevtrace-modem.log  #DEBUG

Apparently `gtkdialog3 --program=MAIN_DIALOG --center` is not exiting i.e. you have to press CTRL+C to get the process to exit, so let's see if we can force it to exit.

There are </window> end tags at lines 260, 331 and 604 -- change them all to:
Code:
   <action signal=\"hide\">exit:FORCED-EXIT</action>
</window>

Run it in the terminal like you have been doing. Does it now exit properly or do you still have to press CTRL+C to get it to return to the script?

Regards,
Thunor
Back to top
View user's profile Send private message Visit poster's website 
peebee


Joined: 21 Sep 2008
Posts: 1388
Location: Malvern, Worcs, UK

PostPosted: Mon 19 Nov 2012, 08:44    Post subject:  

thunor wrote:
Code:
   <action signal=\"hide\">exit:FORCED-EXIT</action>
</window>

Run it in the terminal like you have been doing. Does it now exit properly or do you still have to press CTRL+C to get it to return to the script?

Regards,
Thunor


Hi Thunor

3 extra lines added as suggested - run in terminal - still fails to return when exit button is pressed having entered the wpa key and achieved a wifi connection.....

Thanks for your help - should we take it to PM to avoid cluttering up your thread?

Cheers
peebee

_________________
LxPup-14.03 = Puppy + LXDE
Back to top
View user's profile Send private message 
thunor


Joined: 14 Oct 2010
Posts: 350
Location: Minas Tirith, in the Pelennor Fields fighting the Easterlings

PostPosted: Mon 19 Nov 2012, 10:48    Post subject:  

No PM, here is fine.

I took the plunge and ran the script on Slacko 5.3.3 even though it looks like I'm missing everything it's expecting to find Very Happy I just wanted to test the buttons and anything else that might be going on in there.

Before we go any further can you add this line:
Code:
echo GTKDIALOG EXITED

at line 609 so that the code in that part of the file looks like this:
Code:
echo "$$ $0 Executing gtldialog3 MAIN_DIALOG" >> /tmp/udevtrace-modem.log  #DEBUG
RETVALS=`gtkdialog3 --program=MAIN_DIALOG --center`
echo GTKDIALOG EXITED
echo "$$ $0 Resumed after gtldialog3 MAIN_DIALOG" >> /tmp/udevtrace-modem.log  #DEBUG

Now, if you run Frisbee in the terminal, do you see " GTKDIALOG EXITED" after you've pressed Frisbee's exit button? What exactly are you seeing in the terminal? If you press Enter in there, what happens? Have you got a prompt? Can you run commands in there like ls?

Also, what is the full path of the Frisbee source that you are editing in Geany?

There is something wierd there, in the original unmodified Frisbee source at lines 280 and 418:
Code:
<input>for i in \$(seq 0 1 10000); do if ((i\%2==1)) ; then echo 100 ; else echo 99; fi; sleep 15; done </input>

They are part of progressbars that are being used to auto-refresh widgets and run programs except that they remain running in the background and the more you use Frisbee the more of them remain running (you can see them accumulating in htop).

You could try simply deleting the lines, try Frisbee, then put the lines back.

Regards,
Thunor
Back to top
View user's profile Send private message Visit poster's website 
peebee


Joined: 21 Sep 2008
Posts: 1388
Location: Malvern, Worcs, UK

PostPosted: Mon 19 Nov 2012, 11:46    Post subject:  

thunor wrote:
No PM, here is fine.

I took the plunge and ran the script on Slacko 5.3.3 even though it looks like I'm missing everything it's expecting to find Very Happy I just wanted to test the buttons and anything else that might be going on in there.

Before we go any further can you add this line:
Code:
echo GTKDIALOG EXITED

at line 609 so that the code in that part of the file looks like this:
Code:
echo "$$ $0 Executing gtldialog3 MAIN_DIALOG" >> /tmp/udevtrace-modem.log  #DEBUG
RETVALS=`gtkdialog3 --program=MAIN_DIALOG --center`
echo GTKDIALOG EXITED
echo "$$ $0 Resumed after gtldialog3 MAIN_DIALOG" >> /tmp/udevtrace-modem.log  #DEBUG

Now, if you run Frisbee in the terminal, do you see " GTKDIALOG EXITED" after you've pressed Frisbee's exit button? What exactly are you seeing in the terminal? If you press Enter in there, what happens? Have you got a prompt? Can you run commands in there like ls?

Also, what is the full path of the Frisbee source that you are editing in Geany?

There is something wierd there, in the original unmodified Frisbee source at lines 280 and 418:
Code:
<input>for i in \$(seq 0 1 10000); do if ((i\%2==1)) ; then echo 100 ; else echo 99; fi; sleep 15; done </input>

They are part of progressbars that are being used to auto-refresh widgets and run programs except that they remain running in the background and the more you use Frisbee the more of them remain running (you can see them accumulating in htop).

You could try simply deleting the lines, try Frisbee, then put the lines back.

Regards,
Thunor


Hi Thunor

Tried deleting the strange lines - that stopped wifi signals being detected - tried altering the parameters instead - it worked fine with the count set down to 100 and the delay set to 5.

Those lines are in the current working V2 Frisbee BTW.

the full path is /usr/local/bin/Frisbee - as given by which Frisbee

the echo you have suggested is the same as the debug echo put in by rerwin - the echo does not appear in the /tmp file - nothing appears from your terminal echo either.

In the terminal I see nothing except a red underline cursor until I press cntrl-c when the prompt reappears....anything I type is echoed but no commands are recognised until I get the # prompt back with cntrl-c.

Thanks again
peebee

_________________
LxPup-14.03 = Puppy + LXDE
Back to top
View user's profile Send private message 
thunor


Joined: 14 Oct 2010
Posts: 350
Location: Minas Tirith, in the Pelennor Fields fighting the Easterlings

PostPosted: Mon 19 Nov 2012, 12:55    Post subject:  

peebee wrote:
Tried deleting the strange lines - that stopped wifi signals being detected - tried altering the parameters instead - it worked fine with the count set down to 100 and the delay set to 5.

Yeah, but I only wanted to know if deleting the lines stops gtkdialog3 from not exiting because these lines are processes being started by gtkdialog in another thread and they're being left running because there's no exit condition in the code.

1. Delete the lines in Geany
2. Open a terminal and type Frisbee
3. Click the "Configure Network Interfaces" tab
4. Click the Exit button
5. Type ls in the terminal and press Enter
6. Do you get a directory listing or does the cursor simply go to the next line?

peebee wrote:
Those lines are in the current working V2 Frisbee BTW.

Then everyone who uses Frisbee will accumulate processes dumping " sh: line 0: echo: write error: Broken pipe" to stdout every 15s.

peebee wrote:
the echo you have suggested is the same as the debug echo put in by rerwin - the echo does not appear in the /tmp file - nothing appears from your terminal echo either.

No it's not the same. rerwin's messages go to /tmp/udevtrace-modem.log, mine goes to stdout i.e. the same terminal window that you are running frisbee in.

peebee wrote:
In the terminal I see nothing except a red underline cursor until I press cntrl-c when the prompt reappears....anything I type is echoed but no commands are recognised until I get the # prompt back with cntrl-c.

Ok, great, so can you try the first item in this post and let me know what happens please.

Regards,
Thunor
Back to top
View user's profile Send private message Visit poster's website 
peebee


Joined: 21 Sep 2008
Posts: 1388
Location: Malvern, Worcs, UK

PostPosted: Mon 19 Nov 2012, 13:16    Post subject:  

thunor wrote:
1. Delete the lines in Geany
2. Open a terminal and type Frisbee
3. Click the "Configure Network Interfaces" tab
4. Click the Exit button
5. Type ls in the terminal and press Enter
6. Do you get a directory listing or does the cursor simply go to the next line?

Ok, great, so can you try the first item in this post and let me know what happens please.
Regards,
Thunor


6 = directory listing - pressing exit after configure network interfaces exits Frisbee and takes you back to the # prompt in the terminal.

P.

_________________
LxPup-14.03 = Puppy + LXDE
Back to top
View user's profile Send private message 
thunor


Joined: 14 Oct 2010
Posts: 350
Location: Minas Tirith, in the Pelennor Fields fighting the Easterlings

PostPosted: Mon 19 Nov 2012, 13:25    Post subject:  

peebee wrote:
6 = directory listing - pressing exit after configure network interfaces exits Frisbee and takes you back to the # prompt in the terminal.

P.

OK, now put the lines back and do the exact same test so that we can establish that it is definitely those input lines.
Back to top
View user's profile Send private message Visit poster's website 
peebee


Joined: 21 Sep 2008
Posts: 1388
Location: Malvern, Worcs, UK

PostPosted: Mon 19 Nov 2012, 13:31    Post subject:  

thunor wrote:
peebee wrote:
6 = directory listing - pressing exit after configure network interfaces exits Frisbee and takes you back to the # prompt in the terminal.

P.

Great Very Happy Ok, so then the developers of Frisbee need to look into those progressbar input lines and make sure that they have an exit condition and are not simply left to run for 10000/2 * 15 seconds.

The simplest thing would be to use gtkdialog4 with a timer widget with an interval of 15s, and the timer dies with the application.

I guess rerwin is monitoring this thread.

Cheers,
Thunor


Hi Thunor

Hope we've not got a comms problem....

The exit button that works is on the configure network interfaces screen - the exit button on the main-dialog screen still hangs.

I actually ran Frisbee a second time after doing the above test - a list of wifi signals was displayed and I configured my wpa as usual but when I clicked exit the terminal hung.

Sorry if I didn't explain this properly....

Cheers
peebee

_________________
LxPup-14.03 = Puppy + LXDE
Back to top
View user's profile Send private message 
thunor


Joined: 14 Oct 2010
Posts: 350
Location: Minas Tirith, in the Pelennor Fields fighting the Easterlings

PostPosted: Mon 19 Nov 2012, 13:36    Post subject:  

peebee wrote:
...the exit button on the main-dialog screen still hangs.

I don't know what you mean by this.

I downloaded the Frisbee.gz package posted by rerwin and that is Frisbee, one file, with "Frisbee" in the window title bar and two tabs, "Configure Wireless Networks" and "Configure Network Interfaces".

Can you give me a screenshot of the "main-dialog" please.
Back to top
View user's profile Send private message Visit poster's website 
peebee


Joined: 21 Sep 2008
Posts: 1388
Location: Malvern, Worcs, UK

PostPosted: Mon 19 Nov 2012, 13:59    Post subject:  

main1.png = main window on 1st run of Frisbee with the 2 input lines removed - blank - no wifi signals displayed

subsid.png = window after clicking configure network interfaces - with exit button that exits correctly

main2.png = main window on 2nd run of Frisbee - its exit button hangs if the wifi connection is established
main1.png
 Description   
 Filesize   99.25 KB
 Viewed   400 Time(s)

main1.png

subsid.png
 Description   
 Filesize   97.97 KB
 Viewed   403 Time(s)

subsid.png

main2.png
 Description   
 Filesize   131.03 KB
 Viewed   412 Time(s)

main2.png


_________________
LxPup-14.03 = Puppy + LXDE
Back to top
View user's profile Send private message 
thunor


Joined: 14 Oct 2010
Posts: 350
Location: Minas Tirith, in the Pelennor Fields fighting the Easterlings

PostPosted: Mon 19 Nov 2012, 15:05    Post subject:  

I'm going out now.

Thanks for your efforts.

So we've established that Frisbee/gtkdialog3 is not exiting from the exit button on the first tabbed page and that the Frisbee developer needs to quit those progressbar inputs.

That's it. To be honest it's bizarre and I don't really want to spend another day communicating my debugging methodology through a forum. You need somebody with programming skills that can quickly narrow down and isolate the cause on your computer in your house.

What else can I say. Try replacing gtkdialog3 within the code with gtkdialog4 or just gtkdialog. The exit button on the first tabbed page is at line 414: try placing <action>echo EXITING</action> above it and look for it in the terminal. Try placing <action signal=\"hide\">echo HIDING</action> above the </window> tag at line 604. Those progressbar inputs should have an exit condition.

Cheers.
Back to top
View user's profile Send private message Visit poster's website 
zigbert


Joined: 29 Mar 2006
Posts: 5675
Location: Valåmoen, Norway

PostPosted: Mon 19 Nov 2012, 16:38    Post subject:  

Thunor
A quest about r473 - export="false"
This is of course a very handy option. I see clearly how I can include it into pMusic which handles large amount of data in some widgets...
... But, does this has an effect only if <variable> is defined, or does gtkdialog export the content even if no variable is set?


Thank you
Sigmund

_________________
Stardust resources
Back to top
View user's profile Send private message Visit poster's website 
thunor


Joined: 14 Oct 2010
Posts: 350
Location: Minas Tirith, in the Pelennor Fields fighting the Easterlings

PostPosted: Mon 19 Nov 2012, 18:11    Post subject:  

zigbert wrote:
Thunor
A quest about r473 - export="false"
This is of course a very handy option. I see clearly how I can include it into pMusic which handles large amount of data in some widgets...
... But, does this has an effect only if <variable> is defined, or does gtkdialog export the content even if no variable is set?


Thank you
Sigmund

It only has an effect if <variable> is defined. gtkdialog does not export the contents of a widget if you haven't given it a name.

There's a gtkdialog function called variables_export_all() which puts the contents of all widgets into the environment if you have given them a name. This function is called when you run a shell command i.e. in an <action> directive, when you refresh a widget and when you launch a new dialog so I think you can imagine how desirable it would be to stop putting unneccessary data into the environment.

Cheers,
Thunor
Back to top
View user's profile Send private message Visit poster's website 
thunor


Joined: 14 Oct 2010
Posts: 350
Location: Minas Tirith, in the Pelennor Fields fighting the Easterlings

PostPosted: Mon 19 Nov 2012, 18:27    Post subject:  

peebee: I had a think when I was out and I can recommend this to you:

From a terminal, run Frisbee and then press the exit button on the first tabbed page. Does gtkdialog exit or hang? I can't see why it would not exit at this stage because it's a similar exit button to the other one on the second tabbed page.

Let's say it exits cleanly. You know the route that you take through Frisbee to duplicate this problem, so do the next thing whatever that is (ckick a button, select something?) and then click the same exit button. Did it exit cleanly? It did, so do two things and then click the exit button. At some point you are going to find the exact place where the exit button becomes problematic and then we have something to work with. It's important that you only do one more additional thing each time.

Let me know what you find. I can't do anything at the moment except give you advice on how to effectively problem solve.

Regards,
Thunor
Back to top
View user's profile Send private message Visit poster's website 
Display posts from previous:   Sort by:   
Page 43 of 55 [821 Posts]   Goto page: Previous 1, 2, 3, ..., 41, 42, 43, 44, 45, ..., 53, 54, 55 Next
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Advanced Topics » Cutting edge
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 can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.1276s ][ Queries: 13 (0.0169s) ][ GZIP on ]