Re: [elinks-dev] [PATCH 09/10] Add preferred_document_width option.
Ooops sorry ! Your updated patch does fix it indeed ! In the previous email, I tested the regexp search instead of the dump ! -- أحمد المحمودي (Ahmed El-Mahmoudy) Digital design engineer GPG KeyID: 0xEDDDA1B7 (@ subkeys.pgp.net) GPG Fingerprint: 8206 A196 2084 7E6D 0DF8 B176 BC19 6A94 EDDD A1B7 ___ elinks-dev mailing list elinks-dev@linuxfromscratch.org http://linuxfromscratch.org/mailman/listinfo/elinks-dev
Re: [elinks-dev] [PATCH 09/10] Add preferred_document_width option.
Hello, On Mon, Jun 08, 2009 at 11:12:28AM -0400, Yozo Hida wrote: > Fixed patch are in elinks bug database, see bug #1063. ---end quoted text--- I just tried with the latest patch in bug #1063, and I still get the same problem. -- أحمد المحمودي (Ahmed El-Mahmoudy) Digital design engineer GPG KeyID: 0xEDDDA1B7 (@ subkeys.pgp.net) GPG Fingerprint: 8206 A196 2084 7E6D 0DF8 B176 BC19 6A94 EDDD A1B7 ___ elinks-dev mailing list elinks-dev@linuxfromscratch.org http://linuxfromscratch.org/mailman/listinfo/elinks-dev
Re: [elinks-dev] [PATCH 09/10] Add preferred_document_width option.
On 06/10/2009 08:18 AM, أحمد المحمودي wrote: > Hello, > > Sorry, in yesterday's email, I didn't issue a 'bt' command in GDB, > here is the backtrace: > > Program received signal SIGSEGV, Segmentation fault. > [Switching to Thread -1225446624 (LWP 25859)] > init_document_options (ses=0x0, doo=0xbfa7832c) at > /tmp/buildd/elinks-0.13~20090601/src/document/options.c:39 > 39 /tmp/buildd/elinks-0.13~20090601/src/document/options.c: No such file > or directory. > in /tmp/buildd/elinks-0.13~20090601/src/document/options.c > (gdb) bt > #0 init_document_options (ses=0x0, doo=0xbfa7832c) at > /tmp/buildd/elinks-0.13~20090601/src/document/options.c:39 > #1 0x0813ef1d in dump_formatted (fd=1, download=0x0, cached=0x8cf5e58) > at /tmp/buildd/elinks-0.13~20090601/src/viewer/dump/dump.c:117 > [...] OK, the problem is clear now. The patch in question contains the following: > diff --git a/src/document/options.c b/src/document/options.c > index 9208d64..93d9c7b 100644 > --- a/src/document/options.c > +++ b/src/document/options.c > @@ -32,6 +32,13 @@ init_document_options(struct session *ses, struct > document_options *doo) > > doo->use_document_colors = > get_opt_int("document.colors.use_document_colors", ses); > doo->margin = get_opt_int("document.browse.margin_width", ses); > + > + doo->document_width = 0; > + if (get_opt_bool("document.browse.use_preferred_document_width", ses)) > + doo->document_width = > get_opt_int("document.browse.preferred_document_width", ses); > + if (doo->document_width <= 0 || doo->document_width > > ses->tab->term->width) > + doo->document_width = ses->tab->term->width; ses is NULL when ELinks is run with -dump. Before the patch, the renderer used document_options.box instead of document_options.document_width. Both the dump viewer and the regular viewer set document_options.box after calling init_document_options. Really, I think that the patch should be using document_options.box instead of ses->tab->term->width regardless of which viewer is used (dump or regular). So here is one possible solution: 1. Both callers to init_document_options (render_document_frames and dump_formatted) should first set document_options.box and then call init_document_options; 2. init_document_options should preserve document_options.box (it currently clears the whole structure at the beginning of the routine); and 3. the patch should be changed to use document_options.box. Alternatively to 1 and 2, callers to init_document_options could pass the values for the box as arguments so that init_document_options can set document_options.box itself. Does the above sound reasonable? -- Miciah Masters / ___ elinks-dev mailing list elinks-dev@linuxfromscratch.org http://linuxfromscratch.org/mailman/listinfo/elinks-dev
Re: [elinks-dev] [PATCH 09/10] Add preferred_document_width option.
On 2009-06-08, Thomas Adam wrote: > 2009/6/8 أحمد المحمودي : >> Hello, >> >> patch #9 causes a problem with document dumping: >> >> elinks -dump /tmp/m.htm >> ELinks-ruby: [BUG] Segmentation fault >> ruby 1.8.7 (2008-08-11 patchlevel 72) [i486-linux] >> >> Aborted > > Use GDB; get a backtrace. I've done some work on the Ruby scripting > support in ELinks in the past. > Fixed patch are in elinks bug database, see bug #1063. -Yozo ___ elinks-dev mailing list elinks-dev@linuxfromscratch.org http://linuxfromscratch.org/mailman/listinfo/elinks-dev
Re: [elinks-dev] [PATCH 09/10] Add preferred_document_width option.
Hello, Sorry, in yesterday's email, I didn't issue a 'bt' command in GDB, here is the backtrace: Program received signal SIGSEGV, Segmentation fault. [Switching to Thread -1225446624 (LWP 25859)] init_document_options (ses=0x0, doo=0xbfa7832c) at /tmp/buildd/elinks-0.13~20090601/src/document/options.c:39 39 /tmp/buildd/elinks-0.13~20090601/src/document/options.c: No such file or directory. in /tmp/buildd/elinks-0.13~20090601/src/document/options.c (gdb) bt #0 init_document_options (ses=0x0, doo=0xbfa7832c) at /tmp/buildd/elinks-0.13~20090601/src/document/options.c:39 #1 0x0813ef1d in dump_formatted (fd=1, download=0x0, cached=0x8cf5e58) at /tmp/buildd/elinks-0.13~20090601/src/viewer/dump/dump.c:117 #2 0x0813fd27 in dump_loading_callback (download=0x81c0f20, p=0x0) at /tmp/buildd/elinks-0.13~20090601/src/viewer/dump/dump.c:255 #3 0x080dc381 in notify_connection_callbacks (conn=0x8cf59d0) at /tmp/buildd/elinks-0.13~20090601/src/network/connection.c:467 #4 0x080de175 in done_connection (conn=0x8cf59d0) at /tmp/buildd/elinks-0.13~20090601/src/network/connection.c:485 #5 0x080de291 in abort_connection (conn=0x8cf59d0, state={basic = S_OK, syserr = 0}) at /tmp/buildd/elinks-0.13~20090601/src/network/connection.c:779 #6 0x080ff82b in file_protocol_handler (connection=0x8cf59d0) at /tmp/buildd/elinks-0.13~20090601/src/protocol/file/file.c:316 #7 0x080debf8 in run_connection (conn=0x8cf59d0) at /tmp/buildd/elinks-0.13~20090601/src/network/connection.c:763 #8 0x080df8c7 in check_queue () at /tmp/buildd/elinks-0.13~20090601/src/network/connection.c:833 #9 0x080d8395 in check_bottom_halves () at /tmp/buildd/elinks-0.13~20090601/src/main/select.c:118 #10 0x080d8474 in select_loop (init=0x80d72e0 ) at /tmp/buildd/elinks-0.13~20090601/src/main/select.c:223 #11 0x080d7a5a in main (argc=Cannot access memory at address 0x0 ) at /tmp/buildd/elinks-0.13~20090601/src/main/main.c:358 -- أحمد المحمودي (Ahmed El-Mahmoudy) Digital design engineer GPG KeyID: 0xEDDDA1B7 (@ subkeys.pgp.net) GPG Fingerprint: 8206 A196 2084 7E6D 0DF8 B176 BC19 6A94 EDDD A1B7 ___ elinks-dev mailing list elinks-dev@linuxfromscratch.org http://linuxfromscratch.org/mailman/listinfo/elinks-dev
[elinks-dev] Segfault when doing a regexp search
Hello, When I perform a regexp search using elinks (master branch), it segfaults giving the following: | ( ) Normal search (*** glibc detected *** elinks: double free or corruption (!prev): 0x0a23c740 *** | === Backtrace: = | /lib/tls/i686/cmov/libc.so.6[0xb7ad9604]insensitive | /lib/tls/i686/cmov/libc.so.6(cfree+0x96)[0xb7adb5b6] | an /lib/tls/i686/cmov/libc.so.6(regfree+0x3d)[0xb7b1cd1d] OK ] [ Cancel ] | elinks[0x814acc3]+ elinks[0x814cfa7] ite. elinks[0x814d4b9] elinks[0x814a8dc]This service is sponsored by MIT Computer Science & Artificial Intelligence Lab. elinks[0x8064050] elinks[0x8064d78] elinks(in_term+0x4fd)[0x8127e6d] elinks(select_loop+0x206)[0x80d8516] elinks(main+0x4a)[0x80d797a] /lib/tls/i686/cmov/libc.so.6(__libc_start_main+0xe5)[0xb7a80775] elinks[0x8062691] === Memory map: 08048000-08195000 r-xp 08:08 3229287/usr/bin/elinks 08195000-08196000 r--p 0014d000 08:08 3229287/usr/bin/elinks 08196000-081ad000 rw-p 0014e000 08:08 3229287/usr/bin/elinks 081ad000-081c2000 rw-p 081ad000 00:00 0 0989d000-0a242000 rw-p 0989d000 00:00 0 [heap] b6df1000-b6dfe000 r-xp 08:08 5505066/lib/libgcc_s.so.1 b6dfe000-b6dff000 r--p c000 08:08 5505066/lib/libgcc_s.so.1 [-i] b6dff000-b6e0 rw-p d000 08:08 5505066/lib/libgcc_s.so.1 b6e0-b6e21000 rw-p b6e0 00:00 0 b6e21000-b6f0 ---p b6e21000 00:00 0 b6f04000-b6f09000 rw-s 00:09 410998 /dev/zero (deleted) b6f09000-b6f0e000 rw-s 00:09 410997 /dev/zero (deleted) b6f0e000-b6f13000 rw-s 00:09 410996 /dev/zero (deleted) b6f13000-b6f18000 rw-s 00:09 410994 /dev/zero (deleted) b6f18000-b6f19000 rw-p b6f18000 00:00 0 b6f19000-b6f1d000 r-xp 08:08 3817589 /usr/lib/perl/5.10.0/auto/IO/IO.so b6f1d000-b6f1e000 r--p 3000 08:08 3817589 /usr/lib/perl/5.10.0/auto/IO/IO.so b6f1e000-b6f1f000 rw-p 4000 08:08 3817589 /usr/lib/perl/5.10.0/auto/IO/IO.so b6f1f000-b6f37000 r-xp 08:08 3312228 /usr/lib/perl5/auto/XML/Parser/Expat/Expat.so b6f37000-b6f38000 r--p 00017000 08:08 3312228 /usr/lib/perl5/auto/XML/Parser/Expat/Expat.so b6f38000-b6f39000 rw-p 00018000 08:08 3312228 /usr/lib/perl5/auto/XML/Parser/Expat/Expat.so b6f39000-b6f78000 r--p 08:08 3735696 /usr/lib/locale/en_US.utf8/LC_CTYPE b6f78000-b6f79000 r--p 08:08 3262408 /usr/lib/locale/en_US.utf8/LC_NUMERIC b6f79000-b6f7a000 r--p 08:08 3260430 /usr/lib/locale/en_US.utf8/LC_TIME b6f7a000-b7065000 r--p 08:08 3735716 /usr/lib/locale/en_US.utf8/LC_COLLATE b7065000-b7066000 r--p 08:08 3260971 /usr/lib/locale/en_US.utf8/LC_MONETARY b7066000-b7067000 r--p 08:08 3262414 /usr/lib/locale/en_US.utf8/LC_MESSAGES/SYS_LC_MESSAGES b7067000-b7068000 r--p 08:08 3262415 /usr/lib/locale/en_US.utf8/LC_PAPER b7068000-b7069000 r--p 08:08 3262395 /usr/lib/locale/en_US.utf8/LC_NAME b7069000-b706a000 r--p 08:08 3261283 /usr/lib/locale/en_US.utf8/LC_ADDRESS b706a000-b706b000 r--p 08:08 3261284 /usr/lib/locale/en_US.utf8/LC_TELEPHONE b706b000-b706c000 r--p 08:08 3261285 /usr/lib/locale/en_US.utf8/LC_MEASUREMENT b706c000-b7073000 r--s 08:08 3227780 /usr/lib/gconv/gconv-modules.cache b7073000-b7074000 r--p 08:08 3261286 /usr/lib/locale/en_US.utf8/LC_IDENTIFICATION b7074000-b7078000 rw-p b7074000 00:00 0 b7078000-b708e000 r-xp 08:08 3229138/usr/lib/libsasl2.so.2.0.22 b708e000-b708f000 r--p 00015000 08:08 3229138/usr/lib/libsasl2.so.2.0.22 b708f000-b709 rw-p 00016000 08:08 3229138/usr/lib/libsasl2.so.2.0.22 b709-b7094000 r-xp 08:08 5505176/lib/libattr.so.1.1.0 b7094000-b7095000 r--p 3000 08:08 5505176/lib/libattr.so.1.1.0 b7095000-b7096000 rw-p 4000 08:08 5505176/lib/libattr.so.1.1.0 b7096000-b7099000 r-xp 08:08 5505040/lib/libgpg-error.so.0.3.0 b7099000-b709a000 rw-p 2000 08:08 5505040/lib/libgpg-error.so.0.3.0 b709a000-b70a6000 r-xp 08:08 3230043/usr/lib/liblber-2.4.so.2.4.1 b70a6000-b70a7000 r--p b000 08:08 3230043/usr/lib/liblber-2.4.so.2.4.1 b70a7000-b70a8000 rw-p c000 08:08 3230043/usr/lib/liblber-2.4.so.2.4.1 b70a8000-b70e8000 r-xp 08:08 3230096/usr/lib/libldap_r-2.4.so.2.4.1 b70e8000-b70e9000 ---p 00040