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 Tue 23 Sep 2014, 18:29
All times are UTC - 4
 Forum index » Off-Topic Area » Programming
[SOLVED] Snap2 under different versions of gtkdialog
Post new topic   Reply to topic View previous topic :: View next topic
Page 2 of 2 [23 Posts]   Goto page: Previous 1, 2
Author Message
thunor


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

PostPosted: Wed 12 Dec 2012, 10:48    Post subject:  

peebee wrote:
...
Made the changes you suggested - did not change behaviour on Upup Precise 54x4......still warning and not possible to select tab#1
...

I've been studying the snap2 code and this is how I think it works:

There's a big while loop at line 249 which looks as though it envelopes the entire application and this is used to restart it. When the main dialog exits, its output is evaluated and if you haven't supplied some necessary information then you'll get a warning in a message box, a variable called maintab will be set to something and then it goes back to the top of the while loop and runs again which will present the tab associated with the widget that you must enter data into.

You should see the main dialog first (line 659), then the message box (line 1288) and then the main dialog restarts showing the BACKUP STORAGE tab. Well, that's under normal operation if the conditions are met at line 1286 -- $dst = "none" or $dst = "". So, you're seeing the message box first, then the main dialog showing the BACKUP STORAGE tab (#2), then you click the DIRECTORIES TO BACK UP tab (#1) which causes the same message box to reappear (is the main dialog still open now or not?).

I'm going to guess that the execution of the main dialog at line 659 initially falied, but you can't tell because all of the output is being captured in a variable, evaluated and then discarded and because it didn't run, there's no valid output to evaluate so $dst = "none" or $dst = "" causes the messsage box to appear. Then we go back to the top of the while loop and do it again but this time the main dialog does appear and then I don't know after that. There's a possibility that something on the DIRECTORIES TO BACK UP tab (#1) is causing it to crash but this isn't activated when the application restarts showing the BACKUP STORAGE tab (#2) which is why you can see it. Sherlock Holmes: eat my deerstalker Razz

I recommend that above the code that invokes the main dialog (line 659) you should simply try $GTKDIALOG --program=MAIN_DIALOG; exit and then dump the output here. You'll want to put this underneath the debugging message #echo "$MAIN_DIALOG" which is at line 655.

Regards,
Thunor

Last edited by thunor on Wed 12 Dec 2012, 11:22; edited 2 times in total
Back to top
View user's profile Send private message Visit poster's website 
peebee


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

PostPosted: Wed 12 Dec 2012, 11:15    Post subject:  

Hi Thunor & Pemasu

I'll try the above shortly and report the results...

In the meantime I've tried a regression of gtkdialog in Upup Precise 54x4 to an earlier version.

In doing so I have noticed that Upup Precise has a different code structure to BK's Precise 5.4.2...

Precise 5.4.2 has "real" gtkdialog3 and gtkdialog4 with gtkdialog being a symlink to gtkdialog4

Upup Precise 54x4 has a "real" gtkdialog with gtkdialog3 and gtkdialg4 being symlinked to it.

My test consisted of replacing all of gtkdialog, -3 and -4 with the Precise 5..4.2 components.

With this change - Snap2 works as expected.

Back soon.
Cheers
peebee

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


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

PostPosted: Wed 12 Dec 2012, 11:32    Post subject:  

Back with testing results.....on Upup Precise 54x4

Inserting the line suggested by Thunor into snap2 and then running in a terminal gives:
Code:
# snap2
/usr/bin/snap2: line 1511: 17541 Segmentation fault      $GTKDIALOG --program=MAIN_DIALOG
#

This is with the edited version of snap2 with Thunor's previously advised changes.

Line 1511 is the final line in the file - "done"

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: Wed 12 Dec 2012, 11:58    Post subject:  

Great, well, good and bad at the same time Smile

Same again please, but use this line instead:
Code:
$GTKDIALOG -v; echo "$MAIN_DIALOG" > /tmp/snap2_MAIN_DIALOG; $GTKDIALOG --program=MAIN_DIALOG; exit

Show the output of that line, gzip /tmp/snap2_MAIN_DIALOG and attach it.

Thank you.
Back to top
View user's profile Send private message Visit poster's website 
peebee


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

PostPosted: Wed 12 Dec 2012, 12:31    Post subject:  

thunor wrote:
Show the output of that line, gzip /tmp/snap2_MAIN_DIALOG and attach it.

Code:
# snap2
gtkdialog version 0.8.3 r473M (C) 2003-2007 Laszlo Pere, 2011-2012 Thunor
Built with additional support for: Glade.
/usr/bin/snap2: line 1511: 17738 Segmentation fault      $GTKDIALOG --program=MAIN_DIALOG
#
snap2_MAIN_DIALOG.gz
Description 
gz

 Download 
Filename  snap2_MAIN_DIALOG.gz 
Filesize  3.35 KB 
Downloaded  267 Time(s) 

_________________
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: Wed 12 Dec 2012, 13:54    Post subject:  

Thanks peebee.

I tried gtkdialog -f ./snap2_MAIN_DIALOG in Upup Precise 54x4 with gtkdialog version 0.8.3 r493 and it loaded ok for me.

Leave it with me for a while. It would be useful if you could checkout, compile and install the latest gtkdialog from SVN (I explained how to do it earlier). Locate the current gtkdialog binary (/usr/sbin/gtkdialog?) and copy the newly compiled one onto it, then run snap2 again and see if it works. I don't need any more output now.

If it's ok, I'll make you a special version of gtkdialog which you can try later on.

We're getting there Smile

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


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

PostPosted: Wed 12 Dec 2012, 15:16    Post subject:  

thunor wrote:
It would be useful if you could checkout, compile and install the latest gtkdialog from SVN (I explained how to do it earlier). Locate the current gtkdialog binary (/usr/sbin/gtkdialog?) and copy the newly compiled one onto it, then run snap2 again and see if it works.


Hi Thunor

Bullet bitten.....
devx downloaded....
Runes completed to checkout and compile latest gtkdialog....
Replaced / upgraded gtkdialog in Upup Precise 54x4

Installed and ran Snap2 - and IT WORKS as expected!!

Thanks for all your help....
I'll report in the Snap2 thread the results....and point lstandish to the improvements you have suggested along the way.

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: Wed 12 Dec 2012, 19:34    Post subject:  

peebee wrote:
...
Installed and ran Snap2 - and IT WORKS as expected!!

Thanks for all your help....
I'll report in the Snap2 thread the results....and point lstandish to the improvements you have suggested along the way.
...

Cheers for your help and it's good that it works.

Via the magic of SVN revision logs I've got a good idea what that was:

November 16th r472 I connected-up the realize signal since it was half way there anyway but I experienced an instability later on because something was NULL that I wasn't expecting so I fixed it on November 30th r483, therefore I would recommend that if somebody has a version of gtkdialog that is r472 to r482 inclusive then they might want to consider upgrading to the latest version.

I'm all done with adding features to gtkdialog for the moment and am only hanging around making sure any potential problems are resolved, so what's in SVN now (r493) is pretty much what the next source package release is going to be.

You might want to explain to lstandish that I recommend adding the " | grep =" to the end of the seven lines of code where gtkdialog is executed so that he is only evaluating the printed variables. He could also either fix the warnings or discard them by following gtkdialog with " 2> /dev/null" or not worry about it since " | grep =" will filter them out anyway.

Good stuff Smile

Kindest regards,
Thunor
Back to top
View user's profile Send private message Visit poster's website 
Display posts from previous:   Sort by:   
Page 2 of 2 [23 Posts]   Goto page: Previous 1, 2
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Off-Topic Area » Programming
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.0704s ][ Queries: 13 (0.0041s) ][ GZIP on ]