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 Mon 16 Oct 2017, 20:25
All times are UTC - 4
 Forum index » Off-Topic Area » Programming
Chimera-1.70p1 - old browser reborn...
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 2 [20 Posts]   Goto page: 1, 2 Next
Author Message
goingnuts

Joined: 07 Dec 2008
Posts: 891

PostPosted: Wed 07 Jun 2017, 14:34    Post subject:  Chimera-1.70p1 - old browser reborn...  

In my search for tiny graphical browsers I have found chimera and spend some time getting it to compile and tried to fix various things. It compiles to approx. 620K static linked and do a decent job with todays web-pages. BUT it is not a stable program - you might experience segment fault. I have tried to track and fix errors but with limited success.
Attached archive with build script and my patches - contributions to further stabilize this old software are welcome!

My patches fix some javascript being showed, add possibility for showing png-images (unstable!) and various other fixes - view content of the diff-files in the archive for details.

Different sources for chimera can be found - latest seems to be at amigos repo: http://distro.ibiblio.org/amigolinux/download/XApps/chimera-1.72.01/chimera-1.72.01.tar.bz2
This contains some siag-oriented patches so I have tried to find last official source. This seems to be chimera_1.70p1 of which I got a copy from:
ftp://koyanet.lv/debian-archive/debian/dists/potato/non-free/source/web/chimera_1.70p1.orig.tar.gz - dated 18 june 1999.

If you just want to try it - I have attached a pet of it.
Updated 20170620: New build pet and build script with further patches and fixes.
Source and binary for png2jpg.
Updated 20170704: New build pet and build script with further patches and fixes - most important update is use of stb_image for build in image handling of bmp, jpg, png a.o.
chimera-1.70p1.orig-i486.pet
Description  pet package...
pet

 Download 
Filename  chimera-1.70p1.orig-i486.pet 
Filesize  139.79 KB 
Downloaded  26 Time(s) 
chimera-1.70p1_reborn.tar.gz
Description  build script and patches
gz

 Download 
Filename  chimera-1.70p1_reborn.tar.gz 
Filesize  70.22 KB 
Downloaded  18 Time(s) 
png2jpg-1.1.tar.gz
Description  png2jpg source and binary
gz

 Download 
Filename  png2jpg-1.1.tar.gz 
Filesize  10.09 KB 
Downloaded  18 Time(s) 
snap0000.jpg
 Description   
 Filesize   66.92 KB
 Viewed   534 Time(s)

snap0000.jpg


Last edited by goingnuts on Tue 04 Jul 2017, 11:12; edited 3 times in total
Back to top
View user's profile Send private message Visit poster's website 
Keef


Joined: 20 Dec 2007
Posts: 864
Location: Staffordshire

PostPosted: Fri 09 Jun 2017, 15:23    Post subject:  

Tried it on the latest Slacko and also FatDog. It seems quite slow to load pages, and yes, it is a bit prone to crashing. It cannot find the homepage, but the pet puts it in
"/usr/X11R7/lib/X11/chimera/home.html".
Don't know if you know of this site:
http://browsers.evolt.org/
(couldn't make a clickable link without the post disappearing!)
Got lots of old and obscure browsers, including Chimera. The source looks the same as yours though.They have the source for 1.70p0 and also 2.0 alpha. The site looks dormant now.
Back to top
View user's profile Send private message 
goingnuts

Joined: 07 Dec 2008
Posts: 891

PostPosted: Sat 10 Jun 2017, 02:59    Post subject:  

Hi Keef
Thank you for testing and reporting your findings! Yes - it seems slow and unfortunately crashes a great deal. I will look into the not finding homepage - probably setting it in /etc/X11/app-defaults/Chimera can fix it - or fix HOME_URL ref at compile time.
Did not know about http://browsers.evolt.org/ - will look at that.
I tried to work with chimera-2 but it has an unforgivable bug not showing http://www.murga-linux.com/puppy/index.php correctly after loading and scrolling - although it has attractive build in image handling.

My hope is that bugs in chimera-1.70p1 can be fixed and that speed can be improved. Compared to dillo and links2 the speed is horrible - but the size is 1/2 to 1/4 when static linked...fits well to a single floppy distro.

I have tried to debug using gdb and valgrind but most of the output from these programs I do not understand.
Back to top
View user's profile Send private message Visit poster's website 
slavvo67

Joined: 12 Oct 2012
Posts: 1424
Location: The other Mr. 305

PostPosted: Sat 10 Jun 2017, 13:40    Post subject:  

Any known security issues with using? I want to test her out but I'm a little reluctant because of potential security holes normally found with older browsers.
Back to top
View user's profile Send private message 
goingnuts

Joined: 07 Dec 2008
Posts: 891

PostPosted: Sat 10 Jun 2017, 13:50    Post subject:  

I have no idea - expect holes as code is before security was major concern. And how do we test if holes exist?
Back to top
View user's profile Send private message Visit poster's website 
amigo

Joined: 02 Apr 2007
Posts: 2592

PostPosted: Sat 10 Jun 2017, 14:33    Post subject:  

GN, you are such a brave fellow! I think I was probably the last guy to get that to compile before you -and probably nobody else had the idea.

I wish you had done some work on the old /CGTK1 dillo browser. I have a pretty patched up version with tabs, drag-n-drop and a few other things, and a separate version which can be compiled using either gtk or gtk2. Unfortunately, the tabs patch touches major parts of the code and never could finish integrating the gtk2 changes into the other version. Gladly send you tarballs if you want them. Old dillo with all the above, plus optional javascript support would be great.
Back to top
View user's profile Send private message 
goingnuts

Joined: 07 Dec 2008
Posts: 891

PostPosted: Sat 10 Jun 2017, 17:06    Post subject:  

Thanks amigo - you know why I focused on chimera Smile
I wish old dillo was 50% in size as it is fast and stable but for the moment I will focus on stabilising chimera.
I even found viola (https://en.m.wikipedia.org/wiki/ViolaWWW) and got it to compile, but I never made it actually show a webpage.
Most old graphical browsers from the 90.th. needs Motif but viola has a Xlib only version. Too big though, so did not spend a lot of time with it.
Wish I had better programming and debugging skills but probably too late to catch up on that...
Back to top
View user's profile Send private message Visit poster's website 
goingnuts

Joined: 07 Dec 2008
Posts: 891

PostPosted: Sun 11 Jun 2017, 10:26    Post subject:  

Small steps forward using valgrind - below output from valgrind obtained by starting chimera and then quit:

Code:

# valgrind --leak-check=full src/./chimera
==8029== Memcheck, a memory error detector
==8029== Copyright (C) 2002-2012, and GNU GPL'd, by Julian Seward et al.
==8029== Using Valgrind-3.8.1 and LibVEX; rerun with -h for copyright info
==8029== Command: src/./chimera
...
==8029== Invalid write of size 1
==8029==    at 0x8052941: ReadIndexFilenames (local.c:86)
...
==8029== Invalid read of size 1
==8029==    at 0x8052946: ReadIndexFilenames (local.c:86)

patch to get rid of this:
Code:

--- ./src/local.c.01   2017-06-11 10:50:48.000000000 +0000
+++ ./src/local.c   2017-06-11 10:51:12.000000000 +0000
@@ -81,7 +81,7 @@
     *ilist = (char *)NULL;
     return;
   }
-  filenames = (char *)alloc_mem(sl * sizeof(char));
+  filenames = (char *)alloc_mem(sl * sizeof(char)+1);
   colons = 2;         /* count final delimiters */
   for (cp=filelist,cp2=filenames; (*cp2 = *cp) != '\0'; cp++,cp2++)
   {

After recompile rerun valgrind:
Code:

# valgrind --leak-check=full src/./chimera
==8029== Memcheck, a memory error detector
==8029== Copyright (C) 2002-2012, and GNU GPL'd, by Julian Seward et al.
==8029== Using Valgrind-3.8.1 and LibVEX; rerun with -h for copyright info
==8029== Command: src/./chimera
==8029==
==8029== Conditional jump or move depends on uninitialised value(s)
==8029==    at 0x8060030: ViewRedisplay (HTML.c:1815)

Rerun valgrind with:
Code:

# valgrind --track-origins=yes src/./chimera
==13396== Memcheck, a memory error detector
==13396== Copyright (C) 2002-2012, and GNU GPL'd, by Julian Seward et al.
==13396== Using Valgrind-3.8.1 and LibVEX; rerun with -h for copyright info
==13396== Command: src/./chimera
==13396==
==13396== Conditional jump or move depends on uninitialised value(s)
==13396==    at 0x8060030: ViewRedisplay (HTML.c:1815)
...
==13396==    by 0x80537B3: main (main.c:297)
==13396==  Uninitialised value was created by a stack allocation
==13396==    at 0x806014E: ViewClearAndRefresh (HTML.c:1870)

The codepart at HTML.c:1870 can be disabled by removing CFLAG "-DFAKE_EXPOSE".
So recompile without it removes this. Leaving us with this report:
Code:

# valgrind --leak-check=full src/./chimera
...
==15432== 87 bytes in 1 blocks are definitely lost in loss record 434 of 611
==15432==    at 0x401DEBC: malloc (in /usr/local/lib/valgrind/vgpreload_memcheck-x86-linux.so)
==15432==    by 0x407F192: XtMalloc (in /usr/lib/libXt.so.6.0.0)
==15432==    by 0x807DB2D: alloc_string (dmem.c:70)
==15432==    by 0x805A1DF: AddButtons (widget.c:81)
==15432==    by 0x805A5AA: CreateWidgets (widget.c:175)
==15432==    by 0x8053776: main (main.c:289)

which I havent been able to get rid of...

#########################
Now starting valgrind, open bookmarks, load google.com, dismiss bookmarks and quit:
Code:

# valgrind --leak-check=full src/./chimera
...
==16708== Conditional jump or move depends on uninitialised value(s)
==16708==    at 0x804B562: HasExpired (cache.c:64)
==16708==    by 0x804C038: WriteCache (cache.c:501)
==16708==    by 0x80551E3: HandleDoc (main.c:1086)
==16708==    by 0x80557D0: OpenDocument (main.c:1286)
==16708==    by 0x8056AAD: BookmarkCallback (main.c:2281)
==16708==    by 0x407F75B: XtCallCallbackList (in /usr/lib/libXt.so.6.0.0)
==16708==    by 0x805D8AB: BMarkSelect (Bookmark.c:657)
==16708==    by 0x40B440E: HandleActions (in /usr/lib/libXt.so.6.0.0)
==16708==    by 0x40B4AFC: _XtTranslateEvent (in /usr/lib/libXt.so.6.0.0)
==16708==    by 0x408CBC9: XtDispatchEventToWidget (in /usr/lib/libXt.so.6.0.0)
==16708==    by 0x408D44A: _XtDefaultDispatcher (in /usr/lib/libXt.so.6.0.0)
==16708==    by 0x408C2EC: XtDispatchEvent (in /usr/lib/libXt.so.6.0.0)
==16708==
==16708== Conditional jump or move depends on uninitialised value(s)
==16708==    at 0x804B56A: HasExpired (cache.c:64)
...
==16708==    by 0x408C2EC: XtDispatchEvent (in /usr/lib/libXt.so.6.0.0)

Rerun to get origins:
Code:

# valgrind --track-origins=yes src/./chimera
...
==17369== Conditional jump or move depends on uninitialised value(s)
==17369==    at 0x804B562: HasExpired (cache.c:64)
==17369==    by 0x804C038: WriteCache (cache.c:501)
==17369==    by 0x80551E3: HandleDoc (main.c:1086)
==17369==    by 0x80557D0: OpenDocument (main.c:1286)
==17369==    by 0x8056AAD: BookmarkCallback (main.c:2281)
==17369==    by 0x407F75B: XtCallCallbackList (in /usr/lib/libXt.so.6.0.0)
==17369==    by 0x805D8AB: BMarkSelect (Bookmark.c:657)
==17369==    by 0x40B440E: HandleActions (in /usr/lib/libXt.so.6.0.0)
==17369==    by 0x40B4AFC: _XtTranslateEvent (in /usr/lib/libXt.so.6.0.0)
==17369==    by 0x408CBC9: XtDispatchEventToWidget (in /usr/lib/libXt.so.6.0.0)
==17369==    by 0x408D44A: _XtDefaultDispatcher (in /usr/lib/libXt.so.6.0.0)
==17369==    by 0x408C2EC: XtDispatchEvent (in /usr/lib/libXt.so.6.0.0)
==17369==  Uninitialised value was created by a stack allocation
==17369==    at 0x8057D91: ParseExpiresDate (mime.c:342)
==17369==
==17369== Conditional jump or move depends on uninitialised value(s)
...
==17369==  Uninitialised value was created by a stack allocation
==17369==    at 0x8057D91: ParseExpiresDate (mime.c:342)

The code at mime.c:342 can be bypassed by removing CFLAG "-DHAVE_MKTIME" leaving us with:
Code:

# valgrind --leak-check=full src/./chimera
==19308== Memcheck, a memory error detector
==19308== Copyright (C) 2002-2012, and GNU GPL'd, by Julian Seward et al.
==19308== Using Valgrind-3.8.1 and LibVEX; rerun with -h for copyright info
==19308== Command: src/./chimera
==19308==
==19308==
==19308== HEAP SUMMARY:
==19308==     in use at exit: 226,037 bytes in 2,965 blocks
==19308==   total heap usage: 9,589 allocs, 6,624 frees, 1,457,528 bytes allocated
==19308==
==19308== 2 bytes in 2 blocks are definitely lost in loss record 12 of 698
==19308==    at 0x401DEBC: malloc (in /usr/local/lib/valgrind/vgpreload_memcheck-x86-linux.so)
==19308==    by 0x407F192: XtMalloc (in /usr/lib/libXt.so.6.0.0)
==19308==    by 0x807401B: MakeHiddenWidget (HTMLwidgets.c:1872)
==19308==    by 0x80752EB: MakeWidget (HTMLwidgets.c:2467)
==19308==    by 0x8069B57: TriggerMarkChanges (HTMLformat.c:3419)
==19308==    by 0x806ADAD: FormatChunk (HTMLformat.c:4163)
==19308==    by 0x806B17F: FormatAll (HTMLformat.c:4358)
==19308==    by 0x805F720: ReformatWindow (HTML.c:1468)
==19308==    by 0x8064674: HTMLSetText (HTML.c:5127)
==19308==    by 0x80543EB: DisplayCurrent (main.c:689)
==19308==    by 0x8055543: HandleDoc (main.c:1175)
==19308==    by 0x80557A0: OpenDocument (main.c:1286)
...

Which can be eliminated with:
Code:

--- ./mxw/Bookmark.c.01   2017-06-11 12:41:12.000000000 +0000
+++ ./mxw/Bookmark.c   2017-06-11 12:41:26.000000000 +0000
@@ -666,7 +666,7 @@
   {
     XtAppWarning(BREC.appcon, BREC.noCurrentMark);
   }
-
+  XtFree ((char *) lr);
   return;
 }
 

After this valgrind says:
Code:

 # valgrind --leak-check=full src/./chimera
...
==26353== 2 bytes in 2 blocks are definitely lost in loss record 12 of 696
==26353==    at 0x401DEBC: malloc (in /usr/local/lib/valgrind/vgpreload_memcheck-x86-linux.so)
==26353==    by 0x407F192: XtMalloc (in /usr/lib/libXt.so.6.0.0)
==26353==    by 0x8074027: MakeHiddenWidget (HTMLwidgets.c:1872)

This can be fixed with patch:
Code:

--- ./libhtmlw/HTMLwidgets.c.01   2017-06-11 16:11:17.000000000 +0000
+++ ./libhtmlw/HTMLwidgets.c   2017-06-11 16:12:16.000000000 +0000
@@ -1869,7 +1869,7 @@
   char *value;
 
   value = ParseMarkTag (text, MT_INPUT, "VALUE");
-  if (value == NULL) XtNewString("");
+  //if (value == NULL) XtNewString("");
 
   return (AddNewWidget (hw, NULL, W_HIDDEN, id, x, y,
          name, value, NULL, False));
 


###########
Loading other web pages shows loads of reports from valgrind - and who knows what my ignorant fixes introduce...
Back to top
View user's profile Send private message Visit poster's website 
slavvo67

Joined: 12 Oct 2012
Posts: 1424
Location: The other Mr. 305

PostPosted: Mon 12 Jun 2017, 00:02    Post subject:  

I use howsmyssl.com but it seems Chimera didn't work with that website or it could be the version I'm using...
Back to top
View user's profile Send private message 
BarryK
Puppy Master


Joined: 09 May 2005
Posts: 8274
Location: Perth, Western Australia

PostPosted: Tue 13 Jun 2017, 07:11    Post subject:  

Here is a paper describing how Chimera works:

https://www.researchgate.net/publication/229002377_Chimera_An_athena-based_world-wide_web_browser

_________________
http://barryk.org/news/
Back to top
View user's profile Send private message Visit poster's website 
BarryK
Puppy Master


Joined: 09 May 2005
Posts: 8274
Location: Perth, Western Australia

PostPosted: Tue 13 Jun 2017, 07:46    Post subject:  

Chimera 1.65 source, plus extra patch, available here:

http://jim.rees.org/apollo-archive/

goingnuts, I know you have a later version, but maybe the patch is useful?

_________________
http://barryk.org/news/
Back to top
View user's profile Send private message Visit poster's website 
BarryK
Puppy Master


Joined: 09 May 2005
Posts: 8274
Location: Perth, Western Australia

PostPosted: Tue 13 Jun 2017, 08:10    Post subject:  

Chimera 2.0 goes up to a19 here:

https://archive.org/download/chimera-evolt_browsers/2.0_alpha/

There is a patch to fix libpng crash for a19:

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=130902

a19 source is here, and a patches package:

https://packages.debian.org/jessie/chimera2

patches pkg:
chimera2_2.0a19-8.diff.gz

_________________
http://barryk.org/news/
Back to top
View user's profile Send private message Visit poster's website 
goingnuts

Joined: 07 Dec 2008
Posts: 891

PostPosted: Tue 13 Jun 2017, 11:26    Post subject:  

slavvo67: No https - at all.
BarryK: Thanks a lot - the png patch for 2.0a19 is very nice. Chimera2 is faster and more stable than 1.70p1 and it has build in jpeg and png support. Applied the full debian patch but had to disable the io.c and ChimeraStream.h patches to get google.com react on search submit.
None of the patches removed the missing fonts when scrolling/resizing window when on this forum though...if that could be fixed version2 would be the way to go.
Back to top
View user's profile Send private message Visit poster's website 
goingnuts

Joined: 07 Dec 2008
Posts: 891

PostPosted: Tue 20 Jun 2017, 14:42    Post subject:  

Chimera2 is indeed tempting - create smaller static linked binary, has build in png and jpg support and is more stable. BUT I haven't been able to create a static linked binary that actually works - major problems finding Xdisplay. Tracked down to version of Xlib but got no further.

So...continued with version 1.70 and managed to stabilize further. The png support now is almost stable. I have updated first post with new .pet, build script and added a png2jpeg-package. You need djpeg too - normally installed already.
https obvious not working and chimera is not very informative when web-pages fails to load...how hard is it to get https implemented???
Back to top
View user's profile Send private message Visit poster's website 
goingnuts

Joined: 07 Dec 2008
Posts: 891

PostPosted: Wed 28 Jun 2017, 15:44    Post subject:  

I have worked on "png2jpg" to reduce size and get bmp support.
Result is "img2jpg" which is based on stb_image and libjpeg.
Static linked bin is 95K and compressed with upx 50K. This compared to png2jpg based on libpng and libjpeg which was 159K and 83K upxed.
So "img2jpg" adds png and bmp support to chimera.

Chimera has build in support for gif, xbm, xpm and pbm.
png, jpg and bmp use external converters, img2jpg and djpeg.

To change from png2jpg to img2jpg revise the /usr/X11/lib/X11/chimera/convert:
Code:
#inline image/png image/gif cat %s | png2jpg | djpeg -gif
inline image/png image/gif img2jpg -i %s -s | djpeg -gif
inline image/bmp image/gif img2jpg -i %s -s | djpeg -gif


To have Chimera recognize bmp the attached patch must be applied - it will be included in a later updated build-script.

Source and static linked bin in attachment.
img2jpg-0.1.tar.gz
Description  img2jpg source and bin
gz

 Download 
Filename  img2jpg-0.1.tar.gz 
Filesize  150.81 KB 
Downloaded  19 Time(s) 
chimera-1.70p1_17_mime.diff.gz
Description  patch to add bmp recognition to Chimera
gz

 Download 
Filename  chimera-1.70p1_17_mime.diff.gz 
Filesize  328 Bytes 
Downloaded  23 Time(s) 
Back to top
View user's profile Send private message Visit poster's website 
Display posts from previous:   Sort by:   
Page 1 of 2 [20 Posts]   Goto page: 1, 2 Next
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.0728s ][ Queries: 14 (0.0079s) ][ GZIP on ]