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 23 Oct 2014, 12:01
All times are UTC - 4
 Forum index » Off-Topic Area » Programming
GtkDialog1-1.3
Post new topic   Reply to topic View previous topic :: View next topic
Page 14 of 14 [207 Posts]   Goto page: Previous 1, 2, 3, ..., 12, 13, 14
Author Message
amigo

Joined: 02 Apr 2007
Posts: 2260

PostPosted: Fri 12 Jul 2013, 13:47    Post subject:  

I don't understand how phones got int here.

@GN -Using 'guish' would definitely show that you have the appropriate sense of humor for an open-source developer...
I'm kinda with techonosaurus in that one would expect guish to *be* a shell instead of a shell-driven utility -although the dialog equivalent for tcl is called 'wish'.

I was just DuckDuckGo-ing for guish and found this on first page:
http://sourceforge.net/projects/guish/
so, someone has beat you to it anyway.

I'm afraid I can't think of anything useful to suggest, right now, but be assured that I'll be thinking about it... 'dialogtk', 'gtk4shell'

Xdialog deservedly used the *dialog* part since the syntax used is compatible with (c)dialog. And, there used to be a tool called gtkdialog -long before the tool recognized here as 'gtkdialog' The original gtkdialog was more like gmessage. For reference, here's a link to the 'orginal' gtkdialog:
http://distro.ibiblio.org/amigolinux/download/DeskTop/MsgDialog/gtkdialog-1.04/gtkdialog-1.04.tar.bz2 Get that while it is still hot, because it is no longer available anywhere else.
Back to top
View user's profile Send private message 
jpeps

Joined: 31 May 2008
Posts: 3220

PostPosted: Fri 12 Jul 2013, 15:00    Post subject:  

amigo wrote:
I don't understand how phones got int here.


..expected standard for current user interface on efficient hardware (a desktop/laptop generally has more resources), which are far more advanced than even our current gtkdialog much less old versions. Why not just use dsl?
I recall RS removing gtkdialog altogether, since like you, he felt it added too much "bloat". Developers tend to like features like file filters, etc., and will most likely find some other language to write with if it isn't there.
Back to top
View user's profile Send private message 
goingnuts

Joined: 07 Dec 2008
Posts: 781

PostPosted: Fri 12 Jul 2013, 15:34    Post subject:  

technosaurus: I get the point - the xml part opens up new possibilities.
01micko:Not bad at all Smile reminds me of an explanation of the use of strip in the old pupngo thread...
amigo:Thanks for the research. Might be that the names with build in meaning might turn up already used.

So guish is out - but we got some nice quoting possibilities.

Its more difficult than I thought...in many ways...
Back to top
View user's profile Send private message Visit poster's website 
Iguleder


Joined: 11 Aug 2009
Posts: 1923
Location: Israel, somewhere in the beautiful desert

PostPosted: Mon 14 Apr 2014, 10:18    Post subject:  

Trying to get GtkDialog 1.3 to work under x86_64.

So far, I got it to work with GTK2, but with a static build with musl, tinyxlib, glib1 and GTK1 it enters a deadlock in malloc(), when called by gtk_new_window(). Both Valgrind and GDB fail to reveal why this happens, so I'm still investigating the code.

_________________
My homepage
Back to top
View user's profile Send private message Visit poster's website MSN Messenger 
ICQ Number 
amigo

Joined: 02 Apr 2007
Posts: 2260

PostPosted: Mon 14 Apr 2014, 10:52    Post subject:  

Thanks for reporting. Hope you find the problem so we can include the fix in a new release.
Back to top
View user's profile Send private message 
Iguleder


Joined: 11 Aug 2009
Posts: 1923
Location: Israel, somewhere in the beautiful desert

PostPosted: Mon 14 Apr 2014, 11:08    Post subject:  

Here's the Valgrind log Razz
valgrind.log.gz
Description 
gz

 Download 
Filename  valgrind.log.gz 
Filesize  14 KB 
Downloaded  41 Time(s) 

_________________
My homepage
Back to top
View user's profile Send private message Visit poster's website MSN Messenger 
ICQ Number 
technosaurus


Joined: 18 May 2008
Posts: 4353

PostPosted: Mon 14 Apr 2014, 11:20    Post subject:  

IIRC Rich (musl dev) mentiioned something about sbrk syscall used to implement malloc and his malloc implementation having issues with custom mallocs .... My guess is gtk1 either implements its own by default or there is an issue recognizing musl's version due to differences in how musl organizes header files (not incorrect, but different than glibc)

You could probably modify gtk1's ifdef to always. Use the system's *alloc functions.

_________________
Web Programming - Pet Packaging 100 & 101
Back to top
View user's profile Send private message 
Iguleder


Joined: 11 Aug 2009
Posts: 1923
Location: Israel, somewhere in the beautiful desert

PostPosted: Mon 14 Apr 2014, 14:28    Post subject:  

Nope - neither gtk or glib implement malloc() or brk().

EDIT: here's the patch required for GTK2 on x86_64. Still debugging GTK1.

EDIT 2: some good progress! When I build against GTK1, glib1 and glibc on Debian Sid, I face some issue with malloc() - I guess both glibc and musl are affected by the same bug, despite of the fact musl doesn't crash:
Code:
gtkdialog1: malloc.c:2368: sysmalloc: Assertion `(old_top == (((mbinptr) (((char *) &((av)->bins[((1) - 1) * 2])) - __builtin_offsetof (struct malloc_chunk, fd)))) && old_size == 0) || ((unsigned long) (old_size) >= (unsigned long)((((__builtin_offsetof (struct malloc_chunk, fd_nextsize))+((2 * (sizeof(size_t))) - 1)) & ~((2 * (sizeof(size_t))) - 1))) && ((old_top)->size & 0x1) && ((unsigned long)old_end & pagemask) == 0)' failed.


Code:
#0  0x00007ffff5f6a3a9 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
#1  0x00007ffff5f6d4c8 in __GI_abort () at abort.c:89
#2  0x00007ffff5facd0d in __malloc_assert (
    assertion=assertion@entry=0x7ffff609bc40 "(old_top == (((mbinptr) (((char *) &((av)->bins[((1) - 1) * 2])) - __builtin_offsetof (struct malloc_chunk, fd)))) && old_size == 0) || ((unsigned long) (old_size) >= (unsigned long)((((__builtin_offs"..., file=file@entry=0x7ffff60976d1 "malloc.c",
    line=line@entry=2368, function=function@entry=0x7ffff6097a58 <__func__.11276> "sysmalloc") at malloc.c:290
#3  0x00007ffff5faf889 in sysmalloc (av=0x7ffff62d8620 <main_arena>, nb=32) at malloc.c:2365
#4  _int_malloc (av=0x7ffff62d8620 <main_arena>, bytes=10) at malloc.c:3743
#5  0x00007ffff5fb0c80 in __GI___libc_malloc (bytes=10) at malloc.c:2858
#6  0x00007ffff73a1e77 in g_malloc (size=10) at gmem.c:177
#7  0x00007ffff73acc9e in g_strdup (str=0x7ffff7bae523 "GtkWidget") at gstrfuncs.c:87
#8  0x00007ffff7b69cf0 in gtk_type_unique (parent_type=21, type_info=0x7ffff7dd6080 <widget_info.12569>) at gtktypeutils.c:251
#9  0x00007ffff7b75ee2 in gtk_widget_get_type () at gtkwidget.c:247
#10 0x00007ffff7a7d080 in gtk_container_get_type () at gtkcontainer.c:136
#11 0x00007ffff7a44575 in gtk_bin_get_type () at gtkbin.c:71
#12 0x00007ffff7b86295 in gtk_window_get_type () at gtkwindow.c:188
#13 0x00007ffff7b86b10 in gtk_window_new (type=GTK_WINDOW_TOPLEVEL) at gtkwindow.c:390
#14 0x000000000040d803 in run_program () at automaton.c:474
#15 0x000000000040a550 in yywrap () at parser.y:399
#16 0x000000000040b6e9 in yylex () at lexer.c:2321
#17 0x0000000000409925 in yyparse () at parser.c:2043
#18 0x0000000000407bb4 in main (argc=2, argv=0x7fffffffe648) at main.c:261
gtkdialog1-x86_64.patch.gz
Description 
gz

 Download 
Filename  gtkdialog1-x86_64.patch.gz 
Filesize  634 Bytes 
Downloaded  46 Time(s) 
Back to top
View user's profile Send private message Visit poster's website MSN Messenger 
ICQ Number 
Iguleder


Joined: 11 Aug 2009
Posts: 1923
Location: Israel, somewhere in the beautiful desert

PostPosted: Tue 15 Apr 2014, 06:49    Post subject:  

There you go.

Works with GTK1 on Debian Sid. The problem was a severe heap corruption that screwed up malloc() badly, caused by uninitialized variables in compat.c. I tried to attack this bug through 5 vectors and all of them failed because I ended up debugging glib's hash table code (which is impossible to debug, all meaningful data is hashed Laughing).

When I built gtkdialog against glibc, I used MALLOC_CHECK_=1 and found out the upper heap blocks got bombed by gtkdialog, so I decided to build an unoptimized gtkdialog (-O0 -g) and saw new errors, this time in compat.c (OUR code, not glib's). Long story short - many pixmap-related errors showed up, so I traced uninitialized memory issues until I found these variables.

Took two days to debug, but eventually, Puppy Linux won again. Very Happy

EDIT: doesn't work with my static musl/glib/gtk1 combo, I think one of Debian's GTK patches is required.
gtkdialog.png
 Description   
 Filesize   421 Bytes
 Viewed   147 Time(s)

gtkdialog.png

GtkDialog1-1.3-gtk1-x86_64.patch.gz
Description 
gz

 Download 
Filename  GtkDialog1-1.3-gtk1-x86_64.patch.gz 
Filesize  2.17 KB 
Downloaded  46 Time(s) 

_________________
My homepage
Back to top
View user's profile Send private message Visit poster's website MSN Messenger 
ICQ Number 
goingnuts

Joined: 07 Dec 2008
Posts: 781

PostPosted: Tue 15 Apr 2014, 07:27    Post subject:  

Congratulations! And thank you for all your effort! We include your patch in future release.
Back to top
View user's profile Send private message Visit poster's website 
Iguleder


Joined: 11 Aug 2009
Posts: 1923
Location: Israel, somewhere in the beautiful desert

PostPosted: Tue 15 Apr 2014, 07:48    Post subject:  

I don't know why, the patch was rejected when I built the static GTK1 gtkdialog, so the result binary did not include the fix.

Here's a re-generated patch that works.
gtkdialog1-x86_64.patch.gz
Description 
gz

 Download 
Filename  gtkdialog1-x86_64.patch.gz 
Filesize  2.18 KB 
Downloaded  41 Time(s) 

_________________
My homepage
Back to top
View user's profile Send private message Visit poster's website MSN Messenger 
ICQ Number 
goingnuts

Joined: 07 Dec 2008
Posts: 781

PostPosted: Tue 15 Apr 2014, 08:04    Post subject:  

Checked 32 bit gtk1 version runs OK. And below is the 64 bit gtk1 version compiled and running gtsclient in fatdog610.
Code:
# file gtkdialog1
gtkdialog1: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.16, not stripped
# uname -a
Linux fatdog64-9477 3.4.18 #1 SMP Thu Nov 8 21:11:23 EST 2012 x86_64 GNU/Linux
#
gtkdialog1_64bit.png
 Description   
 Filesize   76.28 KB
 Viewed   116 Time(s)

gtkdialog1_64bit.png

Back to top
View user's profile Send private message Visit poster's website 
Display posts from previous:   Sort by:   
Page 14 of 14 [207 Posts]   Goto page: Previous 1, 2, 3, ..., 12, 13, 14
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.0857s ][ Queries: 13 (0.0094s) ][ GZIP on ]