Amiga.org

Amiga computer related discussion => Amiga Software Issues and Discussion => Topic started by: EyMenZ on March 08, 2016, 05:17:20 PM

Title: duktape error NetSurf OS3
Post by: EyMenZ on March 08, 2016, 05:17:20 PM
Hello,  I trying to compile netsurf for OS3. But I have this problem hat I can not solve :angry:.
i test it on cygwin 32 under Windows and on ubuntu 15.10
could someone help me? thank you :)

Code: [Select]
administrator@ubuntu:/usr/local/netsurf$ sudo make TARGET=amigaos3
M.CONFIG: JPEG (libjpeg)    enabled       (NETSURF_USE_JPEG := YES)
M.CONFIG: PDF export (haru)    disabled      (NETSURF_USE_HARU_PDF := NO)
M.CONFIG: glibc internal iconv    disabled      (NETSURF_USE_LIBICONV_PLUG := NO)
M.CONFIG: Javascript (Duktape)    enabled       (NETSURF_USE_DUKTAPE := YES)
PKG.CNFG: CSS (libcss)    enabled
PKG.CNFG: DOM (libdom)    enabled
PKG.CNFG: nsutils (libnsutils)    enabled
PKG.CNFG: utf8proc (libutf8proc)    enabled
M.CONFIG: Sprite (librosprite)    disabled      (NETSURF_USE_ROSPRITE := NO)
M.CONFIG: BMP (libnsbmp)    enabled       (NETSURF_USE_BMP := YES)
M.CONFIG: GIF (libnsgif)    enabled       (NETSURF_USE_GIF := YES)
M.CONFIG: PNG (libpng)    enabled       (NETSURF_USE_PNG := YES)
M.CONFIG: NSSVG (libsvgtiny)    enabled       (NETSURF_USE_NSSVG := YES)
M.CONFIG: JavaScript    disabled      (NETSURF_USE_MOZJS := NO)
M.CONFIG: Amiga icon    enabled       (NETSURF_USE_AMIGA_ICON := YES)
M.CONFIG: DataTypes    enabled       (NETSURF_USE_AMIGA_DATATYPES := YES)
.
.
.
   MKDIR: build-Linux-amigaos3
   MKDIR: build-Linux-amigaos3/deps
TESTMENT: build-Linux-amigaos3/testament.h
 GENBIND: javascript/duktape/netsurf.bnd
make: nsgenbind: Command not found
 COMPILE: amiga/agclass/amigaguide_class.c
amiga/agclass/amigaguide_class.c: In function `agm_open':
amiga/agclass/amigaguide_class.c:330: warning: initialization discards qualifiers from pointer target type
 COMPILE: amiga/arexx.c
.
.
.
.
 COMPILE: javascript/content.c
 COMPILE: javascript/duktape/dukky.c
javascript/duktape/dukky.c:39:29: duktape/binding.h: No such file or directory
In file included from javascript/duktape/dukky.c:42:
javascript/duktape/dukky.h:40: error: syntax error before "dom_string"
javascript/duktape/dukky.h:40: warning: function declaration isn't a prototype
.
.
.
.
javascript/duktape/dukky.c:93: warning: redundant redeclaration of 'MAGIC'
javascript/duktape/dukky.c:93: warning: previous implicit declaration of 'MAGIC' was here
javascript/duktape/dukky.c:1068: error: `HANDLER_MAP' undeclared (first use in this function)
javascript/duktape/dukky.c:1068: warning: passing arg 2 of `duk_get_global_string' makes pointer from integer without a cast
javascript/duktape/dukky.c:1080: warning: dereferencing type-punned pointer will break strict-aliasing rules
Makefile:796: recipe for target 'build-Linux-amigaos3/javascript_duktape_dukky.o' failed
make: *** [build-Linux-amigaos3/javascript_duktape_dukky.o] Error 1
Title: Re: duktape error NetSurf OS3
Post by: chris on March 08, 2016, 08:05:30 PM
Quote from: EyMenZ;805583
Hello,  I trying to compile netsurf for OS3. But I have this problem hat I can not solve :angry:.
i test it on cygwin 32 under Windows and on ubuntu 15.10
could someone help me? thank you :)

Yes.  This is your problem:

Quote
Code: [Select]
make: nsgenbind: Command not found

You need to build and install nsgenbind (if you haven't already).

I find nsgenbind ends up in /opt/netsurf/bin where the makefile can't find it, so create a link in /usr/bin:
ln -s /opt/netsurf/bin/nsgenbind /usr/bin/nsgenbind
(think that's the right way round, always have to look it up!)

However I found here that NetSurf won't startup when Javascript is enabled, it just errors out, so you might find you need to disable it anyway (by adding a line to makefile.config, see makefile.defaults)
Title: Re: duktape error NetSurf OS3
Post by: EyMenZ on March 14, 2016, 02:56:34 PM
i have also errors on nsgenbind build
Title: Re: duktape error NetSurf OS3
Post by: chris on March 14, 2016, 03:12:28 PM
Quote from: EyMenZ;805892
i have also errors on nsgenbind build


Try building it just with simply "make".  It needs to be built for the computer you are cross-compiling on, rather than the target (as it is only used for building NetSurf).
Title: Re: duktape error NetSurf OS3
Post by: DNADNL on June 10, 2016, 07:57:33 PM
Hello (Amiga) World ! :)

I'm DNADNL and i've got the same problem than EyMenZ : I can't compile NetSurf AmigaOS3 if DukTape is enabled. :(
I did everything chris said about nsgenbind (thanks chris !).

I would really like to enable DukTape, because it would be more comfortable to surf on AmigaOS3 then. :)

Could you please help me to solve this problem ? I'm an Amiga beginner, so maybe I won't understand directly what you will say, but I'm also here to learn ! ;)

Have a good day / night !
Title: Re: duktape error NetSurf OS3
Post by: utri007 on June 11, 2016, 12:17:27 AM
Sorry for stupid question. You have compiled Netsurf? Do you have working exe with Reaction GUI? Do you have any problems with using it? What sources you are using?
Title: Re: duktape error NetSurf OS3
Post by: chris on June 11, 2016, 09:55:26 PM
You may also find after installing nsgenbind, that it isn't in the path. Creating a soft link from /usr/bin/nsgenbind to /opt/netsurf/bin/nsgenbind might help.
Title: Re: duktape error NetSurf OS3
Post by: DNADNL on June 13, 2016, 09:54:54 PM
Thank you for your answers, guys !

Quote from: utri007;809841
Sorry for stupid question. You have compiled Netsurf? Do you have working exe with Reaction GUI? Do you have any problems with using it? What sources you are using?

I managed to compile NetSurf 3.5, I can launch it on AmiKit, there is an interface (I don't know if it's Reaction GUI), an I can use it quite correctly (the problem is I can't see any pictures or videos). (Sometimes, a bug can happen, but I think it's because of the computer I work).
Don't worry for the "stupid" questions, i prefer to answer them than forgetting them ^^

Quote from: chris;809889
You may also find after installing nsgenbind, that it isn't in the path. Creating a soft link from /usr/bin/nsgenbind to /opt/netsurf/bin/nsgenbind might help.

I think I already did this, and I have <> (I translate the sentence from french, so sorry for the mistakes)
I looked for the folder /usr/bin/nsgenbind but it doesn't exist. That the same thing for the other folder. I wonder if the link doesn't already exists...
Title: Re: duktape error NetSurf OS3
Post by: chris on June 13, 2016, 11:29:52 PM
Quote from: DNADNL;809950

I think I already did this, and I have <> (I translate the sentence from french, so sorry for the mistakes)
I looked for the folder /usr/bin/nsgenbind but it doesn't exist. That the same thing for the other folder. I wonder if the link doesn't already exists...


I usually get that error because I can never remember what order the parameters are supposed to be in. :)

Anyway, it's easy to check if the link already exists:
Code: [Select]
chris@debian-vm:~/netsurf/netsurf$ ls -la /usr/bin/nsg*
lrwxrwxrwx 1 root root 26 Feb 29 00:16 /usr/bin/nsgenbind -> /opt/netsurf/bin/nsgenbind


If it shows up as a file (ie. no "->"), delete it and recreate the link.
Title: Re: duktape error NetSurf OS3
Post by: DNADNL on June 14, 2016, 04:49:01 PM
Quote from: chris;809957
I usually get that error because I can never remember what order the parameters are supposed to be in. :)

Anyway, it's easy to check if the link already exists:
Code: [Select]
chris@debian-vm:~/netsurf/netsurf$ ls -la /usr/bin/nsg*
lrwxrwxrwx 1 root root 26 Feb 29 00:16 /usr/bin/nsgenbind -> /opt/netsurf/bin/nsgenbind


If it shows up as a file (ie. no "->"), delete it and recreate the link.


Thanks again for your help !

I recreated the link, i just modified it to correspond to my configuration (I work with cygwin to compile NetSurf for AmigaOS3), so I have :
Code: [Select]
ln -s /home/Administrator/netsurf/nsgenbind/build-i686-pc-cygwin-i686-pc-cygwin-release-binary/nsgenbind /usr/bin/nsgenbind

I tried to compile the 3.5 release and also with the 3.6 dev and I don't have the duk_dukky.o error anymore (for the 3.6 dev, i have another error, but that's not the topic here).

However, the problem is when I try to launch NetSurf 3.5 on AmiKit V8 now. I obtain this :

Code: [Select]
FATAL 56: uncaught error
PANIC 56: uncaught error (calling abort)
Abnormal program termination
NetSurf : error code 20


I don't have this error with NetSurf 3.5 "dukTape disabled edition". The browser is well working in that case (it is only "not really" beautiful :) and the pictures and videos aren't displayed).
Title: Re: duktape error NetSurf OS3
Post by: chris on June 14, 2016, 06:30:58 PM
Quote from: DNADNL;809973
However, the problem is when I try to launch NetSurf 3.5 on AmiKit V8 now. I obtain this :

Code: [Select]
FATAL 56: uncaught error
PANIC 56: uncaught error (calling abort)
Abnormal program termination
NetSurf : error code 20

I don't have this error with NetSurf 3.5 "dukTape disabled edition".

Yes, I have that problem too.  If you figure out the fix I'd appreciate a patch :)

Quote
The browser is well working in that case (it is only "not really" beautiful :) and the pictures and videos aren't displayed).

Hopefully that's not an issue with 3.6dev, the bitmap routines have been changed to use guigfx (as you know!)
Title: Re: duktape error NetSurf OS3
Post by: DNADNL on June 14, 2016, 06:44:20 PM
Quote from: chris;809976
Yes, I have that problem too.  If you figure out the fix I'd appreciate a patch :)

I can see a problem with the version date (6th April 1016). Maybe it comes from there ? A date issue as on every softwares synchronized with the Internet ? (ah, this issue, a real nightmare ! ^^) I'll try to look for a solution, but as you know, I'm not as advanced as you on Amiga OS :)


Quote from: chris;809976
Hopefully that's not an issue with 3.6dev, the bitmap routines have been changed to use guigfx (as you know!)

I can see you've unmasked me ! :lol:
I'll try to make 3.6dev work thanks to your advice.
Title: Re: duktape error NetSurf OS3
Post by: utri007 on June 14, 2016, 10:28:16 PM
Quote from: DNADNL;809977

I can see you've unmasked me ! :lol:
I'll try to make 3.6dev work thanks to your advice.


I don't know if you have followed discussion about Chris' attempt to port it Amiga os 3.5/9? It start to be really fast with real Amigas. There is however one big problem, memory leak / or memory fragmention issue, wich slows it down after few pages.

Java is nice, but I have high doubt that it would make it unuseable with real Amigas. Maybe latter with Vampire accelerators?
Title: Re: duktape error NetSurf OS3
Post by: DNADNL on June 14, 2016, 11:12:48 PM
Quote from: utri007;809980
I don't know if you have followed discussion about Chris' attempt to port it Amiga os 3.5/9? It start to be really fast with real Amigas. There is however one big problem, memory leak / or memory fragmention issue, wich slows it down after few pages.

I'm not sure about the fact I followed the discussion (I've read so many things that I don't remember why ! ^^), but that's right ! AmiKit sometimes rebooted all alone while I was using NetSurf.

Quote from: utri007;809980
Java is nice, but I have high doubt that it would make it unuseable with real Amigas. Maybe latter with Vampire accelerators?
I'm sorry, I didn't understand what you wanted to say here. Do you mean AmiKit is made with Java ?
Title: Re: duktape error NetSurf OS3
Post by: chris on June 14, 2016, 11:32:39 PM
Quote from: DNADNL;809977
I can see a problem with the version date (6th April 1016). Maybe it comes from there ? A date issue as on every softwares synchronized with the Internet ?


That's a typo, it's just a text string, it's only used for display.
Title: Re: duktape error NetSurf OS3
Post by: wawrzon on June 14, 2016, 11:58:05 PM
Quote from: DNADNL;809981
I'm not sure about the fact I followed the discussion (I've read so many things that I don't remember why ! ^^), but that's right ! AmiKit sometimes rebooted all alone while I was using NetSurf.
amiga system doesnt have memory protection, therefore a faulty application may reproducibly bring the whole system down or effectively reboot it. in many cases at least the faulty memory allocations, reads and writes may be intercepted by a third party software. for systems with mmu the muforce package from aminet.net is advisable. you can enable mmu in your uae settings or even use uaeenfircer directly, typing "winuaeenforcer" command into your amiga shell under uae.

there has been discussion about the choice of c library to be linked against and therefore memory allocator associated with this library. i would have to look for a link. basically you can link against clib2 as its default with netsurf, which is initially faster but appears to slow down dramatically pretty soon. then you can usually link with the libnix option, and as less encouraged, you can take advantage of one of the ixemul library versions, latest of which use internally some buddy allocator. also there is external implementation of tlsf fir amiga, rather rarely used and probably also not well tested due to (expected) incompatibilities. however im not sure what compiler and build config you use. is it some form of amidevcpp?

im sorry for this lengthy post, and things you may be aware of, but you seem to be new here, so i may be mentioning platitudes.

Quote
I'm sorry, I didn't understand what you wanted to say here. Do you mean AmiKit is made with Java ?
i think he would prefer you to fix the browser itself, before trying to implement javascript engine. this is what ducktape is, for what i recall?
Title: Re: duktape error NetSurf OS3
Post by: Tygre on June 15, 2016, 02:06:23 AM
Hi all!

Thanks for the interesting discussions and all the effort! I wanted to mention that linking with fortify (http://aminet.net/package/dev/c/fortify22) really helps catching memory problems, maybe that could be an option for the development version of netSurf?

Maybe DNADNL could try? :)
Cheers!
Title: Re: duktape error NetSurf OS3
Post by: utri007 on June 15, 2016, 06:27:53 AM
Quote from: DNADNL;809981


I'm sorry, I didn't understand what you wanted to say here. Do you mean AmiKit is made with Java ?




AmiKit can be used with real Amigas, but usually it means emulator. Real Amiga = Harware with 680X0 CPU.
Title: Re: duktape error NetSurf OS3
Post by: wawrzon on June 15, 2016, 08:47:15 AM
Quote from: utri007;809991
AmiKit can be used with real Amigas, but usually it means emulator. Real Amiga = Harware with 680X0 CPU.


its a bit unclear what you are trying to say. even me i need to guess, that you probably want to say that javascript interpreter may be too heavy for real 68k cpus and only wirk with acceptable speed under x86 emulation. right?
Title: Re: duktape error NetSurf OS3
Post by: utri007 on June 15, 2016, 09:39:08 AM
Quote from: wawrzon;809994
its a bit unclear what you are trying to say. even me i need to guess, that you probably want to say that javascript interpreter may be too heavy for real 68k cpus and only wirk with acceptable speed under x86 emulation. right?


Right. It would have been better to say Netsurf, instead "it".

Java is nice, but I have high doubt that it would make Netsurf unuseable with real Amigas. Maybe latter with Vampire accelerators?
Title: Re: duktape error NetSurf OS3
Post by: chris on June 15, 2016, 02:20:16 PM
Quote from: utri007;809996
Java is nice, but I have high doubt that it would make Netsurf unuseable with real Amigas.

Java and Javascript are two different things.  Duktape implements Javascript.  It will only slow down NetSurf on pages which use Javascript, but I've not noticed any particular difference in speed with JS on/off under OS4.  There were a couple of issues that made Duktape really slow in certain circumstances, but they've been fixed.

Quote from: Tygre;809986
Thanks for the interesting discussions and all the effort! I wanted to mention that linking with fortify (http://aminet.net/package/dev/c/fortify22) really helps catching memory problems, maybe that could be an option for the development version of netSurf?

Oooh, that looks interesting.
Title: Re: duktape error NetSurf OS3
Post by: wawrzon on June 15, 2016, 03:32:12 PM
im posting here a link to our previous thread, what concerns the clib and memory allocation speed issues as well as later some stability issues probably still to be considered. sorry for not responding anymore in that thread, but i have lost sight of it.

http://www.amiga.org/forums/showthread.php?t=70260&highlight=netsurf&page=14

and following pages..
Title: Re: duktape error NetSurf OS3
Post by: DNADNL on June 15, 2016, 08:11:53 PM
Oh, so many posts to read ! ^^

Quote from: wawrzon;809984
you can enable mmu in your uae settings or even use uaeenfircer directly, typing "winuaeenforcer" command into your amiga shell under uae. [...] however im not sure what compiler and build config you use. is it some form of amidevcpp?
i use cygwin 32bits and gcc-tools (with epoch2 and autom4te2, if I remember well) to compile Netsurf for AmigaOS3, and I use AmiKit V8 to launch NetSurf. I looked for the amiga shell on AmiKit but I didn't find it (but maybe I search in the wrong place, I don't know).

Quote from: wawrzon;809984
im sorry for this lengthy post, and things you may be aware of, but you seem to be new here, so i may be mentioning platitudes.
Don't worry, you're right to do this ! ^^ I'll try to read the link you post on one of your posts.

Quote from: wawrzon;809984
i think he would prefer you to fix the browser itself, before trying to implement javascript engine. this is what ducktape is, for what i recall?
That's the aim of DukTape, yes. I managed to make NetSurf 3.5 work without DukTape, and what I would like it's to make it work with DukTape. Of course NetSurf 3.5 isn't perfect and has some bugs, but at least it works, and it could work "better" with DukTape. Or maybe I should wait the 3.6 release version, as I can understand it doesn't contain DukTape ? ^^

Quote from: Tygre;809986
Hi all!

Thanks for the interesting discussions and all the effort! I wanted to mention that linking with fortify (http://aminet.net/package/dev/c/fortify22) really helps catching memory problems, maybe that could be an option for the development version of netSurf?

Maybe DNADNL could try? :)
Cheers!
Oh, I don't think I'm good enough to do this ! :lol: I downloaded and looked the fortify files... and it doesn't seem to be reachable (with my level) to create the call to fortify (I could break everything ! :lol: )

Quote from: utri007;809996
Right. It would have been better to say Netsurf, instead "it".

Java is nice, but I have high doubt that it would make Netsurf unuseable with real Amigas. Maybe latter with Vampire accelerators?
OK, I understand well, now.
Title: Re: duktape error NetSurf OS3
Post by: chris on June 15, 2016, 09:11:31 PM
Quote from: DNADNL;810014
Oh, I don't think I'm good enough to do this ! :lol: I downloaded and looked the fortify files... and it doesn't seem to be reachable (with my level) to create the call to fortify (I could break everything ! :lol: )


Have a look at http://git.netsurf-browser.org/netsurf.git/log/?h=chris/fortify (or git checkout chris/fortify)
However... (a) that probably isn't adding fortify.h to all files (it assumes os3support.h and options.h are eventually included by everything, which probably isn't true)
and (b) it doesn't catch AllocVec/FreeVec and friends, which are mostly what I use in the frontend.

I'm getting some output, but it seems to be a load of bogus double free()s, which might be due to point (a) above, or because some of the allocations are made by linked libraries.

Try it and see if you can make any sense of the results.  I'll add some #defines for AllocVec when I get chance to catch those too.
Title: Re: duktape error NetSurf OS3
Post by: wawrzon on June 15, 2016, 09:23:02 PM
Quote from: DNADNL;810014
I use cygwin 32bits and gcc-tools (with epoch2 and autom4te2, if I remember well) to compile Netsurf for AmigaOS3, and I use AmiKit V8 to launch NetSurf. I looked for the amiga shell on AmiKit but I didn't find it (but maybe I search in the wrong place, I don't know).

but where did you get 68k backend from? which gcc version is this?

i have never used amikit, just plain amiga and aros, but what concerns shell/cli it should be in
system sub directory.
Title: Re: duktape error NetSurf OS3
Post by: Tygre on June 16, 2016, 01:36:40 AM
Hi Chris and all!

Quote from: chris;810015
Have a look at http://git.netsurf-browser.org/netsurf.git/log/?h=chris/fortify (or git checkout chris/fortify)
However... (a) that probably isn't adding fortify.h to all files (it assumes os3support.h and options.h are eventually included by everything, which probably isn't true) and (b) it doesn't catch AllocVec/FreeVec and friends, which are mostly what I use in the frontend.

Ah, yes, I was just going to post about that: to the best of my knowledge, fortify "intercept" (i.e., redefine) the typical C allocations function: malloc, calloc, et al., and free. So it should probably be modified to add support for AmigaOS-dedicated functions.

Quote from: chris;810015
I'm getting some output, but it seems to be a load of bogus double free()s, which might be due to point (a) above, or because some of the allocations are made by linked libraries.

Try it and see if you can make any sense of the results.  I'll add some #defines for AllocVec when I get chance to catch those too.

That would be very cool because in my (limited) experience with AmiModRadio, fortify really helps catching misplaced/forgotten free and overwrites...

Cheers!
Title: Re: duktape error NetSurf OS3
Post by: DNADNL on June 17, 2016, 03:18:27 PM
Quote from: chris;810015
Have a look at http://git.netsurf-browser.org/netsurf.git/log/?h=chris/fortify (or git checkout chris/fortify)
However... (a) that probably isn't adding fortify.h to all files (it assumes os3support.h and options.h are eventually included by everything, which probably isn't true)
and (b) it doesn't catch AllocVec/FreeVec and friends, which are mostly what I use in the frontend.

OK, I'll try to check this out, but I don't promise anything. ^^


Quote from: wawrzon;810016
but where did you get 68k backend from? which gcc version is this?

I use gcc 5.3.0, that's what "gcc --version" says. For the 68k backend, if you talk about the kickstarts, I got them via Amiga Forever, if i recall well. Hoping this is answering your questions.
Title: Re: duktape error NetSurf OS3
Post by: chris on June 17, 2016, 03:35:25 PM
Quote from: DNADNL;810066
I use gcc 5.3.0, that's what "gcc --version" says.


I didn't think that worked for 68k yet?
Title: Re: duktape error NetSurf OS3
Post by: DNADNL on June 17, 2016, 03:57:55 PM
Quote from: chris;810067
I didn't think that worked for 68k yet?

I don't know, honestly. I can see gcc-3.4.6 (I think) is downloaded when I want to compile the toolchains.
Title: Re: duktape error NetSurf OS3
Post by: wawrzon on June 17, 2016, 04:25:54 PM
Quote from: chris;810067
I didn't think that worked for 68k yet?

since this is devcpp, as i underatand, probably the default main host gcc there is actually 5.3.0. sounds likely at least. however amiga-m68k crosscompiler backend can very well be 3.4.x. i dont know what stuff is bundled with amikit, but id expect that if someone is up to the task to install a toolchain, he will be able to tell, what toolchain it is and how he got it installed ;)..

edit: for all interested, in the old thread i posted a link to a gcc4.5.0 68k crosscompiler for (ami)devcpp. in case of interest look for it on amiga.sf.
Title: Re: duktape error NetSurf OS3
Post by: DNADNL on June 17, 2016, 04:43:18 PM
Quote from: wawrzon;810071
since this is devcpp, as i underatand, probably the default main host gcc there is actually 5.3.0. sounds likely at least. however amiga-m68k crosscompiler backend can very well be 3.4.x. i dont know what stuff is bundled with amikit, but id expect that if someone is up to the task to install a toolchain, he will be able to tell, what toolchain it is and how he got it installed ;)..

Oh, dear, I don't know who you talk about ! :lol:

I installed the NetSurf toolchain : git://git.netsurf-browser.org/toolchains.git
I have to modify some files to make it compile ith cygwin, so I created a little shell script to correct them (as said here: http://wiki.netsurf-browser.org/Documentation/BuildingForAmigaOS)
Then, I crated a link between two folders to make autom4te2.64 available for the compilation
then make distclean, make... as said in the link before (for the toolchain).

To compile the whole NetSurf Program (toolchains + libraries + netsurf itself), I have some other updates to do. I'm in this step now ! ^^

I created a script to install everything automatically. If it works well (and if you are as nice as Care Bears or Unicorns ^^), maybe I'll give you the script.
Title: Re: duktape error NetSurf OS3
Post by: wawrzon on June 17, 2016, 08:20:31 PM
no offence meant! ;P
so, afair, its the toolchain that gets built by netsurf build system automatically?
i dont have devcpp installed at this time, nor am i building netsurf anywhere else currently, but maybe it would be helpful for others to see if your modifications to the scripts couldnt be incorporated, dependent on detecting cygwin as host.
Title: Re: duktape error NetSurf OS3
Post by: DNADNL on June 17, 2016, 09:15:32 PM
Quote from: wawrzon;810082
no offence meant! ;P

Don't worry ! ^^

Quote from: wawrzon;810082

so, afair, its the toolchain that gets built by netsurf build system automatically?

Yes, this is the toolchain used to compile NetSurf then (if I well understood what you said ^^)

Quote from: wawrzon;810082

i dont have devcpp installed at this time, nor am i building netsurf anywhere else currently, but maybe it would be helpful for others to see if your modifications to the scripts couldnt be incorporated, dependent on detecting cygwin as host.

OK, when I'll be sure everything works. I'm working on it.
Title: Re: duktape error NetSurf OS3
Post by: DNADNL on June 20, 2016, 02:30:08 PM
Sorry for the double post ! ^^'

I confirm I use gcc v.3.4.6 to compile for AmigaOS3 (the file is called m68k-unknown-amigaos-gcc-3.4.6.exe).
Title: Re: duktape error NetSurf OS3
Post by: DNADNL on June 28, 2016, 03:31:21 PM
Hi amiguys ! ^^

(Sorry for the triple post !)

My script is now available ! It is called NetScript and it is a script to compile automatically NetSurf for AmigaOS3 (Cross-compilation Windows using Cygwin - AmigaOS3). Here is the link if you want to try it : https://github.com/DNADNL/NetScript

Don't hesitate to tell me if something goes wrong, but if you read carefully the README, you shouldn't have any problems. ^^
Title: Re: duktape error NetSurf OS3
Post by: utri007 on June 28, 2016, 07:01:12 PM
Could you relase exe for those who doesn't code?

It seems that you managed to fix ducktape errors? I checked your other files, does this use guigfx / render library? Is there any known problems?

https://github.com/DNADNL/guigfxlib
Title: Re: duktape error NetSurf OS3
Post by: DNADNL on June 28, 2016, 07:13:23 PM
Quote from: utri007;810418
Could you relase exe to those who doesn't code?


Ok, I'm going to check if I can do it, but I'm not sure this can be possible, because you need first to install cygwin, and I don't know if I can manage this via an exe. If you have any tool to advise me... ^^
For the moment, there is a very-well-explained README to use if a non-coder person would like to give a try ! ^^

Quote from: utri007;810418

It seems that you managed to fix ducktape errors? I checked your other files, does this use guigfx / render library? Is there any known problems?

https://github.com/DNADNL/guigfxlib

Actually, I managed to compile NetSurf with DukTape, but not to launch it with. I'm trying to locate the DukTape problem.
I just uploaded the guigfxlib and the renderlib to my GitHub because it seems lha, lhasa, lhash, ... don't work with Cygwin. So I avoided the problem by modifying the NetSurf makefile to make it download those libraries via my GitHub.
Title: Re: duktape error NetSurf OS3
Post by: chris on June 28, 2016, 07:48:20 PM
Quote from: utri007;810418
Could you relase exe for those who doesn't code?


What would be the point?  If you don't code, you don't need this script.  Instead you need to download a pre-compiled version of NetSurf.

At some point the OS3 build will be added to Jenkins, at which time you'll get a new build every time something changes.  But we ought to fix the Duktape problem first.
Title: Re: duktape error NetSurf OS3
Post by: utri007 on June 28, 2016, 08:42:45 PM
Quote from: chris;810422
What would be the point?  If you don't code, you don't need this script.  Instead you need to download a pre-compiled version of NetSurf.


exe = executable = pre-compiled version

Quote
At some point the OS3 build will be added to Jenkins, at which time you'll get a new build every time something changes.  But we ought to fix the Duktape problem first.


Great news.
Title: Re: duktape error NetSurf OS3
Post by: DNADNL on June 30, 2016, 04:22:35 PM
Hello everyone !

The new version of NetScript is available in my GitHub. It doesn't give an exe file but a tar archive containing all the files needed to install NetSurf on AmigaOS3.

Enjoy ! And as usual, if there is a problem, don't hesitate to tell me.
Title: Re: duktape error NetSurf OS3
Post by: utri007 on June 30, 2016, 06:38:06 PM
Quote from: DNADNL;810458
Hello everyone !

The new version of NetScript is available in my GitHub. It doesn't give an exe file but a tar archive containing all the files needed to install NetSurf on AmigaOS3.

Enjoy ! And as usual, if there is a problem, don't hesitate to tell me.


Only thing needed to download  from github is    letsStart.sh  ?

It is executed with start NetScript commands?
Title: Re: duktape error NetSurf OS3
Post by: DNADNL on June 30, 2016, 07:05:01 PM
Quote from: utri007;810463
Only thing needed to download  from github is    letsStart.sh  ?
No, you need to download the whole master branch (so letsStart.sh, scriptFilesUpdate.sh and the scriptUpdate folder). I'll specify it on the README later to be clear.


Quote from: utri007;810463
It is executed with start NetScript commands?
What do you mean ? To execute NetScript, everything is explained in the README file, but maybe it isn't clear in it.
Title: Re: duktape error NetSurf OS3
Post by: utri007 on June 30, 2016, 07:45:24 PM
Quote from: DNADNL;810464
No, you need to download the whole master branch (so letsStart.sh, scriptFilesUpdate.sh and the scriptUpdate folder). I'll specify it on the README later to be clear.


OK readme says rar archive, if I click download offers "Open in desktop" or "Download ZIP". So I wondered where to get rar archive.

Quote

What do you mean ? To execute NetScript, everything is explained in the README file, but maybe it isn't clear in it.


Readme says "3.Use this command to start NetScript : ./letsStart.sh ;". And "What does NetScript contains" doesn't mention  Netscript, so I thought it is Cywin shell command.
Title: Re: duktape error NetSurf OS3
Post by: DNADNL on June 30, 2016, 07:51:36 PM
Quote from: utri007;810465
OK readme says rar archive, if I click download offers "Open in desktop" or "Download ZIP". So I wondered where to get rar archive.
i did a mistake in the README here, I wanted to talk about the ZIP archive. I'll correct it, thanks for your feedback !



Quote from: utri007;810465
Readme says "3.Use this command to start NetScript : ./letsStart.sh ;". And "What does NetScript contains" doesn't mention  Netscript, so I thought it is Cywin shell command.
NetScript is the name of the "software" containing letsStart ant the other files. But that's right, it can be misunderstood, so I'll correct this to rename letsStart in NetScript.

Thanks again for your feedback !  :)
Title: Re: duktape error NetSurf OS3
Post by: utri007 on June 30, 2016, 09:32:37 PM
Cygwin installer has now downloaded install packages some 6 hours. :(
Title: Re: duktape error NetSurf OS3
Post by: DNADNL on June 30, 2016, 09:44:49 PM
Quote from: utri007;810471
Cygwin installer has now downloaded install packages some 6 hours. :(

Yeah, I know... :( That's a problem I need to solve, because we can't use apt-get with cygwin, and looking for the good programs in the Installer could be difficult.
Title: Re: duktape error NetSurf OS3
Post by: utri007 on June 30, 2016, 09:48:36 PM
I noticed that there is also ftp.funet.fi mirror. Installing from there i get 1400kb/s but it says "setup ini is older than previous". Will it work?
Title: Re: duktape error NetSurf OS3
Post by: utri007 on June 30, 2016, 09:54:35 PM
Why don't you release that tar archive wich is result of you Netscript?

What you mean with this
Quote
looking for the good programs in the Installer could be difficult.


Amiga install script for pre compiled executable / program archive?? This should be easy way to generate amiga install scripts. http://aminet.net/package/util/misc/InstallerGen
Title: Re: duktape error NetSurf OS3
Post by: DNADNL on June 30, 2016, 09:56:14 PM
Quote
I noticed that there is also ftp.funet.fi mirror. Installing from there i get 1400kb/s but it says "setup ini is older than previous". Will it work?
Yes, I don't think the source is important, I just advise this source in the README because it's the one I used, but I suppose all the files are available in the whole sources. ^^
Title: Re: duktape error NetSurf OS3
Post by: DNADNL on June 30, 2016, 10:07:12 PM
Quote from: utri007;810474
Why don't you release that tar archive wich is result of you Netscript?


Because the main goal of NetScript is to be able to compile NetScript on any computer and if you want, to dig in the code. I can release the archive only, but it won't be always up to date.

Quote from: utri007;810474

What you mean with this

I mean, I want to do a very simple cygwin tutorial to follow in the README. The problem is, the more you add steps to a tutorial, the more it can be difficult to follow. If I say "Search this command in this window, then download this" 12 times or more, it is too deffecult to follow the tutorial, then, and moreover, if the name of a command changes, you might not find it. So, i prefered to make it simple : download everything, end everybody will be happy ! ^^ But I'll try to enhance this on a future version.

Quote from: utri007;810474

Amiga install script for pre compiled executable / program archive?? This should be easy way to generate amiga install scripts. http://aminet.net/package/util/misc/InstallerGen

The NetSurf Amiga installScript is generated in the final tar archive you obtain at the end of NetScript execution, so I don't need to do one anymore, but thanks for this, it might be useful, one day ! ^^
Title: Re: duktape error NetSurf OS3
Post by: utri007 on June 30, 2016, 10:45:44 PM
Quote
Because the main goal of NetScript is to be able to compile NetScript on any computer and if you want, to dig in the code. I can release the archive only, but it won't be always up to date.


OK respect for that. Thought you know devs usually release /publish binaries, so that "ordinary people" don't get comfused. ;)

Prety soon I try to run you script, next 10 minits.
Title: Re: duktape error NetSurf OS3
Post by: wawrzon on June 30, 2016, 10:55:38 PM
i think its worth releasing binaries as soon as it is working, not any sooner. and it isnt the case yet as i understand. so far the sources are enough if someone wants to help.
Title: Re: duktape error NetSurf OS3
Post by: utri007 on June 30, 2016, 11:37:05 PM
Quote from: DNADNL;810476

1.Download the ZIP archive from the branch you want by selecting the branch,
 then clicking the "Clone or download" button, then "Download ZIP".
 You can download the files from the master branch by clicking this link.
2.Extract the ZIP archive into a folder located in your personal directory ;
If you don`t change the cygwin install directory, it`s probably C:\cygwin\home\*Name of your windows session*
3.Open Cygwin and Move to the directory containing the files (via the cd command) ;
4.Use this command to start NetScript : ./NetScript.sh ;


4th part was easy, no problems.

By the way, thanks. :)
Title: Re: duktape error NetSurf OS3
Post by: chris on July 01, 2016, 10:16:30 AM
Quote from: utri007;810477
OK respect for that. Thought you know devs usually release /publish binaries, so that "ordinary people" don't get comfused. ;)


You already have binaries.  Nothing has changed since my last release (or, at least, nothing relevant).
Title: Re: duktape error NetSurf OS3
Post by: chris on July 01, 2016, 10:18:29 AM
Quote from: utri007;810477
OK respect for that. Thought you know devs usually release /publish binaries, so that "ordinary people" don't get comfused. ;)


You already have binaries.  Nothing has changed since my last release (or, at least, nothing relevant).

The aim here was to make it easier to build, and hence easier to contribute to.
Title: Re: duktape error NetSurf OS3
Post by: utri007 on July 01, 2016, 10:35:34 AM
OK. Clever move. Now you guys should advertise this a little?
Title: Re: duktape error NetSurf OS3
Post by: DNADNL on July 01, 2016, 05:40:54 PM
Quote from: utri007;810477
OK respect for that. Thought you know devs usually release /publish binaries, so that "ordinary people" don't get comfused. ;)

Don't forget I'm yet a beginner ! :lol: Thanks again and again for your feedback ! ^^ Maybe I'll tidy up the git repo or I'll create one only for releases or binaries, but of course NetScript will stay my first priority.

Quote from: wawrzon;810478
i think its worth releasing binaries as soon as it is working, not any sooner. and it isnt the case yet as i understand. so far the sources are enough if someone wants to help.

I agree with you, because first I need to enhance NetScript even if it works now (because cygwin is quite long to download with all the Dev tools), and then there is always the DukTape and Memory issues to see (and the actual NetSurf version is a dev version, too).

Quote from: utri007;810480
4th part was easy, no problems.

By the way, thanks. :)

Great ! You're welcome ! :)

Quote from: chris;810486
You already have binaries.  Nothing has changed since my last release (or, at least, nothing relevant).

The aim here was to make it easier to build, and hence easier to contribute to.

Yeah, everything is available on the git NetSurf repo, and I don't want to be in competition with it ^^
NetScript is only a tool to compile easily NetSurf for AmigaOS3. Maybe if it's easy to implement, NetScript will be able to compile NetSurf for any OS, but I think I'm a daydreamer (and moreover, I'll focus on that in a looooong time, as it's a minor/optional feature) ! ^^

Quote from: utri007;810490
OK. Clever move. Now you guys should advertise this a little?

Why not ? I don't know how, but if wou have ideas and you want to be a NetScript advertiser... ^^
Title: Re: duktape error NetSurf OS3
Post by: chris on July 08, 2016, 08:02:52 PM
I don't know where the other thread is and I don't have time to go looking for it right now, so...

@utri

Please try the latest test build and let me know if there is any improvement.
The amiga.org logo is still very red, but are any of the other images better?
Speed?

http://cy2.uk/netsurfos3
Title: Re: duktape error NetSurf OS3
Post by: utri007 on July 08, 2016, 09:17:32 PM
Colors are better. Merchandice picture right side of amiga.org look about right, even some netsurf buttons looks better, background color looks better. Looks much better.

Some reason my phone doesn't upload pictures to my cloud and I'm too tired to find out why. I would have uploaded pictures here.

About speed, it is decreased a bit, amiga.org loads now maybe 2 seconds longer. Two first pages loads fast, after that 2x, 4x, ..

As a side note : I have fblit configured in my 040 / AGA machine. It has huge impact to scrolling speed. Tested old and new versions same time, old version was running my 060 system wich doesn't have fblit installed.

EDIT: Pictures added, sorry poor quality.
EDIT:: Auto friend_bitmap does work now.
Title: Re: duktape error NetSurf OS3
Post by: chris on July 09, 2016, 12:04:48 AM
Quote from: utri007;810805
As a side note : I have fblit configured in my 040 / AGA machine. It has huge impact to scrolling speed. Tested old and new versions same time, old version was running my 060 system wich doesn't have fblit installed.

"Cache native versions" will have a huge impact too.  That may or may not counteract any benefit from fblit.

Still puzzled as to why the amiga.org logo is weird colours.
Title: Re: duktape error NetSurf OS3
Post by: chris on July 10, 2016, 01:15:16 AM
Another new version.  Curious this time as to whether JPEG decoding speed is any different.
Title: Re: duktape error NetSurf OS3
Post by: utri007 on July 10, 2016, 12:08:46 PM
Quote from: chris;810870
Another new version.  Curious this time as to whether JPEG decoding speed is any different.


040 and AGA loads amiga.org 27 seconds now,  that is big speedup. Was about 35 seconds. Cache native versiona is now auto ON with AGA? Scrolling is faster than with RTG?

060 and RTG seems 2 seconds faster, but that kind of speedup / slowdond can be just a tolerance.
Title: Re: duktape error NetSurf OS3
Post by: chris on July 10, 2016, 02:54:00 PM
Quote from: utri007;810883
040 and AGA loads amiga.org 27 seconds now,  that is big speedup. Was about 35 seconds.


Great!

Quote
Cache native versiona is now auto ON with AGA?


No, but I had broken the "scaled" cache option so that is working again.  Unless I've broken it in the other direction, but I don't think so.

Quote
060 and RTG seems 2 seconds faster, but that kind of speedup / slowdond can be just a tolerance.


It may be that what I've changed isn't relevant for the '060.
Title: Re: duktape error NetSurf OS3
Post by: wawrzon on July 10, 2016, 03:37:20 PM
Quote from: chris;810890

It may be that what I've changed isn't relevant for the '060.


if its jpg decoding/rendering related it maybe isnt relevant for full color rtg screens vs color reduced aga?
Title: Re: duktape error NetSurf OS3
Post by: wawrzon on July 13, 2016, 07:40:16 PM
@dnadnl

could you share your changes with me that let you compile duktape so far? or rather how could we corrdinate this. even if im not sure if im going to be of any help.

first of all, where is duktape/binding.h?

edit: äh. stand by. just realized i need first to re-read this thread as well;)
Title: Re: duktape error NetSurf OS3
Post by: wawrzon on July 13, 2016, 08:39:14 PM
lots of warnings.. with duktape files.
however most strange is:
Code: [Select]
COMPILE: frontends/amiga/bitmap.c
frontends/amiga/bitmap.c:35:26: /opt/netsurf/m68k-unknown-amigaos/cross/lib/gcc/m68k-unknown-amigaos/3.4.6/../../../../m68k-unknown-amigaos/sys-include/proto/guigfx.h: Permission denied
frontends/amiga/bitmap.c:36:27: /opt/netsurf/m68k-unknown-amigaos/cross/lib/gcc/m68k-unknown-amigaos/3.4.6/../../../../m68k-unknown-amigaos/sys-include/guigfx/guigfx.h: Permission denied
frontends/amiga/bitmap.c:37:27: /opt/netsurf/m68k-unknown-amigaos/cross/lib/gcc/m68k-unknown-amigaos/3.4.6/../../../../m68k-unknown-amigaos/sys-include/render/render.h: Permission denied
i dont get how these particular files got their attributes as unreadable to anyone..;)

edit: compiled!
however just realized i dont have a setup to test on, as i only have aros68k here. maybe ill find 3.9 on another computer..
Title: Re: duktape error NetSurf OS3
Post by: wawrzon on July 13, 2016, 09:43:34 PM
chris, wouldnt that be best to get rid of the warnings first? who knows if these dont let the duktape work. even though it might be some endian issue as with webkit. does that currently work on ppc?
Title: Re: duktape error NetSurf OS3
Post by: utri007 on July 13, 2016, 10:50:24 PM
Easiest / fastest way to get setup wich works with it, is buy Amiga Forever, it works also with Cloanto's OS3.X

Only thing needed is usergroup.library from Ami TCP install.

As far I can tell, Ducktape works wit PPC, as it is currently used as Netsurf java script engine. If anything isn't changed lately?
Title: Re: duktape error NetSurf OS3
Post by: chris on July 14, 2016, 12:00:51 AM
Quote from: wawrzon;811072
chris, wouldnt that be best to get rid of the warnings first? who knows if these dont let the duktape work.

Yes, there's a ton of warnings :( Most of them are because of Gadget*/Object* definition changes in OS4. It's possible there's some genuine error hidden amongst them, but there are hardly any warnings when building for OS4.

Quote
even though it might be some endian issue as with webkit. does that currently work on ppc?

Yes.

I did have to add ppc-amigaos support to Duktape initially, but 68k doesn't complain and there have been a lot of configuration changes since then. It's possible something is misconfigured in Duktape (their website says it works on Amiga m68k with VBCC)
Title: Re: duktape error NetSurf OS3
Post by: apj on July 14, 2016, 08:12:45 AM
Duktape works in my ixemul version.
I haven't tried with libnix yet.
Title: Re: duktape error NetSurf OS3
Post by: chris on July 14, 2016, 10:54:14 AM
Quote from: apj;811091
Duktape works in my ixemul version.
I haven't tried with libnix yet.


Have you tried it with clib2?
Title: Re: duktape error NetSurf OS3
Post by: apj on July 14, 2016, 09:26:14 PM
Quote from: chris;811099
Have you tried it with clib2?


Yes, it has not compiled but it has with libnix.
Title: Re: duktape error NetSurf OS3
Post by: chris on July 14, 2016, 11:26:10 PM
Quote from: apj;811120
Yes, it has not compiled but it has with libnix.


It doesn't compile or it doesn't run?
Title: Re: duktape error NetSurf OS3
Post by: apj on July 15, 2016, 07:25:26 AM
Quote from: chris;811125
It doesn't compile or it doesn't run?


Sorry, doesn't run. Same error :

FATAL 56: uncaught error
PANIC 56: uncaught error (calling abort)
Abnormal program termination
Title: Re: duktape error NetSurf OS3
Post by: chris on July 15, 2016, 10:04:39 AM
Quote from: apj;811128
Sorry, doesn't run. Same error :

FATAL 56: uncaught error
PANIC 56: uncaught error (calling abort)
Abnormal program termination


OK, that's what I get too.  It looks like that output is from Duktape, so obviously clib2 is doing something it doesn't like.

Really needs somebody to trace Duktape to see where it is failing.
Title: Re: duktape error NetSurf OS3
Post by: wawrzon on July 15, 2016, 10:46:05 AM
this is second time clib2 causes a significant issue. which wont be traced let alone fixed, i fear. so why not simply build against libnix? may be a naive question, but what does clib2 offer in comparison?
Title: Re: duktape error NetSurf OS3
Post by: chris on July 15, 2016, 11:35:53 AM
Quote from: wawrzon;811131
this is second time clib2 causes a significant issue. which wont be traced let alone fixed, i fear. so why not simply build against libnix? may be a naive question, but what does clib2 offer in comparison?

The other "significant issue" isn't actually fixed by using libnix, so this is the first one only.

clib2 is more modern and supported.  libnix still uses ancient functions like Allocate(), I'd rather not go back to that.

Like the EU, we should stay in and fix the problems, not abandon it and change to something older which isn't necessarily better. :)

Next step is to enable DUK_USE_DEBUG and see what we get.
Title: Re: duktape error NetSurf OS3
Post by: wawrzon on July 15, 2016, 01:21:16 PM
Quote from: chris;811134
The other "significant issue" isn't actually fixed by using libnix, so this is the first one only.


my impression was that the gradually increasing lag occurs only with clib2, not libnix?

Quote

clib2 is more modern and supported.


it may be more modern or not, but the question is, if it really is supported. who is maintaining this for amiga-m68k? because libnix source together with a whole amiga toolchain is here and seems actually to be actively maintained:
https://github.com/cahirwpz/libnix

Quote

Like the EU, we should stay in and fix the problems, not abandon it and change to something older which isn't necessarily better. :)


that depends if it is accessible for whoever wants to fix it. some curious similarities to developments in amiga scene here. if at least a temporary rollback to an earlier version was necessary and desired, time will tell.

Quote

Next step is to enable DUK_USE_DEBUG and see what we get.


ok. i stand by as im not able to test the binaries currently.
Title: Re: duktape error NetSurf OS3
Post by: chris on July 15, 2016, 02:00:58 PM
Quote from: wawrzon;811137
my impression was that the gradually increasing lag occurs only with clib2, not libnix?


Because clib2 uses memory pools, libnix does plain allocations.  The slowness in clib2 occurs because after a while, memory pools aren't any more efficient than plain allocations.  Switching to libnix just means it will be that slow speed all the time, which isn't really a fix.

Quote
it may be more modern or not, but the question is, if it really is supported. who is maintaining this for amiga-m68k?


Olaf (olsen).

Quote
ok. i stand by as im not able to test the binaries currently.


I'll try it when I get chance.  Actually I might ping DNADL a note as it'll most likely get tested quicker.
Title: Re: duktape error NetSurf OS3
Post by: wawrzon on July 15, 2016, 05:09:10 PM
Quote from: chris;811139
Because clib2 uses memory pools, libnix does plain allocations.  The slowness in clib2 occurs because after a while, memory pools aren't any more efficient than plain allocations.  Switching to libnix just means it will be that slow speed all the time, which isn't really a fix.


please verify with apj (arturs) benchmark here, post #263:
http://www.amiga.org/forums/showthread.php?t=70260&highlight=clib2+libnix&page=14

i admit the circumstances may not be optimal, he probably didnt reload the page from local file, but its obvious that while libnix and ixemul are slower than clib2 initially, clib2 will eventually slow down to 3-6 slower that them. at this point using the memory allocator provided by ixemul 6x.x seems definitely fastest and most stable option. second is libnix. if you say that clib2 behaviour is not a bug but simply consequence of memory alocator using pools adnt that its normal that they will become inefficient with the time, then i wonder why to stick to that solution.

for the record. im not trying to force anything through. but i wonder.

Quote

Olaf (olsen).

could you contact him about the matter?

Quote

I'll try it when I get chance.  Actually I might ping DNADL a note as it'll most likely get tested quicker.


if you tell me where in the build scripts or headers the copmpiler options are specified i could try to compile it and post binary somewhere for people to test. the libraries/deps need to be recompiled as well i take it?
Title: Re: duktape error NetSurf OS3
Post by: chris on July 16, 2016, 12:41:13 AM
It's 1am so I'll worry about the rest later, however:
Quote from: wawrzon;811149


if you tell me where in the build scripts or headers the copmpiler options are specified i could try to compile it and post binary somewhere for people to test. the libraries/deps need to be recompiled as well i take it?


There's a Duktape config header file somewhere in content/(fetchers?)/javascript
Title: Re: duktape error NetSurf OS3
Post by: wawrzon on July 16, 2016, 04:21:02 PM
sorry, bit slow on this, trying to compile odyssey for 68k on the other end;)

i see only /dev-netsurf/workspace/netsurf/content/handlers/javascript/duktape/duk_config.h

but i do see there only general platform flag m68k (DUK_F_M68K) no mention of particular cpu target. must be somewhere before. will keep looking for that.
Title: Re: duktape error NetSurf OS3
Post by: chris on July 16, 2016, 07:32:09 PM
Quote from: wawrzon;811173
i see only /dev-netsurf/workspace/netsurf/content/handlers/javascript/duktape/duk_config.h

but i do see there only general platform flag m68k (DUK_F_M68K) no mention of particular cpu target. must be somewhere before. will keep looking for that.


That's all there is, Duktape doesn't care what sort of 680x0 you have, why should it?

duk_custom.h is where the lines should be added:
#define DUK_USE_DEBUG
#define DUK_USE_DEBUG_LEVEL 0

However I'm not getting any extra debug, so there's something wrong somewhere (DEBUG_LEVEL goes up to 2... still nothing)
Title: Re: duktape error NetSurf OS3
Post by: DNADNL on July 19, 2016, 10:36:22 PM
Hello !

Oh, I didn't see all these messages ! I don't know I didn't receive any notifications about that, so sorry not answering you before !

Quote from: utri007;811074
Easiest / fastest way to get setup wich works with it, is buy Amiga Forever, it works also with Cloanto's OS3.X

Only thing needed is usergroup.library from Ami TCP install.

As far I can tell, Ducktape works wit PPC, as it is currently used as Netsurf java script engine. If anything isn't changed lately?


I have a similar problem with another thing. I try to maye NetSurf work on Happiga, an AmigaOS distribution (ARM4UAE-based) for the Raspberry Pi. I manages to install it but I can't launch it because the usergroup.library is missing. If you have an idea solving this problem, I would be happy to know it ! ^^

Quote from: wawrzon;811064
@dnadnl

could you share your changes with me that let you compile duktape so far? or rather how could we corrdinate this. even if im not sure if im going to be of any help.

first of all, where is duktape/binding.h?

edit: äh. stand by. just realized i need first to re-read this thread as well;)


I answer you even if you don't need it anymore ! ^^
Every file modification is included in the scriptUpdate folder of NetScript. The modifications are made thanks to the sed command. If you don't understand those files, I can help you if you want.

Quote from: chris;811139

I'll try it when I get chance.  Actually I might ping DNADL a note as it'll most likely get tested quicker.

I suppose that's what you asked me before ! ^^
If you need anything else to test, just tell me !

Also, I come here to say a new NetScript version is available ! This version includes the cygwin tools installation, so you don't need to install the whole cygwin dev tools anymore. More disk space, more time saved, ... what more could you asked for ? ^^

I think I'm going to create a NetScript topic, to stop "polluting" this one, don't you think, so ?

Hoping I'll receive a notification this time ! Have a good day/night !
DNA
Title: Re: duktape error NetSurf OS3
Post by: chris on July 20, 2016, 02:42:15 PM
Quote from: DNADNL;811325
Oh, I didn't see all these messages ! I don't know I didn't receive any notifications about that, so sorry not answering you before !


Your email is very intermittent.

Quote
I have a similar problem with another thing. I try to maye NetSurf work on Happiga, an AmigaOS distribution (ARM4UAE-based) for the Raspberry Pi. I manages to install it but I can't launch it because the usergroup.library is missing. If you have an idea solving this problem, I would be happy to know it ! ^^


The short answer (which is on the email you probably haven't received) is to grab it from the AmiTCP archive.
Title: Re: duktape error NetSurf OS3
Post by: utri007 on July 20, 2016, 02:50:37 PM
DNADNL grab it here http://aminet.net/package/comm/net/AmiTCP-bin-30b2

Seems that all AmiTCP installs doesn't include usergroup.library.
Title: Re: duktape error NetSurf OS3
Post by: DNADNL on July 20, 2016, 06:47:51 PM
Hello everyone !

I confirm I didn't receive any notification ! XD

Quote from: chris;811367
Your email is very intermittent.

The short answer (which is on the email you probably haven't received) is to grab it from the AmiTCP archive.


I confirm I didn't receive your email too, I will give you a google one by email.

Quote from: utri007;811369
DNADNL grab it here http://aminet.net/package/comm/net/AmiTCP-bin-30b2

Seems that all AmiTCP installs doesn't include usergroup.library.

OK, i'll try this right now.

Thanks guys !
Title: Re: duktape error NetSurf OS3
Post by: utri007 on July 20, 2016, 07:25:31 PM
Note that you don't need to install AmiTCP just copy usergroup.library to sys:libs
Title: Re: duktape error NetSurf OS3
Post by: DNADNL on July 20, 2016, 08:49:51 PM
Quote from: utri007;811385
Note that you don't need to install AmiTCP just copy usergroup.library to sys:libs
Ok, I did what you said, and I don't have the issue anymore. Yipee !

But NetSurf failed to initialise as you can see there : (http://puu.sh/q8r81/96005cc02d.jpg).
It seems there is not enough memory to init NetSurf, but this seems weird, because I don't think NetSurf uses more than 128 MB to be initialised. (http://puu.sh/q8tfy/b60ec8304c.jpg)
Do you have an idea about this problem ?

EDIT : I want to specify that I use the No-DukTape version here, and I already managed to make NetSurf work (without Internet, but I had the windows) on this AmigaOS distribution.
Title: Re: duktape error NetSurf OS3
Post by: chris on July 21, 2016, 01:07:49 AM
Try setting your language to English in Locale - could be something wrong with the French Messages file.
Title: Re: duktape error NetSurf OS3
Post by: DNADNL on July 21, 2016, 07:27:45 PM
Quote from: chris;811398
Try setting your language to English in Locale - could be something wrong with the French Messages file.
I just tried this. Well, I don't have the same issue but another, now ! ^^ (http://puu.sh/q9AjM/17741cb982.jpg)
Title: Re: duktape error NetSurf OS3
Post by: chris on July 21, 2016, 08:52:44 PM
Quote from: DNADNL;811440
I just tried this. Well, I don't have the same issue but another, now ! ^^


OK, it's probably worth looking at the French Messages file and seeing if there is anything odd around the ToolButtons line.

Quote


(http://puu.sh/q9AjM/17741cb982.jpg)


Try disabling the disc cache. disc_cache_size:0 in Choices (in Users/default)
Title: Re: duktape error NetSurf OS3
Post by: DNADNL on July 21, 2016, 09:11:49 PM
Quote from: chris;811445
OK, it's probably worth looking at the French Messages file and seeing if there is anything odd around the ToolButtons line.



Try disabling the disc cache. disc_cache_size:0 in Choices (in Users/default)
OK, I added the line in the choices file of both english and french version... and that works ! (http://puu.sh/q9H7V/e8a10178d3.jpg) (http://puu.sh/q9Hh2/c7e2c013e7.jpg)
Well, it's not so beautiful (I'm without DukTape) and it crashes if we do lots of actions, but that works ! Yay !

EDIT : I have some SSL cetificates issues, too : (http://puu.sh/q9IdC/902e9a2670.jpg)

In any case, thanks four your help, all !
Title: Re: duktape error NetSurf OS3
Post by: utri007 on July 22, 2016, 05:59:45 AM
Quote from: DNADNL;811447
OK, I added the line in the choices file of both english and french version... and that works !
Well, it's not so beautiful (I'm without DukTape) and it crashes if we do lots of actions, but that works ! Yay !

EDIT : I have some SSL cetificates issues, too :

In any case, thanks four your help, all !


That is ugly, what kind of setup is this?

I haven't had that serious color problem ever.
Title: Re: duktape error NetSurf OS3
Post by: wawrzon on July 22, 2016, 01:05:13 PM
Quote from: utri007;811465
That is ugly, what kind of setup is this?

I haven't had that serious color problem ever.

strange. we had and still certainly have a number of pixel format problems displaying images here. denying this doesnt help to improve anything.

best thing would be to gather precise list of correctly displaying formats and those being off, maybe even with a small picture to illustrate whats wrong. can you specify it on your side, dnadnl? i dont remember how to do that exactly, but i have found the following hint:
Quote
You can use GetVPModeID to get the mode ID of the current screen and then for example p96GetModeIDAttr to find out the pixel format.

edit: i might look at aros tests, perhaps there is one that reports pixel format and can be compiled without aros libraries. we might need a handy tool to determine pixel formats.

i think its important issue, because its always the problem especially with web browsers, due to fact that amiga rtg solutions provide a number of different modes. and what looks right on one setup will look backwards on another.
Title: Re: duktape error NetSurf OS3
Post by: wawrzon on July 22, 2016, 01:52:33 PM
in aros68k nightly iso there is test/graphics/CGXtest utility.

http://netcologne.dl.sourceforge.net/project/aros/nightly2/20160721/Binaries/AROS-20160721-amiga-m68k-bootiso.zip

i d expect it to run on genuine amiga system, it doesnt seem to need any aros specific headers, so i doubt it gets linked against aros libraries. and if it does, it shouldnt be a problem to be recompiled with amiga compiler. the source is just a single file in corresponding directory in the aros sources:

http://netcologne.dl.sourceforge.net/project/aros/nightly2/20160721/Sources/AROS-20160721-source.tar.bz2
Title: Re: duktape error NetSurf OS3
Post by: utri007 on July 22, 2016, 04:11:02 PM
Quote from: wawrzon;811478
strange. we had and still certainly have a number of pixel format problems displaying images here. denying this doesnt help to improve anything.


Netsurf logo is displayded "about right", with AGA. No dithering and it is like it's using only few colors. Never seen that rainbow effect before that DNADNL's pictures have. With RTG prety much every image is displayed as it should be dispalyed, at leeast I don't have noticed anything weird.

AGA has serious problems with amiga.org logo (jpg) but not with amigaworld.net logo (gif)

Chris fixed something and now buttons look about right. AGA has general problems, every single image looks weird even if it is diplayed somewhat right, but most noticeable is with some jpg / png pictures.

Right side of amigaworld.net is changing banner, amiga future banner is unreadable, but colors are right. :) It is animated gif. It is like it would be resized small and after that big again. Losing about 75% of it's pixels?
Title: Re: duktape error NetSurf OS3
Post by: DNADNL on July 22, 2016, 04:29:08 PM
Quote from: utri007;811465
That is ugly, what kind of setup is this?

I haven't had that serious color problem ever.

The setup is quite specific ! ^^

In fact, I'm on an UAE4ARM-based distribution for the Raspberry Pi micro-computer, called Happiga (If you want to try, here is the link : http://happi-game-center.com/ . Sorry, only the french language seems available). At the beginning, it was just an emulator to make old games work, but its designer decided to add recently the bsdlibrary (for the Internet connection). So, I thought it could be a great idea porting NetSurf for Happiga, because with this, Happiga could be used as a real OS on Rasberry Pi, and this could make Amiga revive again ! Well, maybe I go too far... but it would be so cool ! ^^
Also, I used a 3.9 workbench on it, but we can use every workbench you can find on the Internet.

Quote from: wawrzon;811478
strange. we had and still certainly have a number of pixel format problems displaying images here. denying this doesnt help to improve anything.

best thing would be to gather precise list of correctly displaying formats and those being off, maybe even with a small picture to illustrate whats wrong. can you specify it on your side, dnadnl? i dont remember how to do that exactly, but i have found the following hint:


edit: i might look at aros tests, perhaps there is one that reports pixel format and can be compiled without aros libraries. we might need a handy tool to determine pixel formats.

i think its important issue, because its always the problem especially with web browsers, due to fact that amiga rtg solutions provide a number of different modes. and what looks right on one setup will look backwards on another.

I don't know how to do this at all ! ^^ But maybe I could find (or create) a website displaying a same image in different formats, to see those who are well displayed (or not). But sometime, the picture is displayed, sometimes, not, sometimes with weird colours... I'm not sure I can really count on NetSurf on Happiga, now, as it is unstable.

Quote from: utri007;811488
Netsurf logo is displayded "about right", with AGA. No dithering and it is like it's using only few colors. Never seen that rainbow effect before that DNADNL's pictures have. With RTG prety much every image is displayed as it should be dispalyed, at leeast I don't have noticed anything weird.

AGA has serious problems with amiga.org logo (jpg) but not with amigaworld.net logo (gif)

Chris fixed something and now buttons look about right. AGA has general problems, every single image looks weird even if it is diplayed somewhat right, but most noticeable is with some jpg / png pictures.

Right side of amigaworld.net is changing banner, amiga future banner is unreadable, but colors are right. :) It is animated gif. It is like it would be resized small and after that big again. Losing about 75% of it's pixels?

That's right, I use the AGA Chipset configuration for Happiga. I followed a video game-oriented tutorial, so maybe that's not the best solution to use... I can tru others chipsets if you want (I have OCS, ECS Agnus, Full ECS, AGA, and I can enable NTSC, too).
Title: Re: duktape error NetSurf OS3
Post by: utri007 on July 22, 2016, 05:02:44 PM
Quote
That's right, I use the AGA Chipset configuration for Happiga. I follow a video game-oriented tutorial, so maybe that's not the best solution to use... I can tru others chipsets if you want (I have OCS, ECS Agnus, Full ECS, AGA, and I can enable NTSC, too).


Netsurf requires 8bit screen, so AGA is minium?
Title: Re: duktape error NetSurf OS3
Post by: DNADNL on July 22, 2016, 06:09:26 PM
Quote from: utri007;811491
Netsurf requires 8bit screen, so AGA is minium?
Actually, my screen was setup like this (that was possible thanks to Picasso96) : UAE: 800x600 32bit RGBA. I don't know if it answers the question... I tried with a setup like UAE: 800x600 8bit, but it does the same for the pictures.
Title: Re: duktape error NetSurf OS3
Post by: utri007 on July 22, 2016, 07:44:13 PM
Just noticed from earlier post, that you have stability issues with Netsurf. It has been very stable here both of my machines.

Issues wich has been caused a reboot (A+A+CTRL) has been TCP/IP stack dies, wich doesn't seems to happen anymore?
Page loads too long time and Netsurf is unresoponsive.

I think that Netsurf hasn't crash my amiga long time.
Title: Re: duktape error NetSurf OS3
Post by: DNADNL on July 22, 2016, 07:57:02 PM
Quote from: utri007;811499
Just noticed from earlier post, that you have stability issues with Netsurf. It has been very stable here both of my machines.

Issues wich has been caused a reboot (A+A+CTRL) has been TCP/IP stack dies, wich doesn't seems to happen anymore?
Page loads too long time and Netsurf is unresoponsive.

I think that Netsurf hasn't crash my amiga long time.
That's the type of issues I have : running out of memory (I gave NetSurf 128 Mb RAM memory and 0 Mb disc memory, I can't give disc memory to NetSurf or it won't want to start), reboot needed, SSL certificates issues, ...
Plus, I just tried to load any famous image format (via a quick website I created : http://iesmtp.esy.es/), but none of them weredisplayed well and often were totally green (the most closed to the original shape was the PNG file and the GIF one).
Title: Re: duktape error NetSurf OS3
Post by: utri007 on July 22, 2016, 08:00:31 PM
Quote from: DNADNL;811501
That's the type of issues I have : running out of memory (I gave NetSurf 128 Mb RAM memory and 0 Mb disc memory, I can't give disc memory to NetSurf or it won't want to start), reboot needed, SSL certificates issues, ...
Plus, I just tried to load any famous image format (via a quick website I created : http://iesmtp.esy.es/), but none of them weredisplayed well and often were totally green (the most closed to the original shape was the PNG file).


I would be happy to contribute, but I'm currently in Greece. Back home next monday.
Title: Re: duktape error NetSurf OS3
Post by: DNADNL on July 22, 2016, 08:07:44 PM
Quote from: utri007;811503
I would be happy to contribute, but I'm currently in Greece. Back home next monday.
No problem, don't worry ! ^^
While you are about it, I will be able to work on NetScript and globally AmigaOS only until the end of August, as I will go back to France (I'm in Canada, now) and I don't have any way to test NetSurf on Amiga, there.
Title: Re: duktape error NetSurf OS3
Post by: chris on July 23, 2016, 01:48:14 AM
Quote from: utri007;811491
Netsurf requires 8bit screen, so AGA is minium?

Actually it shouldn't care, run it on a 1-bit screen if you like.

Quote from: DNADNL;811496
Actually, my screen was setup like this (that was possible thanks to Picasso96) : UAE: 800x600 32bit RGBA. I don't know if it answers the question... I tried with a setup like UAE: 800x600 8bit, but it does the same for the pictures.

a) ARGB is preferred/expected. It shouldn't matter, but it might.
b) friend_bitmap:1 forces NetSurf's rendering bitmaps into the same format as the screen. If you're running 32-bit this will happen anyway.
c) Images are quantised using guigfx, you might want to try out the demos to see if they work as expected.
d) Depending on what you've done with your config, you might find NetSurf opens its own screen and isn't in the format you think it is.
Title: Re: duktape error NetSurf OS3
Post by: DNADNL on July 25, 2016, 04:06:34 PM
Quote from: chris;811516
Actually it shouldn't care, run it on a 1-bit screen if you like.



a) ARGB is preferred/expected. It shouldn't matter, but it might.
b) friend_bitmap:1 forces NetSurf's rendering bitmaps into the same format as the screen. If you're running 32-bit this will happen anyway.
c) Images are quantised using guigfx, you might want to try out the demos to see if they work as expected.
d) Depending on what you've done with your config, you might find NetSurf opens its own screen and isn't in the format you think it is.
Hello !

a) OK, I set the screen like this : UAE:1024x768 32bit RGBA (RGBA is the same than ARGB, I suppose); NetSurf is configured to have the same screen resolution.
b) I added this into the "Choices" file, but it doesn't seem to do something (I still have a green or weird picture instead of the one expected
c) I don't know how to do this, I'm going to check this out, but if you have a tutorial link, i would kindly accept it ! ^^
d) Logically, it is configured to have the same definition as the workbench. I checked and that's the case. But the funniest part is that the favicon is quite well displayed ! ^^
Title: Re: duktape error NetSurf OS3
Post by: chris on July 25, 2016, 04:30:49 PM
Quote from: DNADNL;811593
a) OK, I set the screen like this : UAE:1024x768 32bit RGBA (RGBA is the same than ARGB, I suppose); NetSurf is configured to have the same screen resolution.

Nope, ARGB and RGBA are different.
ARGB
RGBA

So, alpha pixels will be red, red pixels will be green, green pixels will be blue and blue pixels will be see-through (or not, I can never remember which way round it is)

I don't think NetSurf uses the pixel format directly, but if it does that's what you'll get.

Quote
b) I added this into the "Choices" file, but it doesn't seem to do something

Not unexpected.

Quote
c) I don't know how to do this, I'm going to check this out, but if you have a tutorial link, i would kindly accept it ! ^^

The demos are in the guigfx archive (or maybe the render.lib archive)

Quote
d) Logically, it is configured to have the same definition as the workbench. I checked and that's the case. But the funniest part is that the favicon is quite well displayed ! ^^

The difference is the favicon is plotted direct to the window, whereas the page content goes through an intermediate step.

Try adding direct_render:1 to your Choices. **warning**warning** this might be a **very bad** idea!  I'm not sure it works **at all** and certainly it never worked properly, but it might confirm if the extra step is the problem. **warning**warning**

You can also try fiddling with AMI_BITMAP_FORMAT in bitmap.h.  Maybe it ought to be 0.

Try some different combos and let me know what you get!
Title: Re: duktape error NetSurf OS3
Post by: utri007 on July 25, 2016, 06:32:49 PM
Tested this with my 060 / RTG systems, all pictures are displayed as they should be displayed.

So no problems here with Picasso96 / RTG

AGA has some serious problems, but pictures tell more than 1000 words.

Image format is in picture name.

Checked gif, jpg and png
Title: Re: duktape error NetSurf OS3
Post by: chris on July 25, 2016, 07:14:29 PM
Quote from: utri007;811601
AGA has some serious problems, but pictures tell more than 1000 words.


Can you try direct_render too?  Above warnings apply.

You might need to set the tile size to be the same as the screen.
Title: Re: duktape error NetSurf OS3
Post by: DNADNL on July 25, 2016, 07:20:58 PM
Quote from: chris;811595
Nope, ARGB and RGBA are different.
ARGB
RGBA

So, alpha pixels will be red, red pixels will be green, green pixels will be blue and blue pixels will be see-through (or not, I can never remember which way round it is)

I don't think NetSurf uses the pixel format directly, but if it does that's what you'll get.


Oh, I didn't know, thanks for this information !
I looked for ARGB, and I didn't find any resolution or any way to select it on Happiga for Raspberry Pi (I only have 32bits RGBA)

Quote from: chris;811595

The demos are in the guigfx archive (or maybe the render.lib archive)


I can't find them. I tried to launch the files I suspected to contain the demos, but that didn't seem to work an Happiga...



Quote from: chris;811595

The difference is the favicon is plotted direct to the window, whereas the page content goes through an intermediate step.

Try adding direct_render:1 to your Choices. **warning**warning** this might be a **very bad** idea!  I'm not sure it works **at all** and certainly it never worked properly, but it might confirm if the extra step is the problem. **warning**warning**

Ok, I tried and... that does nothing ! ^^ The same problem, so it should mean it doesn't come from the guigfx/render lib... ?

Quote from: chris;811595

You can also try fiddling with AMI_BITMAP_FORMAT in bitmap.h.  Maybe it ought to be 0.

I can see AMI_BITMAP_FORMAT is RGBFB_R8G8B8A8. I'm going to try with 0 and I'll tell you.

Quote from: utri007;811601
Tested this with my 060 / RTG systems, all pictures are displayed as they should be displayed.

So no problems here with Picasso96 / RTG

AGA has some serious problems, but pictures tell more than 1000 words.

Image format is in picture name.

Checked gif, jpg and png

Wow, quite better than me ! ^^
Title: Re: duktape error NetSurf OS3
Post by: utri007 on July 25, 2016, 07:56:41 PM
Quote from: chris;811604
Can you try direct_render too?  Above warnings apply.

You might need to set the tile size to be the same as the screen.


How do I test direct_render? user/choises direct_render:1 ?

Some stupid questions :

What was page to see current settings?
Where was cache native versions setting?
Is it current build that experimental 68000 build, here : http://cy2.uk/netsurfos3
What was format to set tile size to 640x512?
Title: Re: duktape error NetSurf OS3
Post by: DNADNL on July 25, 2016, 08:24:47 PM
OK, I just tried NetSurf wit the bitmap.h modification (AMI_BITMAP_FORMAT to 0), and... NetSurf doesn't want to be launched, contrarly to the previous non-modified version.

Quote from: utri007;811607
Is it current build that experimental 68000 build, here : http://cy2.uk/netsurfos3
I can't use this version on Happiga, I suppose it's because it contains DukTape... I use the version I compiled myself via NetScript.
Title: Re: duktape error NetSurf OS3
Post by: chris on July 25, 2016, 08:45:11 PM
Quote from: DNADNL;811608
OK, I just tried NetSurf wit the bitmap.h modification (AMI_BITMAP_FORMAT to 0), and... NetSurf doesn't want to be launched, contrarly to the previous non-modified version.


Try toggling the bits, so it reads R8G8B8A8 or whatever.

Quote


I can't use this version on Happiga, I suppose it's because it contains DukTape... I use the version I compiled myself via NetScript.


It's a plain 68000 binary, no Duktape.
Title: Re: duktape error NetSurf OS3
Post by: chris on July 25, 2016, 08:49:27 PM
Quote from: utri007;811607
How do I test direct_render? user/choises direct_render:1 ?


Yes.
Quote

Some stupid questions :

What was page to see current settings?


about:config

Quote

Where was cache native versions setting?


Prefs, Rendering tab.

Quote

Is it current build that experimental 68000 build, here : http://cy2.uk/netsurfos3


Yes.

Quote

What was format to set tile size to 640x512?


tile_size_x:640
tile_size_y:512

I think.
Title: Re: duktape error NetSurf OS3
Post by: DNADNL on July 25, 2016, 09:01:47 PM
Quote from: chris;811612
Try toggling the bits, so it reads R8G8B8A8 or whatever.
What do you mean by toggling ? Do you want I try RGBFB_R0G8B8A8 or RGBA_R8G8B8A8  instead of RGBFB_R8G8B8A8 ?
Title: Re: duktape error NetSurf OS3
Post by: utri007 on July 25, 2016, 09:18:32 PM
Quote from: DNADNL;811615
What do you mean by toggling ? Do you want I try RGBFB_R0G8B8A8 or RGBA_R8G8B8A8  instead of RGBFB_R8G8B8A8 ?


Does this help?

http://www.w3schools.com/cssref/css_colors_legal.asp
Title: Re: duktape error NetSurf OS3
Post by: chris on July 25, 2016, 09:36:38 PM
Quote from: DNADNL;811615
What do you mean by toggling ? Do you want I try RGBFB_R0G8B8A8 or RGBA_R8G8B8A8  instead of RGBFB_R8G8B8A8 ?


Change it so it is ordered RGBA instead of ARGB. Have a look in the Picasso96 headers, but basically you need to move the A8 to the end.
Title: Re: duktape error NetSurf OS3
Post by: utri007 on July 25, 2016, 09:57:00 PM
Direct render causes more problems. tile_size_x:640 and tile_size_y:512 actually makes it feel faster. :)
Title: Re: duktape error NetSurf OS3
Post by: chris on July 25, 2016, 10:14:50 PM
Quote from: utri007;811619
Direct render causes more problems.

Yes, I know, that's why I surrounded it with *warning*warning*warning*. It's there for debugging purposes. It proved that the extra bitmap isn't the problem.

Quote
tile_size_x:640 and tile_size_y:512 actually makes it feel faster. :)

Yes, it will do (and probably is) but uses more memory, so the default is smaller tiles.
Title: Re: duktape error NetSurf OS3
Post by: utri007 on July 25, 2016, 10:28:27 PM
I don't know if you have noticed but amigaworld.net looks almost OK

http://amigaworld.net/modules/newbb/viewtopic.php?topic_id=41257&forum=27

Little weird, because there is a problems with those image types.
Title: Re: duktape error NetSurf OS3
Post by: chris on July 26, 2016, 12:14:13 AM
Quote from: utri007;811625
I don't know if you have noticed but amigaworld.net looks almost OK


Yes, in fact it's only the amiga.org logo which is obviously wrong, everything else is OK (lacking colour and not perfect, but not completely bonkers)
Title: Re: duktape error NetSurf OS3
Post by: DNADNL on July 26, 2016, 09:08:09 PM
Quote from: chris;811618
Change it so it is ordered RGBA instead of ARGB. Have a look in the Picasso96 headers, but basically you need to move the A8 to the end.
OK, I'll check this out, but as I can see, A8 was already at the end.

Ah, in fact, I can also show you NetSurf on AmiKit v8. Maybe it could help...

EDIT : YAAAAAAAAAAAAAAAAAAAAAAAY ! That works, now !
In fact, Happiga didn't have all the datatypes, I think (Devs : Datatypes :). Maybe it's also your problem, @utri007. So I added the whole datatypes (I got them from AmiKit) and I reinstalled NetSurf then.

Here are the pictures for Happiga :
http://puu.sh/qfnzC/6f18e9c1f6.jpg
http://puu.sh/qfnIi/08a62cbd56.jpg
I couldn't open amiga.org and amigaworld.net (not enough memory, according to NetSurf)

Here are the pictures for AmiKit (resolution : uaegfx.card0-P96Mode 32bit BGRA) :
http://puu.sh/qfoAJ/4c2acf06a9.png
http://puu.sh/qfoyJ/d2f01d23f7.png
http://puu.sh/qfovj/2e8fe337d6.png
http://puu.sh/qfoxq/7c6050900b.png

Now, I have to find out the SSL problem : I can't access SSL-crypted web pages (Youtube, Gmail, ...)

EDIT : I put URLs instead of pictures, It was too big before.
Title: Re: duktape error NetSurf OS3
Post by: utri007 on July 26, 2016, 09:24:53 PM
OK I need to test, but :

I don't have any color/display problems with  RTG system
Both machines have identigal OS install. I have old 2gb hard drive wich I use for OS installltion, actually just copy files from it. It has very Basic OS3.9 with BB1&2, magic menu and prism2v driver.

Chris what you think about this?

I downloaded amikit for real amigas, there is no way that I would install it, but surely I can manually install it's datatypes.

Ealier today I tried Netsurf in HAM screen, it didn't change a thing. I ques HAM is not supported with guigfx and render libraries?
Title: Re: duktape error NetSurf OS3
Post by: DNADNL on July 26, 2016, 10:26:58 PM
Quote from: utri007;811687
OK I need to test, but :

I don't have any color/display problems with  RTG system
Both machines have identigal OS install. I have old 2gb hard drive wich I use for OS installltion, actually just copy files from it. It has very Basic OS3.9 with BB1&2, magic menu and prism2v driver.

Chris what you think about this?

I downloaded amikit for real amigas, there is no way that I would install it, but surely I can manually install it's datatypes.

Ealier today I tried Netsurf in HAM screen, it didn't change a thing. I ques HAM is not supported with guigfx and render libraries?
I can't answer you, sry, but if you want I can give you the Datatypes I took from AmiKit (I created an Archive with the datatypes).
Title: Re: duktape error NetSurf OS3
Post by: utri007 on July 27, 2016, 12:12:45 AM
Quote from: DNADNL;811692
I can't answer you, sry, but if you want I can give you the Datatypes I took from AmiKit (I created an Archive with the datatypes).


Thanks for the offering, but I already downloaded whole package.

Tested, didn't help. Nothing changed and AmiKit seems to use akJFIF wich I used already. Though now I got more advanced prefs program to it.
Title: Re: duktape error NetSurf OS3
Post by: chris on July 27, 2016, 12:21:52 AM
Quote from: utri007;811687
OK I need to test, but :

I don't have any color/display problems with  RTG system
Both machines have identigal OS install. I have old 2gb hard drive wich I use for OS installltion, actually just copy files from it. It has very Basic OS3.9 with BB1&2, magic menu and prism2v driver.

Chris what you think about this?


If you don't have P96 installed, then the pixel format is not relevant (likewise for OS4.1FE)

I just deleted the line about datatypes, but NetSurf uses internal decoders in preference so I'd be surprised if it made a difference. Actually I think I disabled the datatypes decoder on OS3 as the functions I was using didn't exist in the old datatypes.library.

Quote

Ealier today I tried Netsurf in HAM screen, it didn't change a thing. I ques HAM is not supported with guigfx and render libraries?


Intuition doesn't normally let you open HAM screens, ergo I've never tried running NetSurf on one.
Title: Re: duktape error NetSurf OS3
Post by: chris on July 27, 2016, 12:23:52 AM
The SSL thing I've seen before, the fix might have been related to ca-bundle, not sure.
Title: Re: duktape error NetSurf OS3
Post by: utri007 on July 27, 2016, 01:46:08 AM
Quote from: chris;811696


I just deleted the line about datatypes, but NetSurf uses internal decoders in preference so I'd be surprised if it made a difference. Actually I think I disabled the datatypes decoder on OS3 as the functions I was using didn't exist in the old datatypes.library.



Intuition doesn't normally let you open HAM screens, ergo I've never tried running NetSurf on one.


Actually datatypes seems to matter, I can made a changes with akJFIF pref program wich are visible in Netsurf. I can double check it tomorrow. Clock is now 03:45 here, so it is early Morning already.

It is simply trick to open workbench to HAM screen with this.  http://aminet.net/package/driver/moni/WBHacksAGA
Title: Re: duktape error NetSurf OS3
Post by: DNADNL on July 27, 2016, 04:25:03 AM
Quote from: utri007;811695
Thanks for the offering, but I already downloaded whole package.

Tested, didn't help. Nothing changed and AmiKit seems to use akJFIF wich I used already. Though now I got more advanced prefs program to it.


Did you reinstall NetSurf after "updating" the datatypes ? I had to do that, so the before-datatype Netsurf versions didn't work and the after-datatype versions did.

Quote from: chris;811696
If you don't have P96 installed, then the pixel format is not relevant (likewise for OS4.1FE)

I just deleted the line about datatypes, but NetSurf uses internal decoders in preference so I'd be surprised if it made a difference. Actually I think I disabled the datatypes decoder on OS3 as the functions I was using didn't exist in the old datatypes.library.

I didn't change anything else except this. So, I don't know, maybe Happiga don't have the (basic) datatypes you need for NetSurf... But I'll tell its designer to see if he can implement them.

Quote from: chris;811697
The SSL thing I've seen before, the fix might have been related to ca-bundle, not sure.

I also heard about AmiSSL. I wanted to install it on Happiga, but it seems there is no installer for... If you have a link or something else, I would gladly accept ^^
Title: Re: duktape error NetSurf OS3
Post by: chris on July 27, 2016, 09:19:05 AM
Quote from: DNADNL;811710
Did you reinstall NetSurf after "updating" the datatypes ? I had to do that, so the before-datatype Netsurf versions didn't work and the after-datatype versions did.


I didn't change anything else except this. So, I don't know, maybe Happiga don't have the (basic) datatypes you need for NetSurf... But I'll tell its designer to see if he can implement them.


It needs PNG for the splash and for the buttons.  The browser itself does not need DataTypes as all the usual filetypes are internal decoders.  Furthermore, on OS3 it cannot use them (for browsing) as the code is commented out. (http://git.netsurf-browser.org/netsurf.git/tree/frontends/amiga/gui.c#n5679)

Quote

I also heard about AmiSSL. I wanted to install it on Happiga, but it seems there is no installer for... If you have a link or something else, I would gladly accept ^^


It doesn't use AmiSSL, it has a static-linked OpenSSL.  Check through your SnoopDOS log and make sure it is reading the correct ca-bundle (Resources/ca-bundle)
Title: Re: duktape error NetSurf OS3
Post by: utri007 on July 27, 2016, 11:30:50 AM
Quote from: chris;811715
It needs PNG for the splash and for the buttons.  The browser itself does not need DataTypes as all the usual filetypes are internal decoders.  Furthermore, on OS3 it cannot use them (for browsing) as the code is commented out. (http://git.netsurf-browser.org/netsurf.git/tree/frontends/amiga/gui.c#n5679)


[edit]

Changes to Netsurf logo were because a lack of colors with AGA and changed background.

Changing jpg datatype settings doesn't change anything if netsurf logo is only jpg picture in screen.
Title: Re: duktape error NetSurf OS3
Post by: DNADNL on July 27, 2016, 04:33:36 PM
Quote from: chris;811715
It needs PNG for the splash and for the buttons.  The browser itself does not need DataTypes as all the usual filetypes are internal decoders.  Furthermore, on OS3 it cannot use them (for browsing) as the code is commented out. (http://git.netsurf-browser.org/netsurf.git/tree/frontends/amiga/gui.c#n5679)



It doesn't use AmiSSL, it has a static-linked OpenSSL.  Check through your SnoopDOS log and make sure it is reading the correct ca-bundle (Resources/ca-bundle)
OK, well, I think I'm going to reinstall Happiga to see if I did only this modification to work. I don't think I did anything else, but I prefer start from scratch to be sure. I'll check this out tomorrow.
For OpenSSL, I'll also see tomorrow. Maybe it lasts some SSL certificates, or it doesn't find the good ones, or they don't fit Happiga...
Title: Re: duktape error NetSurf OS3
Post by: chris on July 27, 2016, 04:52:40 PM
Sorry, going back a bit as I just remembered I meant to reply to this:

Quote from: DNADNL;811325
I suppose that's what you asked me before ! ^^


Actually, it wasn't.

If you get chance have a play around with some Duktape debug options and see if you can get any more output out of it:
http://www.amiga.org/forums/showpost.php?p=811184&postcount=82
Title: Re: duktape error NetSurf OS3
Post by: DNADNL on July 28, 2016, 06:09:22 PM
OK, I reinstalled Happiga into my SD card and I confirm : it's not the datatypes. Mea culpa ! ^^ I don't know how, but it fixed down ! ^^
Well, I'm trying te recompile another NetSurf version, to be sure I don't have a special one. @chris, did you do some modifications on the NetSurf files during the week ? Maybe it could explain this...
Title: Re: duktape error NetSurf OS3
Post by: DNADNL on July 28, 2016, 06:37:51 PM
Sorry for double post !
Quote from: chris;811715
It doesn't use AmiSSL, it has a static-linked OpenSSL.  Check through your SnoopDOS log and make sure it is reading the correct ca-bundle (Resources/ca-bundle)
Trying to access YouTube (with a SSL certificate) :
(http://puu.sh/qhDvX/faf1949270.jpg)

Doesn't work, yet it can read the ca-bundle...
Title: Re: duktape error NetSurf OS3
Post by: DNADNL on July 28, 2016, 07:22:37 PM
Quote from: chris;811184
duk_custom.h is where the lines should be added:
#define DUK_USE_DEBUG
#define DUK_USE_DEBUG_LEVEL 0

However I'm not getting any extra debug, so there's something wrong somewhere (DEBUG_LEVEL goes up to 2... still nothing)
Ok, I added those lines to duk_custom.h. I compile right now and I'll tell you if I got more things.

EDIT : Aha ! I know why OpenSSL doesn't work ! It looks for it in /opt/netsurf (the folder containing the toolchains files during the compilation), and not in progdir. moreover in Happiga there is no /opt (Picture here : http://puu.sh/qhFts/cba4df7790.jpg (http://puu.sh/qhFts/cba4df7790.jpg))
I think a link is missing there, or something like that.

EDIT 2 : No more info... here the SnoopDOS pictures :
http://puu.sh/qhGhU/de31495fdd.jpg (http://puu.sh/qhGhU/de31495fdd.jpg)
http://puu.sh/qhGkR/0c276b38fa.jpg (http://puu.sh/qhGkR/0c276b38fa.jpg)
http://puu.sh/qhGnJ/a02d637dd9.jpg (http://puu.sh/qhGnJ/a02d637dd9.jpg)
http://puu.sh/qhGqZ/d9ced8c0b1.jpg (http://puu.sh/qhGqZ/d9ced8c0b1.jpg)

EDIT 3 : Sorry for triple post ! ^^
Title: Re: duktape error NetSurf OS3
Post by: chris on July 28, 2016, 07:24:59 PM
Quote from: DNADNL;811771
OK, I reinstalled Happiga into my SD card and I confirm : it's not the datatypes. Mea culpa ! ^^ I don't know how, but it fixed down ! ^^
Well, I'm trying te recompile another NetSurf version, to be sure I don't have a special one. @chris, did you do some modifications on the NetSurf files during the week ? Maybe it could explain this...


There have been a few changes this week, see: http://git.netsurf-browser.org/netsurf.git/log/

Personally I fixed one buffer overwrite which would only have been an issue when trying to access something like "file:///ram", but one of the other changes might have inadvertently solved your problem.

Quote from: DNADNL;811772
Trying to access YouTube (with a SSL certificate) :
(http://puu.sh/qhDvX/faf1949270.jpg)

Doesn't work, yet it can read the ca-bundle...


It says it is reading it, but NetSurf clearly doesn't like it.  Is ca-bundle OK?  Try replacing it with https://curl.haxx.se/ca/cacert.pem.  You might find the current file is just a text string. :)
Title: Re: duktape error NetSurf OS3
Post by: DNADNL on July 28, 2016, 07:33:27 PM
Oh, in fact, I talked with Tygre who told me he managed to launch DukTape alone and NetSurf alone on his emulator. So, that means the binding doesn't work. Maybe the DukTape issue comes from there. He told me to look nsgenbind/test/data/bindings/browser-duk.bnd and nsgenbind/src/nsgenbind.c (NetScript downloads these files to compile NetSurf). I don't know if it can be useful and if it can help, I'm going to see in, but I prefer to warn you, just in case you would like to see...
Title: Re: duktape error NetSurf OS3
Post by: DNADNL on July 28, 2016, 07:41:42 PM
Quote from: chris;811774
There have been a few changes this week, see: http://git.netsurf-browser.org/netsurf.git/log/

Personally I fixed one buffer overwrite which would only have been an issue when trying to access something like "file:///ram", but one of the other changes might have inadvertently solved your problem.



It says it is reading it, but NetSurf clearly doesn't like it.  Is ca-bundle OK?  Try replacing it with https://curl.haxx.se/ca/cacert.pem.  You might find the current file is just a text string. :)
No, I just tried and I've got the same issue... maybe this /opt/netsurf point could explain the fact that doesn't work. Maybe I have to install SSLroot, OpenSSL or something like that ?

EDIT : Yay, 42 posts ! Great ! ^^
Title: Re: duktape error NetSurf OS3
Post by: utri007 on July 28, 2016, 08:50:18 PM
I'm interested. Is it a version wich is downloadable from your github?
Title: Re: duktape error NetSurf OS3
Post by: chris on July 28, 2016, 09:43:10 PM
Quote from: DNADNL;811778
No, I just tried and I've got the same issue... maybe this /opt/netsurf point could explain the fact that doesn't work. Maybe I have to install SSLroot, OpenSSL or something like that ?

EDIT : Yay, 42 posts ! Great ! ^^


I don't think so, as the missing file is just a config file.

Quote from: DNADNL;811776
Oh, in fact, I talked with Tygre who told me he managed to launch DukTape alone and NetSurf alone on his emulator. So, that means the binding doesn't work. Maybe the DukTape issue comes from there. He told me to look nsgenbind/test/data/bindings/browser-duk.bnd and nsgenbind/src/nsgenbind.c (NetScript downloads these files to compile NetSurf). I don't know if it can be useful and if it can help, I'm going to see in, but I prefer to warn you, just in case you would like to see...


It *could* be in the generated output, I doubt the problem is with nsgenbind as that gets compiled for the host, not for AmigaOS.

My current suspicion is content/handlers/javascript/dukky.c
Title: Re: duktape error NetSurf OS3
Post by: DNADNL on July 29, 2016, 03:17:44 AM
Quote from: utri007;811782
I'm interested. Is it a version wich is downloadable from your github?

Yes, here is my GitHub link : https://github.com/DNADNL/NetScript
You will find the link to downloas NetSurf for AmigaOS3 in the README, in the "Important information" part.

Quote from: chris;811785
I don't think so, as the missing file is just a config file.


Oh, OK. So, that might not cause the issue. I looked on AmiKit and it uses OpenSSL (SSLRoot) to get the config file, so I tried to installed it, but it doesn't seem to work...

Quote from: chris;811785
It *could* be in the generated output, I doubt the problem is with nsgenbind as that gets compiled for the host, not for AmigaOS.

My current suspicion is content/handlers/javascript/dukky.c

OK, I'll both have a look at those files. I don't know if I'll find something, but we don't know ! ^^
Title: Re: duktape error NetSurf OS3
Post by: apj on July 29, 2016, 10:08:42 AM
Quote from: DNADNL;811795
I looked on AmiKit and it uses OpenSSL (SSLRoot) to get the config file, so I tried to installed it, but it doesn't seem to work...

It works, i've just tried. You need to add these lines to user-startup
Assign >NIL: SSLROOT: SYS:Internet/AmiSSL/SSLROOT
Assign >NIL: SSLCERTS: SSLROOT:certs
Assign >NIL: SSLPRIVATE: SSLROOT: private  

Tested on AmiKit.

@Chris

Compiled my version with -m68020 and this works without fpu too.
(-m68020-60 doesn't).
Title: Re: duktape error NetSurf OS3
Post by: chris on July 29, 2016, 11:56:26 AM
Quote from: apj;811799
Compiled my version with -m68020 and this works without fpu too.
(-m68020-60 doesn't).


Cool, thanks.
Title: Re: duktape error NetSurf OS3
Post by: chris on July 29, 2016, 11:59:00 AM
Quote from: DNADNL;811795
OK, I'll both have a look at those files. I don't know if I'll find something, but we don't know ! ^^


It's getting to the point where adding extra logging might be the only way to figure it out.

LOG("blah blah blah")
Then run with -v
Title: Re: duktape error NetSurf OS3
Post by: DNADNL on July 29, 2016, 03:30:29 PM
Quote from: apj;811799
It works, i've just tried. You need to add these lines to user-startup
Assign >NIL: SSLROOT: SYS:Internet/AmiSSL/SSLROOT
Assign >NIL: SSLCERTS: SSLROOT:certs
Assign >NIL: SSLPRIVATE: SSLROOT: private  

Tested on AmiKit.

Thanks apj ! where is the user-startup file you talk about ?
Also, Netsurf works on AmiKit, even the OpenSSL. The problem is on Happiga (The Amiga distribution for Raspberry Pi), which is quite different.

Quote from: chris;811802
It's getting to the point where adding extra logging might be the only way to figure it out.

LOG("blah blah blah")
Then run with -v

Ok, I'm going to try this.
Title: Re: duktape error NetSurf OS3
Post by: utri007 on July 29, 2016, 04:07:41 PM
Quote from: DNADNL;811806
Thanks apj ! where is the user-startup file you talk about ?


System:S/ has most startup scripts, like startup-sequence and user-startup
Title: Re: duktape error NetSurf OS3
Post by: utri007 on July 29, 2016, 04:31:56 PM
Amiga.org's red problem is not  gone. But I noticed that majority of display / color problems are because of lack of colors. Opening Netsurf it's own screen makes Netsurf default start page looking good as it should be.

Could it be that DNADNL just opened it to own screen and noticed that it looks good?

Wich makes me wonder would render.library support HAM?
Title: Re: duktape error NetSurf OS3
Post by: chris on July 29, 2016, 04:46:10 PM
Quote from: utri007;811809
Wich makes me wonder would render.library support HAM?


It does, as does guigfx, but I don't know how/if NetSurf would handle it.
Title: Re: duktape error NetSurf OS3
Post by: DNADNL on July 29, 2016, 04:48:55 PM
Quote from: utri007;811809
Amiga.org's red problem is not  gone. But I noticed that majority of display / color problems are because of lack of colors. Opening Netsurf it's own screen makes Netsurf default start page looking good as it should be.

Could it be that DNADNL just opened it to own screen and noticed that it looks good?

Wich makes me wonder would render.library support HAM?
I can't tell you for Amiga.org, as it seems I don't have enough RAM to access it, but I went to the page I created for the tests and the whole pictures you can find on it are well displayed (the expected pictures, of course, so GIF, PNG, JPEG and ICO). So, I don't think it's only the welcome page which has changed.
Thanks for the user-startup location, I'll have a look.
Title: Re: duktape error NetSurf OS3
Post by: utri007 on July 29, 2016, 05:32:54 PM
Quote from: DNADNL;811812
I can't tell you for Amiga.org, as it seems I don't have enough RAM to access it, but I went to the page I created for the tests and the whole pictures you can find on it are well displayed (the expected pictures, of course, so GIF, PNG, JPEG and ICO). So, I don't think it's only the welcome page which has changed.
Thanks for the user-startup location, I'll have a look.


Tried to create new thread to eab with Netsurf.

I can log on, start new thread, I can start to write text, but after I hit return and continue writing, every mark I try to wrote makes this error :

Assertion of condition "perror == parseutil_ok" failed file "utils/utf8.c", line 135.

Why is it so that error is because of true type fonts?

DNADNL

I'm running FBlit wich is small patch wich forces bitmaps to use FAST ram. There is only 2mb CHIP memory, wich is used Amiga custom chips. FBlit solves this problem.

So, I just tried my A1200 without FBlit and Amiga.org works, there is enough memory for that. You must have a background picture or something wich eats your emulated A1200 chip ram. After loading amiga.org there is a 300kb free chip ram. I needed to disable background picture.
Title: Re: duktape error NetSurf OS3
Post by: chris on July 29, 2016, 06:06:58 PM
Quote from: utri007;811814
Assertion of condition "perror == parseutil_ok" failed file "utils/utf8.c", line 135.


Almost certainly related to the horrid text layout routines which always cause me problems.

Please feel free to fix them.
Title: Re: duktape error NetSurf OS3
Post by: DNADNL on July 29, 2016, 06:24:41 PM
Quote from: utri007;811814
Tried to create new thread to eab with Netsurf.

I can log on, start new thread, I can start to write text, but after I hit return and continue writing, every mark I try to wrote makes this error :

Assertion of condition "perror == parseutil_ok" failed file "utils/utf8.c", line 135.

Why is it so that error is because of true type fonts?

DNADNL

I'm running FBlit wich is small patch wich forces bitmaps to use FAST ram. There is only 2mb CHIP memory, wich is used Amiga custom chips. FBlit solves this problem.

So, I just tried my A1200 without FBlit and Amiga.org works, there is enough memory for that. You must have a background picture or something wich eats your emulated A1200 chip ram. After loading amiga.org there is a 300kb free chip ram. I needed to disable background picture.

Did NetSurf ask you to run FixFonts when you installed it ? Maybe the issue can come from the fact it doesn't ask yo to run it.

Even if I remove the background, that doesn't work.
FBlit, you say ? This one : http://aminet.net/package/util/boot/fblit ? OK, I'm going to check this out.
EDIT : When I launch FBlit, the system crashes ! ^^
Title: Re: duktape error NetSurf OS3
Post by: utri007 on July 29, 2016, 07:01:40 PM
Quote from: chris;811816
Almost certainly related to the horrid text layout routines which always cause me problems.

Please feel free to fix them.


I do feel free to fix them, but unfortunately I'm not capable for that. ;)
Title: Re: duktape error NetSurf OS3
Post by: utri007 on July 29, 2016, 07:17:57 PM
Quote from: DNADNL;811817

Even if I remove the background, that doesn't work.
FBlit, you say ? This one : http://aminet.net/package/util/boot/fblit ? OK, I'm going to check this out.
EDIT : When I launch FBlit, the system crashes ! ^^


How much ram you have total? How much when you get to OS?

I didn't say FBlit that you should try it. I'm prety sure that it doesn't work with emulatos, it hits hardware directly.
Title: Re: duktape error NetSurf OS3
Post by: DNADNL on July 29, 2016, 07:40:08 PM
Quote from: utri007;811821
How much ram you have total? How much when you get to OS?

I didn't say FBlit that you should try it. I'm prety sure that it doesn't work with emulatos, it hits hardware directly.
I'm on a Raspberry Pi 2, so basically 1GB RAM,
For Happiga, I think its 128 MB, but I'm not sure about it. Here are the data : http://puu.sh/qiSe2/2266414bfe.jpg (http://puu.sh/qiSe2/2266414bfe.jpg)
Title: Re: duktape error NetSurf OS3
Post by: utri007 on July 29, 2016, 08:20:18 PM
Quote from: DNADNL;811822
I'm on a Raspberry Pi 2, so basically 1GB RAM,
For Happiga, I think its 128 MB, but I'm not sure about it. Here are the data : http://puu.sh/qiSe2/2266414bfe.jpg (http://puu.sh/qiSe2/2266414bfe.jpg)


You have 8mb chip ram :O and it doesn't work?????
Title: Re: duktape error NetSurf OS3
Post by: DNADNL on July 29, 2016, 08:30:54 PM
Quote from: utri007;811823
You have 8mb chip ram :O and it doesn't work?????
Yeah, quite weird, huh ? ^^
I don't know why, really. I can see in NetSurf parameters that memory_cache_size is equal to 12 MB. i tried to put it to 8MB byt this doesn't work too.
Title: Re: duktape error NetSurf OS3
Post by: DNADNL on July 29, 2016, 09:25:16 PM
OK, I launched NetSurf on AmiKit with lots of printf in the dukky.c file and used SnoopDOS to scan NetSurf activity. I didn't find anything different since the last time I did this but for the first time, two specific rows appeared in the SnoopDOS.log  ( | = new column):
DOpus5: DirectoryOp | Open | dopus5:system/seed | Write | OK
DOpus5: DirectoryOp | *Open | dopus5:system/seed | Write | OK

I don't know if it can help, but I prefer to say it.
Title: Re: duktape error NetSurf OS3
Post by: chris on July 29, 2016, 09:50:15 PM
Quote from: DNADNL;811825
OK, I launched NetSurf on AmiKit with lots of printf in the dukky.c file and used SnoopDOS to scan NetSurf activity. I didn't find anything different since the last time I did this but for the first time, two specific rows appeared in the SnoopDOS.log  ( | = new column):
DOpus5: DirectoryOp | Open | dopus5:system/seed | Write | OK
DOpus5: DirectoryOp | *Open | dopus5:system/seed | Write | OK

I don't know if it can help, but I prefer to say it.


Did the printf()s not print anything?

Did you put them at the start of every function in that file?
Title: Re: duktape error NetSurf OS3
Post by: DNADNL on July 29, 2016, 09:59:25 PM
Quote from: chris;811826
Did the printf()s not print anything?

Did you put them at the start of every function in that file?
In fact, I replaced first the LOGs on the file by printf()s to see if there was a difference, but nothing appeared.
Title: Re: duktape error NetSurf OS3
Post by: DNADNL on July 29, 2016, 10:12:19 PM
Hey, I can see this in the AmiKit output :
content/handlers/javascript/duktape/dukky;c:565 js_newcontext: Creating new duktape javascript content
FATAL 56: uncaught error

So, that means the error come after this LOG, in this function, right ?
Title: Re: duktape error NetSurf OS3
Post by: chris on July 29, 2016, 10:24:09 PM
Quote from: DNADNL;811827
In fact, I replaced first the LOGs on the file by printf()s to see if there was a difference, but nothing appeared.

OK, the LOG()s will print when you run "NetSurf -v". I've already done that :)
Title: Re: duktape error NetSurf OS3
Post by: chris on July 29, 2016, 10:26:10 PM
Quote from: DNADNL;811828
Hey, I can see this in the AmiKit output :
content/handlers/javascript/duktape/dukky;c:565 js_newcontext: Creating new duktape javascript content
FATAL 56: uncaught error

So, that means the error come after this LOG, in this function, right ?


Probably, yes.
Title: Re: duktape error NetSurf OS3
Post by: DNADNL on July 29, 2016, 10:34:25 PM
Quote from: chris;811830
Probably, yes.
Yay ! step by step we'll find the problem !
I added a LOG on EVERY row of the function, and now I can see the issue come from this line :
ctx = ret->ctx = duk_create_heap(
      dukky_alloc_function,
      dukky_realloc_function,
      dukky_free_function,
      ret,
      NULL);
(or from the if below : if (ret->ctx == NULL) , but I don't think so).
So maybe the issue comes from duk_create_heap, no ?
Title: Re: duktape error NetSurf OS3
Post by: wawrzon on July 29, 2016, 10:47:25 PM
@dnadnl

im looking at your script. i have a proposition. could you make installing cygwin optional in future versions? as well as downloading and installation of packages should be available as option the user should be perhaps presented to confirm, after the script checked for required version of particular package and found it missing.

i intend to check how it works on my debian and ubuntu build environments. i may try to implement it myself and send you a diff, but ill probably start with commenting out the unnecessary sections.
Title: Re: duktape error NetSurf OS3
Post by: chris on July 30, 2016, 12:02:45 AM
Quote from: DNADNL;811832
Yay ! step by step we'll find the problem !
I added a LOG on EVERY row of the function, and now I can see the issue come from this line :
ctx = ret->ctx = duk_create_heap(
      dukky_alloc_function,
      dukky_realloc_function,
      dukky_free_function,
      ret,
      NULL);
(or from the if below : if (ret->ctx == NULL) , but I don't think so).
So maybe the issue comes from duk_create_heap, no ?


Looks like it, yes.

So... maybe logging in that function next? (it's probably in duktape.c - You'll need to #include "utils/log.h")
It *could* be that it doesn't like the alloc/realloc/free functions being passed to it. I suppose we'll find that out anyway.
Title: Re: duktape error NetSurf OS3
Post by: DNADNL on July 30, 2016, 06:16:54 AM
Quote from: wawrzon;811834
@dnadnl

im looking at your script. i have a proposition. could you make installing cygwin optional in future versions? as well as downloading and installation of packages should be available as option the user should be perhaps presented to confirm, after the script checked for required version of particular package and found it missing.

i intend to check how it works on my debian and ubuntu build environments. i may try to implement it myself and send you a diff, but ill probably start with commenting out the unnecessary sections.


You mean to create a UNIX/Linux version of NetScript ? Yeah, it's possible, and I think EyMenZ worked on this before. I will check his previous files.
However, I think it will be first a different Netscript version, as it could be difficult to install cygwin via a script which need cygwin to be executed ! ^^
I don't have a Debian/Ubuntu distribution for the moment, and I only have one SD Card for the Raspberry Pi (on which I have Happiga), but maybe a virtual machine could do the job...

Quote from: chris;811837
Looks like it, yes.
So... maybe logging in that function next? (it's probably in duktape.c - You'll need to #include "utils/log.h")
It *could* be that it doesn't like the alloc/realloc/free functions being passed to it. I suppose we'll find that out anyway.

Yes ! I'm happy to finally progress ! ^^
I'll go on the files LOG-ification (neologism ^^) to finally flush out the DukTape mystery... ^^
Title: Re: duktape error NetSurf OS3
Post by: wawrzon on July 30, 2016, 08:24:30 AM
@dnadnl
no worries, i have been playing around with it at night, just must see how to properly get around that autotools version issue, also i think either one needs to install the toolchain beforehand or resign on putting it in /opt and use the user accessible location.

but it isnt pressing at all. perhaps it isnt a bad idea at all to actually employ cygwin here.
Title: Re: duktape error NetSurf OS3
Post by: DNADNL on July 30, 2016, 06:19:54 PM
Quote from: wawrzon;811855
@dnadnl
no worries, i have been playing around with it at night, just must see how to properly get around that autotools version issue, also i think either one needs to install the toolchain beforehand or resign on putting it in /opt and use the user accessible location.

but it isnt pressing at all. perhaps it isnt a bad idea at all to actually employ cygwin here.
Can you explain the autotools version issue you talk about ? Because NetScript works on many computers at work except one. I don't know why, but one day it decided to break down ! ^^ In fact, it doesn't come up to install cygwin tools (it says he has installed wget, but afterwards it can't use it... I deinstall/reinstall many times cygwin to try to solve the problem but it doesn't work... :-( But maybe it's specific to my computer.

the /opt/netsurf folder is very long to compile (about an hour, I think), so it's quite important to have the possibility to keep it. Except that, its location isn't important. however, if you move it, you need to do lots of links in the script which can be difficult to find. Also, is it a good idea to put it in the accessible location ? Because people could inadvertently delete it... Well, there is a lot to think ! ^^
Title: Re: duktape error NetSurf OS3
Post by: wawrzon on July 31, 2016, 12:52:13 AM
i think you must know the issue, since your script exclusively tries to relink to autom4te 2.64 instead, as far as i have brought into my experience, today usual 2.69.

im sorry, i have not looked into that further. been busy trying to get rid of some compiling issues on aros68k, i am looking forward to having odyssey web browser compiled there for 68k. ;) but ill try to contribute to this effort as much as i able too as well.

btw. do i understand well, that the restriction is due to one machine? so i can try to employ any autom4te set i have installed? since i dont remember that problem installing netsurf toolchain by hand..
Title: Re: duktape error NetSurf OS3
Post by: chris on July 31, 2016, 02:37:44 PM
A-ha!  Managed to get Duktape debug working with a #define DUK_USE_DPRINT.

Don't really understand the output though, and there's a ton of it.

Line 57817 of duktape.c: (duk_js_compiler.c:442)
Code: [Select]
if (expect >= 0 && comp_ctx->curr_token.t != expect) {
DUK_D(DUK_DPRINT(&quot;parse error: expect=%ld, got=%ld&quot;,
                (long) expect, (long) comp_ctx->curr_token.t));
DUK_ERROR_SYNTAX(thr, DUK_STR_PARSE_ERROR);
}

expect=50, curr_token.t=1

Hmm, I run it again with DUK_USE_DDPRINT and it fails in a different place.  I think this might be Duktape memory being trashed, and as it happened to Artur with clib2 too, maybe it is clib trashing memory?
Title: Re: duktape error NetSurf OS3
Post by: DNADNL on July 31, 2016, 04:36:38 PM
Quote from: wawrzon;811889
i think you must know the issue, since your script exclusively tries to relink to autom4te 2.64 instead, as far as i have brought into my experience, today usual 2.69.

im sorry, i have not looked into that further. been busy trying to get rid of some compiling issues on aros68k, i am looking forward to having odyssey web browser compiled there for 68k. ;) but ill try to contribute to this effort as much as i able too as well.

btw. do i understand well, that the restriction is due to one machine? so i can try to employ any autom4te set i have installed? since i dont remember that problem installing netsurf toolchain by hand..
Yes, the problem is only on one computer, and I think you can use any autom4te.

You're right, maybe the issue comes from autom4te, but if it's the case, why do I not have a problem with the other computers, as they use the same NetScript and so the same autom4te to work ? ... Mystery ! ^^

I would be interested in your work on Odyssey, as I wanted to do quite like NetScript but for Odyssey. Is the Big-Endian problem solved ?
Title: Re: duktape error NetSurf OS3
Post by: DNADNL on July 31, 2016, 04:41:11 PM
Quote from: chris;811904
A-ha!  Managed to get Duktape debug working with a #define DUK_USE_DPRINT.

Don't really understand the output though, and there's a ton of it.

Line 57817 of duktape.c: (duk_js_compiler.c:442)
Code: [Select]
if (expect >= 0 && comp_ctx->curr_token.t != expect) {
DUK_D(DUK_DPRINT(&quot;parse error: expect=%ld, got=%ld&quot;,
                (long) expect, (long) comp_ctx->curr_token.t));
DUK_ERROR_SYNTAX(thr, DUK_STR_PARSE_ERROR);
}

expect=50, curr_token.t=1

Hmm, I run it again with DUK_USE_DDPRINT and it fails in a different place.  I think this might be Duktape memory being trashed, and as it happened to Artur with clib2 too, maybe it is clib trashing memory?
Sorry, we can't see anything in your attached thumbnail. BTW, I don't know how to do this (attached thumbnail) when writing a post. ^^
I'll go on the LOG way to see if it brings me to the same part of the code.
Title: Re: duktape error NetSurf OS3
Post by: utri007 on July 31, 2016, 05:52:34 PM
If clib/clib2 are trashing memory also with ducktape, there is three options :

1. Get support from Olsen as he is maintainer of clib. He has already hinted to his will to help.
2. Compile it against libnix like wawrzon suggested. Wich could be usefull test anyway? Of course depending how much additional work it would cause?
3. Write own memory system to Netsurf / Ducktape.
Title: Re: duktape error NetSurf OS3
Post by: chris on July 31, 2016, 07:20:12 PM
Quote from: DNADNL;811910
Sorry, we can't see anything in your attached thumbnail.


Yes, I know, that's why I typed out the relevant bit.

Quote

I'll go on the LOG way to see if it brings me to the same part of the code.


Good plan.
Title: Re: duktape error NetSurf OS3
Post by: chris on July 31, 2016, 07:24:52 PM
Quote from: utri007;811912
If clib/clib2 are trashing memory also with ducktape, there is three options :

1. Get support from Olsen as he is maintainer of clib. He has already hinted to his will to help.
2. Compile it against libnix like wawrzon suggested. Wich could be usefull test anyway? Of course depending how much additional work it would cause?
3. Write own memory system to Netsurf / Ducktape.


1. That is the intention once I have enough information to sensibly report the problem.
2. Hassle, but might be necessary to (dis)prove the cause.
3. Unlikely to fix this particular problem.
Title: Re: duktape error NetSurf OS3
Post by: wawrzon on August 01, 2016, 12:32:43 AM
Quote from: chris;811915
1. That is the intention once I have enough information to sensibly report the problem.
2. Hassle, but might be necessary to (dis)prove the cause.
3. Unlikely to fix this particular problem.

ad2. i would first link against bernds ixemul6x.x. this lib will almost certainly contain all linux functions you might miss with libnix. especially that arturs netsurf can be built with both ixemul and libnix. after all, its only frontend that differs, and why would reaction fronend depend on anything more linux than an sdl port? so it shouldnt be that much hassle in the final analysys.

ad3. you might rip the memory allocator out of the bernds ixemul..
Title: Re: duktape error NetSurf OS3
Post by: DNADNL on August 01, 2016, 04:05:15 PM
Aw, I wanted to go on LOG-ing everything, but for this I need to compile regularly NetSurf with DukTape. Unfortunately, i can't now, it seems there is an issue :

Code: [Select]
make: *** [Makefile:809: build-CYGWIN_NT_6_1_WOW-amigaos3/content_handlers_javascript_duktape_dukky.o] Error 1
According to the Git log, it doesn't come from the toolchains but maybe from some changes done Yesterday or the day before...
Though, I can't go on :-(

EDIT :
Meanwhile, I try to follow the tracks manuallly, and I can see in duktape.h this :

Code: [Select]
DUK_EXTERNAL_DECL
duk_context *duk_create_heap(duk_alloc_function alloc_func,
                             duk_realloc_function realloc_func,
                             duk_free_function free_func,
                             void *heap_udata,
                             duk_fatal_function fatal_handler);
DUK_EXTERNAL_DECL void duk_destroy_heap(duk_context *ctx);

#define duk_create_heap_default() \
duk_create_heap(NULL, NULL, NULL, NULL, NULL)

Could the default duk_create_heap cause this issue ?

EDIT 2 :
I've just thought about this : NetSurf has RAM issues/leaks without DukTape, and it seems DukTape has this issue too. So maybe when we combine the RAM issues of both NetSurf and DukTape, the leak is so high that NetSurf is crashing before its launch. Without DukTape, NetSurf can be launched, but at a moment, it says "not enough memory". So maybe be focused only on DukTape memory leak isn't the best solution, is it ?

EDIT 3 (#ILoveEditingMyself) :
Is it normal than in dukky.c the "duk_create_heap" function called isn't a pointer while in duktape.c/duktape.h, "duk_create_heap" is defined as a pointer ("*duk_create_heap") ? Maybe the issue comes from there ! I think we need a * in dukky.c .
Title: Re: duktape error NetSurf OS3
Post by: chris on August 01, 2016, 05:57:15 PM
Quote from: DNADNL;811952
Aw, I wanted to go on LOG-ing everything, but for this I need to compile regularly NetSurf with DukTape. Unfortunately, i can't now, it seems there is an issue :

Code: [Select]
make: *** [Makefile:809: build-CYGWIN_NT_6_1_WOW-amigaos3/content_handlers_javascript_duktape_dukky.o] Error 1

The output immediately prior to that might be more useful.

Quote
Could the default duk_create_heap cause this issue ?

No.  I tried reverting to the default one and the result was the same (unsurprising, given the replacement functions are more robust versions).

Quote
EDIT 2 :
I've just thought about this : NetSurf has RAM issues/leaks without DukTape, and it seems DukTape has this issue too. So maybe when we combine the RAM issues of both NetSurf and DukTape, the leak is so high that NetSurf is crashing before its launch. Without DukTape, NetSurf can be launched, but at a moment, it says "not enough memory". So maybe be focused only on DukTape memory leak isn't the best solution, is it ?

I've not seen the leak that bad, in fact I'm not sure it's leaking so much as overwriting memory it shouldn't be.

Maybe we need to run something like MemGuard (but an OS3 equivalent, so MuGuardianAngel probably) and see where it crashes?

I did have a problem involving lists in an early version with memory being overwritten only on OS3.  I suspect the current problem is somewhat similar.

I think you're right that it is the combined effects, because NetSurf alone works, and Duktape alone works.

Quote
EDIT 3 (#ILoveEditingMyself) :
Is it normal than in dukky.c the "duk_create_heap" function called isn't a pointer while in duktape.c/duktape.h, "duk_create_heap" is defined as a pointer ("*duk_create_heap") ? Maybe the issue comes from there ! I think we need a * in dukky.c .

The * is part of the return type - it returns a pointer.  No star required when calling the function.
Title: Re: duktape error NetSurf OS3
Post by: DNADNL on August 01, 2016, 06:23:22 PM
Quote from: chris;811953
The output immediately prior to that might be more useful.

If i understood well, here is the steps before the issue (see the txt file enclosed).

Quote from: chris;811953
I've not seen the leak that bad, in fact I'm not sure it's leaking so much as overwriting memory it shouldn't be.

Maybe we need to run something like MemGuard (but an OS3 equivalent, so MuGuardianAngel probably) and see where it crashes?

I did have a problem involving lists in an early version with memory being overwritten only on OS3.  I suspect the current problem is somewhat similar.

I think you're right that it is the combined effects, because NetSurf alone works, and Duktape alone works.

Yes, so either it's the link between them which doesn't work or when there are combined, they leak too much memory... or maybe both.

Quote from: chris;811953
The * is part of the return type - it returns a pointer.  No star required when calling the function.
OK, I preferred to ask than to stay ignorant ! ^^
Title: Re: duktape error NetSurf OS3
Post by: DNADNL on August 01, 2016, 07:00:26 PM
OK, here is the compilation issue, more specifically :
Code: [Select]
content/handlers/javascript/duktape/dukky.c:580: error: syntax error before &quot;if&quot;

OK, that comes from the file I use to replace dukky.c, sorry ! XD
Title: Re: duktape error NetSurf OS3
Post by: chris on August 01, 2016, 07:01:17 PM
Quote from: DNADNL;811954
If i understood well, here is the steps before the issue (see the txt file enclosed).


Code: [Select]
content/handlers/javascript/duktape/dukky.c: In function `js_newcontext':
content/handlers/javascript/duktape/dukky.c:580: error: syntax error before &quot;if&quot;


Have a look at line 580 in content/handlers/javascript/duktape/dukky.c.  There's something odd before the "if".  Usually it means there's no semicolon at the end of line 579!

Quote
Yes, so either it's the link between them which doesn't work or when there are combined, they leak too much memory... or maybe both.


Yep.
Title: Re: duktape error NetSurf OS3
Post by: DNADNL on August 01, 2016, 07:03:55 PM
Quote from: chris;811957
Code: [Select]
content/handlers/javascript/duktape/dukky.c: In function `js_newcontext':
content/handlers/javascript/duktape/dukky.c:580: error: syntax error before &quot;if&quot;

Have a look at line 580 in content/handlers/javascript/duktape/dukky.c.  There's something odd before the "if".  Usually it means there's no semicolon at the end of line 579!



Yep.
Yes, that was my bad, sorry. ^^
Title: Re: duktape error NetSurf OS3
Post by: DNADNL on August 01, 2016, 08:20:38 PM
Is it normal this part of code is in a do while loop with the condition (0) ?
Code: [Select]
#if defined(DUK_USE_COMPUTED_NAN)
do {
/* Workaround for some exotic platforms where NAN is missing
* and the expression (0.0 / 0.0) does NOT result in a NaN.
* Such platforms use the global 'duk_computed_nan' which must
* be initialized at runtime.  Use 'volatile' to ensure that
* the compiler will actually do the computation and not try
* to do constant folding which might result in the original
* problem.
*/
volatile double dbl1 = 0.0;
volatile double dbl2 = 0.0;
duk_computed_nan = dbl1 / dbl2;
} while (0);

EDIT : It seems there are two DUK_INTERNAL void duk_hthread_create_builtin_objects(duk_hthread *thr) functins in duktape.c . Is it normal ?
Title: Re: duktape error NetSurf OS3
Post by: chris on August 01, 2016, 10:18:16 PM
Quote from: DNADNL;811962
Is it normal this part of code is in a do while loop with the condition (0) ?
[...]
EDIT : It seems there are two DUK_INTERNAL void duk_hthread_create_builtin_objects(duk_hthread *thr) functins in duktape.c . Is it normal ?


If you haven't changed it, yes.
Title: Re: duktape error NetSurf OS3
Post by: DNADNL on August 01, 2016, 10:19:46 PM
Quote from: chris;811971
If you haven't changed it, yes.
Very good answer ! ^^
Title: Re: duktape error NetSurf OS3
Post by: DNADNL on August 01, 2016, 11:32:17 PM
HEY, I'VE FOUND SOMETHING !
As I can see, there is a unending loop in duktape.c ! Yahoo !
Here is the NetSurf logged : https://dl.dropboxusercontent.com/u/101212919/NetSurf%20AmigaOS/BUGGINGNetSurf_3.6dev_AmigaOS3.tar
Take it, and launch it into Amikit with -v for example.

EDIT :
Here is the picture : https://dl.dropboxusercontent.com/u/101212919/NetSurf%20AmigaOS/Loop%20Error.png (https://dl.dropboxusercontent.com/u/101212919/NetSurf%20AmigaOS/Loop%20Error.png)
It's in the DUK_INTERNAL void duk_hthread_create_builtin_objects(duk_hthread *thr) function (the big one, not the other).
I'm exhausted with all these LOGs, but so happy I've found something !
Title: Re: duktape error NetSurf OS3
Post by: chris on August 02, 2016, 02:55:12 PM
Quote from: DNADNL;811978
HEY, I'VE FOUND SOMETHING !
As I can see, there is a unending loop in duktape.c ! Yahoo !


Are you sure it is looping?  With my much reduced logging it took ages for NetSurf to start up.  I'd expect the looping to stop and the fatal error to print eventually.
Title: Re: duktape error NetSurf OS3
Post by: DNADNL on August 02, 2016, 03:52:06 PM
Quote from: chris;811996
Are you sure it is looping?  With my much reduced logging it took ages for NetSurf to start up.  I'd expect the looping to stop and the fatal error to print eventually.
I'm not totally sure, but I can see that, when I launch a NetSurf version without duktape.c totally LOGged, The FATAL 56 appears in 3 seconds approx. , and when I launch the totally LOGged one, It takes approx 300 seconds to appear, and the issue doesn't apprear before.
I think it could be good to have a look at this function.

EDIT : I correct, with the totally LOGged version it doesn't stop. I think I unintentionnaly stopped it when I took a screenshot.
EDIT 2 : I correct again, with the totally LOGged version, it stops whenever it wants ! ^^
Title: Re: duktape error NetSurf OS3
Post by: chris on August 02, 2016, 05:58:52 PM
Quote from: DNADNL;811999
I'm not totally sure, but I can see that, when I launch a NetSurf version without duktape.c totally LOGged, The FATAL 56 appears in 3 seconds approx. , and when I launch the totally LOGged one, It takes approx 300 seconds to appear, and the issue doesn't apprear before.
I think it could be good to have a look at this function.

EDIT : I correct, with the totally LOGged version it doesn't stop. I think I unintentionnaly stopped it when I took a screenshot.
EDIT 2 : I correct again, with the totally LOGged version, it stops whenever it wants ! ^^


I don't really understand, but maybe you can log the variables in that function so we can get a clearer idea of what it is doing?
Title: Re: duktape error NetSurf OS3
Post by: DNADNL on August 02, 2016, 06:01:34 PM
Quote from: chris;812004
I don't really understand, but maybe you can log the variables in that function so we can get a clearer idea of what it is doing?
I can give a try, we don't ever know. ^^ How do I do with LOG to display a variable ?
Title: Re: duktape error NetSurf OS3
Post by: chris on August 02, 2016, 06:24:03 PM
Quote from: DNADNL;812005
I can give a try, we don't ever know. ^^ How do I do with LOG to display a variable ?


Same as printf, eg:
LOG("Var: %d, String: %s, Ptr: %p", var, string, ptr);
The %d might need to be %ld.  It's usually worth just using %ld anyway, although gcc tends to complain about it.
Title: Re: duktape error NetSurf OS3
Post by: DNADNL on August 02, 2016, 07:50:14 PM
Quote from: chris;812007
Same as printf, eg:
LOG("Var: %d, String: %s, Ptr: %p", var, string, ptr);
The %d might need to be %ld.  It's usually worth just using %ld anyway, although gcc tends to complain about it.
OK, well, maybe the issue isn't in a loop. I was happy too fast ! ^^
Here is the last command before the FATAL 56 :
Code: [Select]
duk_eval_string(ctx, (const char *) duk_initjs_data);  /* initjs data is NUL terminated */
EDIT :
Either the Issue is coming from there :
duktape.h :
#define duk_eval_string(ctx,src)  \
   ((void) duk_eval_raw((ctx), (src), 0, 1 /*args*/ | DUK_COMPILE_EVAL | DUK_COMPILE_NOSOURCE | DUK_COMPILE_STRLEN | DUK_COMPILE_NOFILENAME))

OR from there : duktape.c : (const char *) duk_initjs_data. (a data table)

OR from the variable ctx, but I don't think so...

EDIT 2 : I wonder if the issue doesn't come from the conversion of duk_initjs_data, so from (const char *) duk_initjs_data... what do you think about it ?

EDIT 3 : Here is the code leading to the issue :
Code: [Select]
(762.335685) duk_hthread_builtins.c:911 duk_hthread_create_builtin_objects: BIG duk_hthread_create_builtin_objects() : duk_push_string(ctx, many letters, ...)
(762.380520) duk_hthread_builtins.c:1017 duk_hthread_create_builtin_objects: BIG duk_hthread_create_builtin_objects() : duk_xdef_prop_stridx(ctx, DUK_BIDX_DUKTAPE, DUK_STRIDX_ENV, DUK_PROPDESC_FLAGS_WC);
(762.428497) duk_hthread_builtins.c:1028 duk_hthread_create_builtin_objects: BIG duk_hthread_create_builtin_objects() : DUK_DD(DUK_DDPRINT(running built-in initjs));
(762.473715) duk_hthread_builtins.c:1030 duk_hthread_create_builtin_objects: BIG duk_hthread_create_builtin_objects() : duk_eval_string(ctx, (const char *) duk_initjs_data);
(762.518614) duk_hthread_builtins.c:1031 duk_hthread_create_builtin_objects: BIG duk_hthread_create_builtin_objects() : ctx = 298973952
FATAL 56: uncaught error
PANIC 56: uncaught error (calling abort)
Abnormal program termination
NetSurf : erreur code 20

EDIT 4 : It's in here : rc = duk_compile_raw(ctx, src_buffer, src_length, comp_flags); In duktape.c (I think I won't finish to follow the tracks today ! XD)

EDIT 5 : Now, it's in there : DUK_LOCAL duk_ret_t duk__do_compile(duk_context *ctx)

EDIT 6 : Just a question about this part of code :
Code: [Select]
if (flags & DUK_COMPILE_NOSOURCE) {
;
} else {
duk_remove(ctx, -2);
}
Why is there only a semi-colon in the if ? I wonder if the if souldn't be like this :
Code: [Select]
if !flags || !DUK_COMPILE_NOSOURCE) {
duk_remove(ctx, -2);
}

EDIT 7 : coming from here : duk_js_compile(thr, comp_args->src_buffer, comp_args->src_length, comp_flags);
... Where will it stop ?
Title: Re: duktape error NetSurf OS3
Post by: DNADNL on August 03, 2016, 06:59:28 PM
OK, I go on LOGging everything, but I can see I'm LOGging the error functions. So, I think I've put tracks on the way to obtain the issue. Here is the code :
Code: [Select]
(525.303815) duk_js_compiler.c:7791 duk_js_compile: duk_js_compile() : comp_stk.comp_ctx_alloc.lex.input_length = src_length;
(525.341080) duk_js_compiler.c:7794 duk_js_compile: duk_js_compile() : duk_push_pointer(ctx, (void *) &comp_stk);
(525.377255) duk_js_compiler.c:7799 duk_js_compile: duk_js_compile() : prev_ctx = thr->compile_ctx;
(525.413752) duk_js_compiler.c:7801 duk_js_compile: duk_js_compile() : thr->compile_ctx = &comp_stk.comp_ctx_alloc;
(525.449799) duk_js_compiler.c:7803 duk_js_compile: duk_js_compile() : safe_rc = duk_safe_call(ctx, duk__js_compile_raw, 2 /*nargs*/, 1 /*nret*/);
(525.504379) duk_error_longjmp.c:9 duk_err_longjmp: duk_err_longjmp() BEGIN
(525.549729) duk_error_longjmp.c:10 duk_err_longjmp: duk_err_longjmp() : DUK_ASSERT(thr != NULL);
(525.584814) duk_error_longjmp.c:13 duk_err_longjmp: duk_err_longjmp() : DUK_DD(DUK_DDPRINT(longjmp error: type=290914608 iserror=315533536 value1=!T value2=!T, (int) thr->heap->lj.type, (int) thr->heap->lj.iserror, &thr->heap->lj.value1, &thr->heap->lj.value2));
(525.643888) duk_error_longjmp.c:27 duk_err_longjmp: duk_err_longjmp() : if (!thr->heap->lj.jmpbuf_ptr) BEGIN
(525.679870) duk_error_longjmp.c:40 duk_err_longjmp: duk_err_longjmp() : if (!thr->heap->lj.jmpbuf_ptr) END
(525.714571) duk_error_longjmp.c:51 duk_err_longjmp: duk_err_longjmp() : DUK_LONGJMP(thr->heap->lj.jmpbuf_ptr->jb);
(525.750039) duk_js_compiler.c:7805 duk_js_compile: duk_js_compile() : thr->compile_ctx = prev_ctx;
(525.784035) duk_js_compiler.c:7808 duk_js_compile: duk_js_compile() : if (safe_rc != DUK_EXEC_SUCCESS) BEGIN
(525.817388) duk_js_compiler.c:7810 duk_js_compile: duk_js_compile() : if (safe_rc != DUK_EXEC_SUCCESS) : duk_throw(ctx);
(525.852152) duk_api_stack.c:4309 duk_throw: duk_throw() BEGIN
(525.880117) duk_api_stack.c:4310 duk_throw: duk_throw() : duk_hthread *thr = (duk_hthread *) ctx;
(525.911546) duk_api_stack.c:4313 duk_throw: duk_throw() : DUK_ASSERT(thr->valstack_bottom >= thr->valstack);
(525.944771) duk_api_stack.c:4315 duk_throw: duk_throw() : DUK_ASSERT(thr->valstack_top >= thr->valstack_bottom);
(525.977932) duk_api_stack.c:4317 duk_throw: duk_throw() : DUK_ASSERT(thr->valstack_end >= thr->valstack_top);
(526.009874) duk_api_stack.c:4320 duk_throw: duk_throw() : if (thr->valstack_top == thr->valstack_bottom) BEGIN
(526.044699) duk_api_stack.c:4325 duk_throw: duk_throw() : if (thr->valstack_top == thr->valstack_bottom) END
(526.078504) duk_api_stack.c:4336 duk_throw: duk_throw() : duk_hthread_sync_and_null_currpc(thr);
(526.110254) duk_api_stack.c:4340 duk_throw: duk_throw() : DUK_DDD(DUK_DDDPRINT(THROW ERROR (API): !dT (before throw augment), (duk_tval *) duk_get_tval(ctx, -1)));
(526.147969) duk_api_stack.c:4342 duk_throw: duk_throw() : duk_err_augment_error_throw(thr);
(526.182220) duk_api_stack.c:4345 duk_throw: duk_throw() : DUK_DDD(DUK_DDDPRINT(THROW ERROR (API): !dT (after throw augment), (duk_tval *) duk_get_tval(ctx, -1)));
(526.219230) duk_api_stack.c:4348 duk_throw: duk_throw() : duk_err_setup_heap_ljstate(thr, DUK_LJ_TYPE_THROW);
(526.253096) duk_api_stack.c:4356 duk_throw: duk_throw() : duk_err_longjmp(thr);
(526.283755) duk_error_longjmp.c:9 duk_err_longjmp: duk_err_longjmp() BEGIN
(526.312810) duk_error_longjmp.c:10 duk_err_longjmp: duk_err_longjmp() : DUK_ASSERT(thr != NULL);
(526.344496) duk_error_longjmp.c:13 duk_err_longjmp: duk_err_longjmp() : DUK_DD(DUK_DDPRINT(longjmp error: type=290914608 iserror=315598072 value1=!T value2=!T, (int) thr->heap->lj.type, (int) thr->heap->lj.iserror, &thr->heap->lj.value1, &thr->heap->lj.value2));
(526.397541) duk_error_longjmp.c:27 duk_err_longjmp: duk_err_longjmp() : if (!thr->heap->lj.jmpbuf_ptr) BEGIN
(526.433121) duk_error_longjmp.c:30 duk_err_longjmp: duk_err_longjmp() : if (!thr->heap->lj.jmpbuf_ptr) : DUK_D(DUK_DPRINT(uncaught error: type=290914608 iserror=315598072 value1=!T value2=!T, (int) thr->heap->lj.type, (int) thr->heap->lj.iserror, &thr->heap->lj.value1,
 &thr->heap->lj.value2));
(526.505425) duk_error_longjmp.c:35 duk_err_longjmp: duk_err_longjmp() : if (!thr->heap->lj.jmpbuf_ptr) : duk_fatal((duk_context *) thr, DUK_ERR_UNCAUGHT_ERROR, uncaught error);
FATAL 56: uncaught error
PANIC 56: uncaught error (calling abort)
Abnormal program termination
NetSurf : erreur code 20

So that could mean either the problem comes from
duk_js_compile() : safe_rc = duk_safe_call(ctx, duk__js_compile_raw, 2 /*nargs*/, 1 /*nret*/);
OR from
duk_js_compile() : if (safe_rc != DUK_EXEC_SUCCESS) : duk_throw(ctx);

But now I don't know how to be sure about that...

EDIT : I can't go further for the LOGs, so I think the Issue is there.
Title: Re: duktape error NetSurf OS3
Post by: chris on August 03, 2016, 10:57:34 PM
Quote from: DNADNL;812055

So that could mean either the problem comes from
duk_js_compile() : safe_rc = duk_safe_call(ctx, duk__js_compile_raw, 2 /*nargs*/, 1 /*nret*/);
OR from
duk_js_compile() : if (safe_rc != DUK_EXEC_SUCCESS) : duk_throw(ctx);


duk_throw is the function which triggers the fatal, which means duk_safe_call is returning something other than DUK_EXEC_SUCCESS.

It would be useful to know:
(a) what duk_safe_call is actually returning.
(b) to find out where in duk_safe_call it is returning the error.
Title: Re: duktape error NetSurf OS3
Post by: DNADNL on August 04, 2016, 04:04:23 PM
Quote from: chris;812059
duk_throw is the function which triggers the fatal, which means duk_safe_call is returning something other than DUK_EXEC_SUCCESS.

It would be useful to know:
(a) what duk_safe_call is actually returning.
(b) to find out where in duk_safe_call it is returning the error.
OK. We worked on this with Tygre yesterday. We saw the problem could be in
Code: [Select]
DUK_LOCAL duk_ret_t duk__js_compile_raw(duk_context *ctx).
I'm going to check this out.
Title: Re: duktape error NetSurf OS3
Post by: DNADNL on August 05, 2016, 07:55:45 PM
OK, I reached the same part of code than you, chris :
Code: [Select]
if (expect >= 0 && comp_ctx->curr_token.t != expect) {
DUK_D(DUK_DPRINT(&quot;parse error: expect=%ld, got=%ld&quot;,
                (long) expect, (long) comp_ctx->curr_token.t));
DUK_ERROR_SYNTAX(thr, DUK_STR_PARSE_ERROR);
}

With Tygre, we climbed back up to this line (in duktape.c : duk__parse_func_like_fnum() ) :
Code: [Select]
duk__advance_expect(comp_ctx, DUK_TOK_RCURLY);
We think the JavaScript code used to test duktape during the NetSurf launch is responsible of the issue. Is it possible to know what is the JavaScript code executed during the NetSurf launch ? (we thought first that the NetSurf Welcome page executed Javascript code to explain the issue, but that's not the case).

However, it's quite disappointing and not handy if NetSurf crashes only because a JavaScript test script...
Title: Re: duktape error NetSurf OS3
Post by: utri007 on August 05, 2016, 11:04:06 PM
Just quick question :

People are testing these builds now in vampire irc chanel. Seems that DNADNL build from github has wrong colors and it is much slower than beta build in Chris' home page?

Why?

Haven't tested this myself, but seems reliable.
Title: Re: duktape error NetSurf OS3
Post by: freeaks on August 05, 2016, 11:08:41 PM
@dnadnl,
i've just tested your build from github, i have to report: it is quite slower than chrisY's and the color are wrong too. (tested on uae, rtg)

@chrisY: your build is faster, color are good.
is there anychance you could release a nofpu build so vampire owner could use you netsurf port ?

fpu support for vampire is coming, but meanwhile there's a good number of users that cannot run your build of netsurf and would like to play with it a lot :)

myself too i ordered a vampire so, there is interest for your 68k port of netsurf, thanks for doing it!
Title: Re: duktape error NetSurf OS3
Post by: DNADNL on August 05, 2016, 11:39:37 PM
Quote from: freeaks;812133
@dnadnl,
i've just tested your build from github, i have to report: it is quite slower than chrisY's and the color are wrong too. (tested on uae, rtg)

@chrisY: your build is faster, color are good.
is there anychance you could release a nofpu build so vampire owner could use you netsurf port ?

fpu support for vampire is coming, but meanwhile there's a good number of users that cannot run your build of netsurf and would like to play with it a lot :)

myself too i ordered a vampire so, there is interest for your 68k port of netsurf, thanks for doing it!
As I said before and in the README (if I recall well), the NetSurf AmigaOS3 version on my GitHub isn't updated every day, so some changes are not included in (that's the case for the images). But I'll compile it again, now.
Title: Re: duktape error NetSurf OS3
Post by: chris on August 05, 2016, 11:42:22 PM
Quote from: freeaks;812133

@chrisY: your build is faster, color are good.
is there anychance you could release a nofpu build so vampire owner could use you netsurf port ?


Are you sure the current build (test build on cy2, not the Aminet one) isn't working?
Title: Re: duktape error NetSurf OS3
Post by: chris on August 05, 2016, 11:48:09 PM
Quote from: DNADNL;812127
OK, I reached the same part of code than you, chris :
Code: [Select]

if (expect >= 0 && comp_ctx->curr_token.t != expect) {
DUK_D(DUK_DPRINT(&quot;parse error: expect=%ld, got=%ld&quot;,
                (long) expect, (long) comp_ctx->curr_token.t));
DUK_ERROR_SYNTAX(thr, DUK_STR_PARSE_ERROR);
}


With Tygre, we climbed back up to this line (in duktape.c : duk__parse_func_like_fnum() ) :
Code: [Select]

duk__advance_expect(comp_ctx, DUK_TOK_RCURLY);

We think the JavaScript code used to test duktape during the NetSurf launch is responsible of the issue. Is it possible to know what is the JavaScript code executed during the NetSurf launch ? (we thought first that the NetSurf Welcome page executed Javascript code to explain the issue, but that's not the case).

However, it's quite disappointing and not handy if NetSurf crashes only because a JavaScript test script...


AFAIK it doesn't run any tests on startup.  Might be a question for the netsurf-dev mailing list (or IRC).
Title: Re: duktape error NetSurf OS3
Post by: DNADNL on August 05, 2016, 11:52:20 PM
Quote from: chris;812137
AFAIK it doesn't run any tests on startup.  Might be a question for the netsurf-dev mailing list (or IRC).
I don't know how to find this IRC, so maybe I'll let you ask the question ! ^^
Title: Re: duktape error NetSurf OS3
Post by: utri007 on August 06, 2016, 12:04:52 AM
Quote from: DNADNL;812135
As I said before and in the README (if I recall well), the NetSurf AmigaOS3 version on my GitHub isn't updated every day, so some changes are not included in (that's the case for the images). But I'll compile it again, now.


I don't know how old compile Chris' version is, but there shouldn't be a big diffrence? Could you compile it like apj hinted?

Quote
my version with -m68020 and this works without fpu too.
(-m68020-60 doesn't).


That would make many Vampire FPGA accelerator users happy
Title: Re: duktape error NetSurf OS3
Post by: freeaks on August 06, 2016, 12:04:54 AM
@dnadnl: thanks for building a new version :)

@chris: i don't have my vampire yet, it's on the road, being delivered to me. meanwhile i'm testing with uae. i'll check with the other vampire owners if they can run your last beta build as you say they should be  able to. if so then good news :)
Title: Re: duktape error NetSurf OS3
Post by: DNADNL on August 06, 2016, 12:06:55 AM
@utri007 & @freeaks OK, the NetSurf Archive available in my GitHub is now whole new fresh (without DukTape) ! ^^ You can test it if you want.
Title: Re: duktape error NetSurf OS3
Post by: utri007 on August 06, 2016, 12:08:17 AM
Quote from: chris;812136
Are you sure the current build (test build on cy2, not the Aminet one) isn't working?


I'm 99% sure that freeaks talks version here : http://www.unsatisfactorysoftware.co.uk/index.php?pg=netsurf

At least he said so in irc
Title: Re: duktape error NetSurf OS3
Post by: chris on August 06, 2016, 12:17:07 AM
Quote from: utri007;812142
I'm 99% sure that freeaks talks version here : http://www.unsatisfactorysoftware.co.uk/index.php?pg=netsurf

At least he said so in irc


That page links to both builds!
The "test build" is built with -m68020
The Aminet build probably isn't.
Title: Re: duktape error NetSurf OS3
Post by: chris on August 06, 2016, 12:18:53 AM
Quote from: DNADNL;812138
I don't know how to find this IRC, so maybe I'll let you ask the question ! ^^


http://www.netsurf-browser.org/contact/
Title: Re: duktape error NetSurf OS3
Post by: utri007 on August 06, 2016, 12:20:55 AM
Quote from: DNADNL;812141
@utri007 & @freeaks OK, the NetSurf Archive available in my GitHub is now whole new fresh (without DukTape) ! ^^ You can test it if you want.


Download link doesn't work

https://github.com/DNADNL/NetScript gives 404 error
Title: Re: duktape error NetSurf OS3
Post by: DNADNL on August 06, 2016, 12:21:01 AM
Quote from: utri007;812139
I don't know how old compile Chris' version is, but there shouldn't be a big diffrence? Could you compile it like apj hinted?



That would make many Vampire FPGA accelerator users happy
Oh, I don't know how to compile for this, sorry... But if you have some Web links, I could go to check if I can do something, but I can't guarantee.
Title: Re: duktape error NetSurf OS3
Post by: chris on August 06, 2016, 12:22:34 AM
Quote from: DNADNL;812146
Oh, I don't know how to compile for this, sorry... But if you have some Web links, I could go to check if I can do something, but I can't guarantee.


When somebody actually confirms if it works or not I'll commit the change. That's assuming I haven't accidentally committed it already!
Title: Re: duktape error NetSurf OS3
Post by: DNADNL on August 06, 2016, 12:24:37 AM
Quote from: utri007;812145
Download link doesn't work

https://github.com/DNADNL/NetScript gives 404 error
Oops, I forgot to change it in the README ! ^^ It's OK, now. Here is the link if you want : https://github.com/DNADNL/NetScript/raw/master/NetSurf_3.6dev_AmigaOS3_2016-08-05.tar
Title: Re: duktape error NetSurf OS3
Post by: DNADNL on August 06, 2016, 12:28:16 AM
Quote from: chris;812144
http://www.netsurf-browser.org/contact/
OK, i'll send later an e-mail to the netsurf-dev e-mail address.
Title: Re: duktape error NetSurf OS3
Post by: utri007 on August 06, 2016, 12:45:41 AM
Pop in http://webchat.freenode.net/?channels=apollo-team

or #apollo-team if you prefer actual irc

There is "only some 100" people online now
Title: Re: duktape error NetSurf OS3
Post by: freeaks on August 06, 2016, 01:19:04 AM
@utri007:
i alway spoke about the latest beta version from here:
http://cy2.uk/netsurfos3
that is the link available from chris page.

@chris:
 you were correct, it seems your latests version can now run on vampire.
thanks a lot for this.

@dnadnl:
thanks for the new build, i'll test it and report. i'm sure others will do so as well.

i have to report something i noticed though,
netsurf is slow to render,
and then slow to scroll even local pages with no javascript and minimal css.
i'm  not bashing, just telling. i think that even if local pages are slow to  render like that, there must be a real problem in the code.
maybe at least the scrolling could be made better with some buffering of the whole page once it is loaded ?

anyway, it is getting better and better and that's great.
keep up the good work :)
Title: Re: duktape error NetSurf OS3
Post by: utri007 on August 06, 2016, 01:36:12 AM
Both version are now identical, no speed diffrences.
Title: Re: duktape error NetSurf OS3
Post by: DNADNL on August 06, 2016, 07:53:35 AM
Quote from: freeaks;812154
@utri007:
i alway spoke about the latest beta version from here:
http://cy2.uk/netsurfos3
that is the link available from chris page.

@chris:
 you were correct, it seems your latests version can now run on vampire.
thanks a lot for this.

@dnadnl:
thanks for the new build, i'll test it and report. i'm sure others will do so as well.

i have to report something i noticed though,
netsurf is slow to render,
and then slow to scroll even local pages with no javascript and minimal css.
i'm  not bashing, just telling. i think that even if local pages are slow to  render like that, there must be a real problem in the code.
maybe at least the scrolling could be made better with some buffering of the whole page once it is loaded ?

anyway, it is getting better and better and that's great.
keep up the good work :)
Welcome to the Nineties ! XD This wonderful time when to load a web page, you had to wait every square to be desplayed, and you could see them appear, square by square,from top/left to bottom/right ! ^^

@utri, thanks for your precision, I'm glad to read that.
Title: Re: duktape error NetSurf OS3
Post by: freeaks on August 06, 2016, 09:13:08 AM
Quote from: DNADNL;812167
Welcome to the Nineties ! XD This wonderful time when to load a web page, you had to wait every square to be desplayed, and you could see them appear, square by square,from top/left to bottom/right ! ^^

yes, about that, i have a question:
could it be possible to have netsurf to display page loading progressively ?
like every other browser on the planet?
with netsurf it feel mostly like 'all or nothing' meaning we see nothing happen, no progress and then suddenly new the page is completely loaded.
it would be better to see loading happening progressively, we would have a bit less the feeling of waiting.
Title: Re: duktape error NetSurf OS3
Post by: utri007 on August 06, 2016, 09:38:45 AM
ShK tried with his Vapire. Amiga org is downloaded and renderer 14.8 seconds.

He had same problem than DNADNL had, was it because of datatypes? No buttons displayed and pictures are dispalyed all rainbow colors, vertical bars.

After installation it also asked usergroup and guigfx libraries. He has already copied them to libs.

Just wonder might this be because of lack of BB1 and 2?
Title: Re: duktape error NetSurf OS3
Post by: chris on August 06, 2016, 11:48:45 AM
Quote from: freeaks;812168
yes, about that, i have a question:
could it be possible to have netsurf to display page loading progressively ?
like every other browser on the planet?
with netsurf it feel mostly like 'all or nothing' meaning we see nothing happen, no progress and then suddenly new the page is completely loaded.
it would be better to see loading happening progressively, we would have a bit less the feeling of waiting.


I don't get you. It loads the page content+css and will display that whilst the images are queued to download.
CSS means it takes longer for the initial page to display as that needs to be parsed.
It's no different to any other CSS-supporting browser wrt initial page display.
Title: Re: duktape error NetSurf OS3
Post by: freeaks on August 06, 2016, 12:35:50 PM
@chris, maybe it's just me but, when i load a page with netsurf, i have the impression that nothing happen, nothing moves or changes, and suddenly the finished page appear.
whereas on other browsers, when i load a page, it displays the load as it happens, text and images being loaded. (they might not have their final appearance or placement yet). what i'm trying to say is: on other browsers the page being loaded gets contructed before your eyes. on netsurf it less visible. it's more like: you click a link, nothing happens, you wait.. you wait, and then: 'done' all of sudden.
it would be nice if netsurf could show what it have loaded so far as it gets it, while structuring the datas in their final shapes and placements.
maybe showing the page without css (like ibrowse or aweb) while its parsing css and aranging the page layout in the background, and when its done flip the switch and show the correct final page.
Title: Re: duktape error NetSurf OS3
Post by: chris on August 06, 2016, 12:48:47 PM
@freeaks

There is no point in displaying a page without CSS initially, I've never seen a browser do that. The other stuff is done already. Note that every time the layout changes the page needs to be redrawn - which makes the page take even longer. I think there are configuration options for reflowing etc.

You can watch the status bar if you want to know what it is up to.
Title: Re: duktape error NetSurf OS3
Post by: utri007 on August 06, 2016, 12:54:10 PM
I installed winuae and used my really old AmigaForever OS3.X installation, to demonstarted problems myself.

I'm prety sure that display problems DNADNL and ShK are because lack of render.library

If render.library is missing, Netsurf tells it can't found guigfx.library, even if guigfx.library is in right Place. Pictures are also displayed  with all rainbow colors etc.
Title: Re: duktape error NetSurf OS3
Post by: chris on August 06, 2016, 02:22:15 PM
I've just uploaded a version which uses P96 directly on RTG screens.  I have no idea whether it will work (it is OK on AGA without P96 installed!).  If it does it should be a bit quicker, but I have a feeling the text will be all the wrong colours.
Title: Re: duktape error NetSurf OS3
Post by: chris on August 06, 2016, 02:23:45 PM
Quote from: utri007;812175
If render.library is missing, Netsurf tells it can't found guigfx.library, even if guigfx.library is in right Place.


Actually it says it can't open guigfx.library, which is correct because guigfx.library won't open if it fails to open render.library.
Title: Re: duktape error NetSurf OS3
Post by: utri007 on August 06, 2016, 03:07:34 PM
Render.library requires FPU!

At least this version http://aminet.net/package/dev/misc/renderlib31

Other two versions doesn't work at all, with guigfx library.

[Edit]
I can't get it running with WinUAE without FPU and render.library installed. Tested with WinUAE 68020 and 040 cpus,  latest WinUAE.
Apollo-Team irc channel they say it runs but there are some new Graphics corruption.

Quote

[18:02] latest chris version works, render lib now works
[18:02] i don't have rainbow images anymore but there's still corruption
[18:06] Are you running at 16bit myzar?
[18:07] Grelbfarlk: yes it's a different type of corruption, it's not palette, images are missing chunks


Weird?
Title: Re: duktape error NetSurf OS3
Post by: utri007 on August 06, 2016, 04:58:28 PM
Quote from: chris;812177
I've just uploaded a version which uses P96 directly on RTG screens.  I have no idea whether it will work (it is OK on AGA without P96 installed!).  If it does it should be a bit quicker, but I have a feeling the text will be all the wrong colours.


There is a problems, it is not faster than previous versions. Couldn't get faster rendering than 27 seconds. ( some 7 second more than with render.library)

Again picture tells more than 1000 words. I tested this winuae mmu ON and no FPU like Vampire is. Works without render.library. Got same Graphics corruption with real amiga and emulated amiga. Picture is taken from real amiga screen.
Title: Re: duktape error NetSurf OS3
Post by: chris on August 06, 2016, 05:28:42 PM
Quote from: utri007;812184
Again picture tells more than 1000 words. I tested this winuae mmu ON and no FPU like Vampire is. Works without render.library. Got same Graphics corruption with real amiga and emulated amiga. Picture is taken from real amiga screen.

That's better than I was expecting, although the corruption's a bit weird.  Hmm... probably worth just leaving it in palette-mapped mode for OS3 then.
Title: Re: duktape error NetSurf OS3
Post by: freeaks on August 06, 2016, 09:01:49 PM
with latest version, netsurf don't crash anymore on exit :)
oh and i must say i prefer current status bar and scrollbars. it looks better than before.
Title: Re: duktape error NetSurf OS3
Post by: chris on August 07, 2016, 12:43:51 AM
Quote from: freeaks;812190
with latest version, netsurf don't crash anymore on exit :)


Interesting.

Quote
oh and i must say i prefer current status bar and scrollbars. it looks better than before.


I haven't touched these for years!
Title: Re: duktape error NetSurf OS3
Post by: freeaks on August 07, 2016, 09:52:18 AM
Quote from: chris;812199
Interesting.
I haven't touched these for years!


i must have confused with another port i tested then.
i tried linux and osx version too.

and on amiga i tested arti's port also. (sdl based UI).
btw, something on arti's port make his version faster.
the scrolling, for example, is smoother.
if you could find some time to investigate this, it would lead to better user experience.
(i tried to set "redraw_tile_size_x and y to size of screen, it did help, just a bit though, but barely noticable.
once a page is finished loading, there must be some way to make the scrolling smoother, using buffered surface, and have it to buffer more a bit more than exact screen size could help maybe ?

in any case, the crash on exit being fixed is really nice.
resources are also freed correctly, that's good :)
Title: Re: duktape error NetSurf OS3
Post by: utri007 on August 07, 2016, 10:11:04 AM
freeaks: You have made you testing with UAE? You should test with real hardware. After that you migh reconsider wich one is faster. Something wich is faster with modern PC under emulator, might not be faster with few hertz CPU.

Chris: I couldn't get tile_size_x: and tile_size_y: work. Did I remember wrong?
Title: Re: duktape error NetSurf OS3
Post by: freeaks on August 07, 2016, 10:59:18 AM
Quote from: utri007;812220
freeaks: You have made you testing with UAE?


yes i did test both in uae, same settings.
chris port was scrolling slower than arti.

it is a valid comparison.
since uae settings were the same.
can you explain why wouldn't that be valid ?

(btw, i am not using max performance,
i did set: no JIT, and cpu speed is 32mips.
that way, when i receive my vampire, it will feel like a good boost :)
Title: Re: duktape error NetSurf OS3
Post by: utri007 on August 07, 2016, 11:14:11 AM
I,m not keen about emultion. I boght AmigaForver year 2006 or something. Rarelu use it. It does not work with guigfx / render library version at all. Note that current version is about 30% slower than version wich uses guigfx/render library. That is a lot with real 680X0 cpu, but much less under emulation.

All my tests are made with real hardware.

Arthur's works very nicely under emulation, it feels fast and seems to work reliably.

But with real hardware I haven't been able to start it with my 040/32mb system. Not enough memory. My OS installation uses about 10 mb ram, so I have about 22mb free ram after boot. My 060/64mb system it starts, but it locks Computer for tens of seconds, scrolling is not faster, it is a slideshow. Though I haven't tested very latest versions. Tested them about 3-4 mothns ago. From video wich I found from Vampire irc channel about Arthur's fork, it shows that one page loaded 215 seconds with Vampire, tested same page with 060/64mb ram with Chris Netsurf, it loaded little more than 20 seconds. I'm prety sure that your tests are not cycle exact.

My opinion. Note that opinions are like but holes, everyone has one. Ducktape should not be a high priority, it most likely requires too much CPU power compinet with Netsurf. Memory fragemtion issue is annoying for all, coders and users. Coders has hardtime figure out how to solve it, and it is easier to said than do. Would be nice if GUI problems could be fixed like, refreshing issue, borders, etc. tabs, prefs window has some visual problems. Would be nice to know, how Netsurf behaves with Vampire, is there a memory fragemtntion issue? Would it be possible compile render.library so that it does not require FPU?
Title: Re: duktape error NetSurf OS3
Post by: freeaks on August 07, 2016, 12:46:57 PM
@utri007
ok this is not the place to argue with you about uae.
but you could at least test arti's recent build before talking.
don't assume too much, let's just speak about facts.

i talked with a vampire owner that told me arti's scrolling was quite smooth on his vampire.
there's a video that showcase this, as you can see here:

https://www.youtube.com/watch?v=8AoZireGWtc

scrolling is very good with arti's port.
this is not the case with chris port just yet.
Title: Re: duktape error NetSurf OS3
Post by: utri007 on August 07, 2016, 02:52:03 PM
You are right, testing should be based to latest version. Arthur's fork has a smoother scrolling, but aminet.net is not a good test. It is too Basic site, works with every possible browser. Sites like amiga.org / amigaworld.net are better. In those places scrolling is not that smooth anymore, but still better than Netsurf has. With WinUAE scrolling is smooth as it can be all the time.

What I care is that Arhur's browser uses 47seconds to render amiga.org and 41 seconds to render amigaworld.net. That is more important how scrolling works. Another thing is that if screen is refreshed 100x100 pixel chunks, it saves a memory, wich is also a one point of view.

Those are almost 2.5 times more than Netsurf uses. Amiga.org 19-23 seconds, amigaworld.net 15-17 seconds.

What I have noticed, Vampire is 1/3 or 1/4 faster than my 060 66mhz Performance is somewhere between 90-100mhz 060. So These browsers in current form are very good proof that it can be done and will be fun to use with Vampire.

To be a fair, I tried to change ttf fonts to bitmap fonts. It has a huge performance impact for Netsurf. It didn't help a much or just tapping to "use bitmap fonts", doesn't change anything. Tried to change paths to font folder and bitmap fonts, didn't help either.

It is easy to see that Artis browser doesn't use intuition, it lacks menus and it is not possible select text. That is little annoying when you try write new address to address bar.

Another notice ist that it uses 5-6mb more ram to start then Netsurf uses. In theory I should be able to start it with my 040/32mb system, but after that I wouldn't be possible surf anywhere, because of lack of free memory.
Title: Re: duktape error NetSurf OS3
Post by: chris on August 07, 2016, 04:35:46 PM
Quote from: utri007;812220
Chris: I couldn't get tile_size_x: and tile_size_y: work. Did I remember wrong?


redraw_tile_size_x
redraw_tile_size_y

Quote from: utri007;812234
To be a fair, I tried to change ttf fonts to bitmap fonts. It has a huge performance impact for Netsurf. It didn't help a much or just tapping to "use bitmap fonts", doesn't change anything. Tried to change paths to font folder and bitmap fonts, didn't help either.


Using bitmap fonts should be the default under OS3 for a while.

Yes, toggling the bitmap fonts option does need bitmap fonts to actually be selected, otherwise it'll use the scalable ones via diskfont.library!
Title: Re: duktape error NetSurf OS3
Post by: chris on August 07, 2016, 04:43:23 PM
Quote from: freeaks;812219
once a page is finished loading, there must be some way to make the scrolling smoother, using buffered surface, and have it to buffer more a bit more than exact screen size could help maybe ?


Hmm... possibly.  The way it is written the page is drawn "JIT", and tiled rendering makes it impossible.  There's no attempt to cache any of the displayed page, even the scrolling happens direct on the window.

It has been noted before, I'm just not sure how to fix it without using oodles of memory or slowing the page draw up front.  Incidentally there's a related bug report: http://bugs.netsurf-browser.org/mantis/view.php?id=2457
Title: Re: duktape error NetSurf OS3
Post by: freeaks on August 07, 2016, 07:46:27 PM
@chris
prepare one more surface render on it, off screen,
once render is done,
flip the switch and display that (buffered) surface?
it's often how it is done for games and dynamic contents.

that, or, you render directly on screen but keep a buffer that is larger than the screen, so when we are scrolling, we don't see the tiles appearing (it would happen just after the boundaries of the physical screen.)
for example if screen is 800x600, you render that once in one chunk,
and then keep a buffer of 900x700 (or a little bit more). so we don't see tiles being created.

i had similar problem in a platform (side scroller a metroid like) game i did once, the game level scrolling as the player progressed, kept appearing in front of him.

once you know the screen size and the tile size, it's easy to see how many tiles you can fit on screen. you could have a loop waiting for the correct amount of tile being rendered before displaying the page.
Title: Re: duktape error NetSurf OS3
Post by: DNADNL on August 08, 2016, 07:04:04 PM
Hello guys !
About the rainbow pictures issue, for me the problem has been solved by one of the NetSurf developers (I use AGA), so I can't really help you, sorry.

I tried to contact the NetSurf developers via their mailing list but this doesn't work "you are not allowed to post to this mailing list". How can I join them to talk about the DukTape issue, so ? Do you have an idea ?
Title: Re: duktape error NetSurf OS3
Post by: chris on August 08, 2016, 08:19:27 PM
Quote from: DNADNL;812284

I tried to contact the NetSurf developers via their mailing list but this doesn't work "you are not allowed to post to this mailing list". How can I join them to talk about the DukTape issue, so ? Do you have an idea ?


Make sure you're subscribed to it under the email address you're sending from.
Title: Re: duktape error NetSurf OS3
Post by: DNADNL on August 08, 2016, 08:50:54 PM
Quote from: chris;812286
Make sure you're subscribed to it under the email address you're sending from.

OK, I subscribed with a gmail address (I don't know why, but it didn't accept my personal email address). Now I wait the confirmation mail.

EDIT : OK, I can now re-send the mail.

EDIT 2 : Ah, also, I released a new NetScript version, more user-friendly ! Now, you can easily compile NetSurf for AmigaOS3 with your own modifications.
There is also a QUICK MODE, which is useful if you only want to recompile the netsurf folder quickly (~30 sec-1 min).
Finally, there is also a LOG file created, in case you reach the bad ending.
Title: Re: duktape error NetSurf OS3
Post by: DNADNL on August 10, 2016, 04:06:15 PM
I looked for every files which could contain js in NetSurf but I didn't find the cause of the issue. I don't have any news about the developers (using the netsurf-dev mail list), do you have an idea about or another way to contact them ?

EDIT : @chris I can see the libnsutils compilation doesn't work (so the NetSurf one too)... Do you think it could be due to the changes you've done on it ?
Title: Re: duktape error NetSurf OS3
Post by: chris on August 10, 2016, 11:49:01 PM
Quote from: DNADNL;812358
I looked for every files which could contain js in NetSurf but I didn't find the cause of the issue. I don't have any news about the developers (using the netsurf-dev mail list), do you have an idea about or another way to contact them ?

The other way is IRC, which is often better ('m not a fan, but it's likely you'll get a response if somebody is on)

Quote
EDIT : @chris I can see the libnsutils compilation doesn't work (so the NetSurf one too)... Do you think it could be due to the changes you've done on it ?

Yeah, I broke it, sorry :(  Fixed now.

Incidentally I'd be interested to hear if you have timer issues - ie. pages which refuse to finish loading, the browser just giving up loading pages after a while, etc - see http://www.amigans.net/modules/xforum/viewtopic.php?post_id=103107#forumpost103107
Title: Re: duktape error NetSurf OS3
Post by: DNADNL on August 11, 2016, 05:11:16 PM
Quote from: chris;812387
The other way is IRC, which is often better ('m not a fan, but it's likely you'll get a response if somebody is on)

I'll see, for the moment I don't have any response since yesterday...

Quote from: chris;812387

Yeah, I broke it, sorry :(  Fixed now.

OK ! Thanks !

Quote from: chris;812387
Incidentally I'd be interested to hear if you have timer issues - ie. pages which refuse to finish loading, the browser just giving up loading pages after a while, etc - see http://www.amigans.net/modules/xforum/viewtopic.php?post_id=103107#forumpost103107

I'm going to check this out. Do you have a typical website which could have this kind of behaviors ? I tried to launch twitch.tv on NetSurf windows (it's the only version available in my computer, currently, I'll test this on AmiKit later) but the page doesn't want to load totally, I guess : http://puu.sh/qxFWG/ed4bc8abae.jpg
Title: Re: duktape error NetSurf OS3
Post by: chris on August 11, 2016, 06:13:42 PM
Quote from: DNADNL;812422
I'm going to check this out. Do you have a typical website which could have this kind of behaviors ? I tried to launch twitch.tv on NetSurf windows (it's the only version available in my computer, currently, I'll test this on AmiKit later) but the page doesn't want to load totally, I guess : http://puu.sh/qxFWG/ed4bc8abae.jpg

Yes, the Sourceforge page linked to in the first post... I'm about to commit a fix based on Georg's comments which are looking good so far, so I'm confident this might be fixed.  But if you spot it behaving weirdly there's a load of logging I can enable now :)

I've copied up a new build for OS3 with the fixed scheduler (unfortunately doesn't appear to be the inadvertent cause of Duktape problems)
Title: Re: duktape error NetSurf OS3
Post by: DNADNL on August 11, 2016, 08:27:18 PM
Quote from: chris;812426
Yes, the Sourceforge page linked to in the first post...
I don't have access to it (Error 403), so I can't test... sry ! :-(

Quote from: chris;812426
I'm about to commit a fix based on Georg's comments which are looking good so far, so I'm confident this might be fixed.  But if you spot it behaving weirdly there's a load of logging I can enable now :)
OK, please tell me when you did it, as I can launch NetScript to compile NetSurf for me again and test it on AmiKit.

Quote from: chris;812426
I've copied up a new build for OS3 with the fixed scheduler (unfortunately doesn't appear to be the inadvertent cause of Duktape problems)
We can't always kill two birds with a stone ! ^^

In fact, if you need some help for a french translasion, I'll be glad to help you ! ^^

EDIT : Ah, also, I corrected some JS mistakes, mostly in the netsurf/test/javascript HTML files (I thought this was the cause of the DukTape Issue). If you want, I can give them to you.
Title: Re: duktape error NetSurf OS3
Post by: chris on August 11, 2016, 10:03:57 PM
Quote from: DNADNL;812436
I don't have access to it (Error 403), so I can't test... sry ! :-(


That's probably correct, it just redirects to a logon screen.

Quote

OK, please tell me when you did it, as I can launch NetScript to compile NetSurf for me again and test it on AmiKit.


It is done.

Quote


In fact, if you need some help for a french translasion, I'll be glad to help you ! ^^


There already is one, but it might need updating.

Quote

EDIT : Ah, also, I corrected some JS mistakes, mostly in the netsurf/test/javascript HTML files (I thought this was the cause of the DukTape Issue). If you want, I can give them to you.


It's best to attach that sort of thing to a bug report.
Title: Re: duktape error NetSurf OS3
Post by: utri007 on August 14, 2016, 04:38:34 PM
Tested 11th August version. Colors are OK, but it is still a about 30% slower than version wich used a render library.

Question is, is actually needed to have a no FPU version? Is it so that AGA version still uses a render.library (requires FPU)?

Surfing web with 68k amiga needs all speedups wich are possible. For 68030 cpu Netsurf is "nice to test", but there is no way that it is actually useable or fun to use. Also anyone with 68030 can get a FPU easily. Prety much every 68040/68060 has a FPU. Vampire is different thing, but it will have a FPU eventually.
Title: Re: duktape error NetSurf OS3
Post by: chris on August 14, 2016, 08:23:39 PM
Quote from: utri007;812552
Tested 11th August version. Colors are OK, but it is still a about 30% slower than version wich used a render library.@


Huh? This version needs guigfx/render.
Title: Re: duktape error NetSurf OS3
Post by: utri007 on August 14, 2016, 08:48:10 PM
OK, then it was just temporary slowdown because of internet connection or something. I thought that should I check does it need render libary or not, but I was lazy.
Title: Re: duktape error NetSurf OS3
Post by: freeaks on August 15, 2016, 02:13:23 PM
@chris:
it seems that,  the version which used P96 directly on RTG screens didn't crash on exit. that was good.
now i've dowloaded a new build from you again and it crash on exit as before.

also, a suggestion for your website:
 (beside removing the drawings made by (hopefully) a child. ;)
, i noticed you used php, could you append the date next to the link, when you upload a new build ? with php it will be easily done, automatically.
so we have a mean to know if there's a new build or not, and also when speaking about it, it will be easier to say "the build from 2016_08_15" for example.

and please, make scrolling smoother, it's a pain currently ;)

Thanks
Title: Re: duktape error NetSurf OS3
Post by: chris on August 15, 2016, 03:23:54 PM
@freeaks

The intention is the builds will be from CI, the current situation is an interim measure.  The build date is in Project=>About.

I'd like to know more about the crashing, I've not seen that here.
Title: Re: duktape error NetSurf OS3
Post by: utri007 on August 15, 2016, 05:55:17 PM
Quote from: chris;812602


I'd like to know more about the crashing, I've not seen that here.


I haven't had that kind of problem ever.

I belive that scrolling is compromize between, speed, ram usage and useability.

UAE doesn't give right picture of it.
Title: Re: duktape error NetSurf OS3
Post by: freeaks on August 15, 2016, 05:56:47 PM
@chris,

about the build date: the goal was to avoid unnecessary downloads and installs just to check freshness of the link..
what you say makes me as a user, download and install new copy of netsurf just to check if it was updated or not. this is not practical. better put a date string beside the download link.

about the crash, sur,e i'd be willing to give any output i could,
what tool do you suggest to get you more info ?
right now i can see the usual:

"NetSurf
Program failed (error #80000004)
Wait for disk activity to finish."

that probably won't help you much, i'm a bit rusty about amiga things,
what kind of tool was there, was it 'sashimi' that software that could give more detailled debug output ?
Title: Re: duktape error NetSurf OS3
Post by: chris on August 15, 2016, 06:16:33 PM
Quote from: freeaks;812615
about the build date: the goal was to avoid unnecessary downloads and installs just to check freshness of the link..

Yes, I know, but they are split over two different servers so I can't easily fetch the filedate.  This will be irrelevant when we get CI builds.

Quote
about the crash, sur,e i'd be willing to give any output i could,
what tool do you suggest to get you more info ?
right now i can see the usual:

"NetSurf
Program failed (error #80000004)
Wait for disk activity to finish."

that probably won't help you much, i'm a bit rusty about amiga things,
what kind of tool was there, was it 'sashimi' that software that could give more detailled debug output ?

Enforcer maybe?  80000004 is an illegal instruction error apparently.  It could be the CPU, memory or - if you're using UAE - an emulation error.
Title: Re: duktape error NetSurf OS3
Post by: freeaks on August 15, 2016, 06:44:36 PM
yes i'm using uae at the moment,
this week i will switch to a600 + vampire (i'm waiting for parts)

i have mungwall, enforcer and sashimi running in the background.
when i quit netsurf, i get the crash, but nothing from those tools is reported.
whereas for the previous build that was direct p96 on rtg,
i had gfx corruption, but no crashs on exit.
i can reproduce this everytime.
Title: Re: duktape error NetSurf OS3
Post by: DNADNL on August 15, 2016, 06:46:20 PM
Hello World !

@chris
I would like to activate the Debug commands (DUK_D, DUK_DD, DUK_DDD, DUK_DPRINT...), but what I tried didn't work. Could you please tell me how to do ?
Title: Re: duktape error NetSurf OS3
Post by: DNADNL on August 15, 2016, 06:56:28 PM
Quote from: freeaks;812619
yes i'm using uae at the moment,
this week i will switch to a600 + vampire (i'm waiting for parts)

i have mungwall, enforcer and sashimi running in the background.
when i quit netsurf, i get the crash, but nothing from those tools is reported.
whereas for the previous build that was direct p96 on rtg,
i had gfx corruption, but no crashs on exit.
i can reproduce this everytime.
I have the same kind of issue on Happiga for Raspberry Pi (the 8000-0004 Issue), even if I use Picasso 96 ; and the same issue comes sometimes to AmiKit. I think It's a memory leak here, as the RPi has "only" 1GB (and 8 MB allocated to The Amiga System), and AmiKit has 8 GB I think.
Title: Re: duktape error NetSurf OS3
Post by: freeaks on August 15, 2016, 07:06:36 PM
i installed smartcrash, does this info helps ?
http://alturl.com/rc56g  (pic of smartcrash requester)

edit: i have 128mb allocated to amiga
Title: Re: duktape error NetSurf OS3
Post by: DNADNL on August 15, 2016, 07:49:05 PM
Quote from: freeaks;812622
i installed smartcrash, does this info helps ?
http://alturl.com/rc56g  (pic of smartcrash requester)

edit: i have 128mb allocated to amiga
I can't really help you on that point, sry !.
Did you use SnoopDOS, also ? This can log the whole activity done on your computer (for example, when you launch NetSurf), and you can obtain a TXT file, then, much easier to read ^^
Title: Re: duktape error NetSurf OS3
Post by: freeaks on August 15, 2016, 08:46:13 PM
i don't think it will be useful for this but, here is the snoopdoslog:
http://paste.debian.net/789741/
Title: Re: duktape error NetSurf OS3
Post by: DNADNL on August 15, 2016, 09:00:12 PM
Quote from: freeaks;812625
i don't think it will be useful for this but, here is the snoopdoslog:
http://paste.debian.net/789741/
Well, it doesn't seem to be useful, yeah... Maybe chris will have an idea with all your files.
Title: Re: duktape error NetSurf OS3
Post by: chris on August 15, 2016, 10:00:17 PM
Quote from: DNADNL;812620
Hello World !

@chris
I would like to activate the Debug commands (DUK_D, DUK_DD, DUK_DDD, DUK_DPRINT...), but what I tried didn't work. Could you please tell me how to do ?


Add the following at the top of duk_custom.h:
Code: [Select]

#define DUK_USE_DEBUG 1
#define DUK_USE_DEBUG_LEVEL 2
#define DUK_USE_DPRINT 1
#define DUK_USE_DDPRINT 1


You might want to fiddle with the value of DEBUG_LEVEL, and either add DDDPRINT or remove DDPRINT.  The debug defines don't seem to work entirely as documented.
Title: Re: duktape error NetSurf OS3
Post by: chris on August 15, 2016, 10:05:31 PM
Quote from: freeaks;812622
i installed smartcrash, does this info helps ?
http://alturl.com/rc56g  (pic of smartcrash requester)


Means nothing to me.  Maybe somebody with 68k knowledge can decode it?

Quote from: freeaks;812625
i don't think it will be useful for this but, here is the snoopdoslog:
http://paste.debian.net/789741/


Would probably have been more useful if the text wasn't all truncated at U.

Anyway, a NetSurf log would be more helpful:
netsurf -v >ram:ns.log

There isn't too much logging on exit but it might help narrow down where the crash is occurring.  I (or DNADNL) can always add more.
Title: Re: duktape error NetSurf OS3
Post by: DNADNL on August 15, 2016, 11:53:09 PM
Quote from: chris;812628
Add the following at the top of duk_custom.h:
Code: [Select]
#define DUK_USE_DEBUG 1
#define DUK_USE_DEBUG_LEVEL 2
#define DUK_USE_DPRINT 1
#define DUK_USE_DDPRINT 1

You might want to fiddle with the value of DEBUG_LEVEL, and either add DDDPRINT or remove DDPRINT.  The debug defines don't seem to work entirely as documented.
OK, I did this, but it seems nothing appears between the famous rows "Creating new duktape javascript context" and FATAL 56... is it normal ?

Here is what I wrote in duk_config.h :
Code: [Select]
//DNADNL DEBUG
#define DUK_USE_DEBUG 1
#define DUK_USE_DEBUG_LEVEL 2
#define DUK_USE_DPRINT 1
#define DUK_USE_DDPRINT 1
#define DUK_USE_DDDPRINT 1
Title: Re: duktape error NetSurf OS3
Post by: chris on August 16, 2016, 01:00:41 AM
Quote from: DNADNL;812640
OK, I did this, but it seems nothing appears between the famous rows "Creating new duktape javascript context" and FATAL 56... is it normal ?

Here is what I wrote in duk_config.h :
Code: [Select]

//DNADNL DEBUG
#define DUK_USE_DEBUG 1
#define DUK_USE_DEBUG_LEVEL 2
#define DUK_USE_DPRINT 1
#define DUK_USE_DDPRINT 1
#define DUK_USE_DDDPRINT 1


duk_custom.h, not duk_config.h
It works here, that's all I can say.
Title: Re: duktape error NetSurf OS3
Post by: DNADNL on August 16, 2016, 01:09:41 AM
Quote from: chris;812641
duk_custom.h, not duk_config.h
It works here, that's all I can say.
Woops ! Misreading, Sorry ! ^^'
Title: Re: duktape error NetSurf OS3
Post by: Tygre on August 26, 2016, 01:54:59 AM
Hi all and Chris and DNADNL in particular :)

I tried to debug this annoying Duktap error that we keep having:
Quote
PANIC 56: uncaught error (calling abort)
and it seems to me that the offending JavaScript code is actually built on the file when Duktap starts and corresponds to the code:
Code: [Select]
(function(d,a){function b(a,b,c){Object.defineProperty(a,b,{value:c,writable:!0,enumerable:!1,configurable:!0})}b(a.Logger,&quot;clog&quot;,new a.Logger(&quot;C&quot;));b(a,&quot;modLoaded&quot;,{})})(this,Duktape);which seems to me legit (at least according to JSFiddle)... Any ideas?

In attachment is the full log... :rtfm: Search for "duk_eval_raw"!

I will continue my debug to try to understand what is happening exactly...
Cheers!
Title: Re: duktape error NetSurf OS3
Post by: Tygre on August 26, 2016, 03:12:40 AM
PS. A little bit more detective work and I found the lines causing the problem:

Code: [Select]
DUK_LOCAL duk_int_t duk__parse_func_like_fnum(duk_compiler_ctx *comp_ctx, duk_bool_t is_decl, duk_bool_t is_setget) {

        // ...

        DUK_D(DUK_DPRINT(&quot;second pass of an inner func, skip the function, reparse closing brace; lex offset=%ld, line=%ld&quot;,
                             (long) lex_pt.offset, (long) lex_pt.line));

        DUK_LEXER_SETPOINT(&comp_ctx->lex, &lex_pt);
        comp_ctx->curr_token.t = 0;  /* this is needed for regexp mode */
        comp_ctx->curr_token.start_line = 0;  /* needed for line number tracking (becomes prev_token.start_line) */
        duk__advance(comp_ctx);
        duk__advance_expect(comp_ctx, DUK_TOK_RCURLY);

        // ...
}
The offending line is exactly:
Code: [Select]
duk__advance_expect(comp_ctx, DUK_TOK_RCURLY);
because, for some reasons, Duktape expects a right-curly brace but gets an identifier instead... I believe that the syntax-error happens between the right-curly brace and the identifier b in:
Code: [Select]
(function(d,a){function b(a,b,c){Object.defineProperty(a,b,{value:c,writable:!0,enumerable:!1,configurable:!0})}b(a.Logger,"clog",new a.Logger("C"));b(a,"modLoaded",{})})(this,Duktape);Any suggestions? Does this help?

Cheers!
Title: Re: duktape error NetSurf OS3
Post by: chris on August 26, 2016, 08:40:45 AM
@Tygre

Doesn't mean a thing to me. You're probably best off putting it on the netsurf-dev list (try to generate some interest), or putting it on the Duktape bugtracker https://github.com/svaarala/duktape/issues with the log.
Mention it's 68k and NetSurf, Duktape 1.5.0. See what happens.

One thing you could try first, is if you have a standalone build of Duktape 1.5.0 you could run that code through it see if the fatal error still occurs.
Title: Re: duktape error NetSurf OS3
Post by: Tygre on August 26, 2016, 07:35:52 PM
Hi Chris

Thanks Chris!

Quote from: chris;812995
You're probably best off putting it on the netsurf-dev list (try to generate some interest), or putting it on the Duktape bugtracker https://github.com/svaarala/duktape/issues with the log.
Mention it's 68k and NetSurf, Duktape 1.5.0. See what happens.

I contacted yesterday Sami (Vaarala, who helped me few months ago to compile Duktape with VBCC) and I'm now waiting for some answers :laugh1:

Eventually, I will contact NetSurf / Duktape communities...

Quote from: chris;812995
One thing you could try first, is if you have a standalone build of Duktape 1.5.0 you could run that code through it see if the fatal error still occurs.

Yep, same idea here :) I tried with Duktape 1.3.1, worked fine (compiled and run on my Amiga) :angry:

Will try later with 1.5.0...

Talk to you soon!
Title: Re: duktape error NetSurf OS3
Post by: Tygre on August 27, 2016, 04:04:14 AM
Hi Chris and all!

Just to let you know that Sami replied to me very fast and very kindly with several suggestions :angel:

I tried some of his suggestions and got NetSurf and Duktape to compile and run :cool: I am now waiting for his feedback to confirm that my changes make sense or not...

Now, don't get too excited because nothing happens... I loaded various Web pages with JavaScript code and nothing happens but I believe that it could be now due to the way NetSurf handles JavaScript code? :swords:

For example, I noticed something called NETSURF_DUKTAPE_PROTOTYPE_WINDOW in the logs of Duktape... My guess is that this is the "callback" used by NetSurf to control what Duktape should do when it encounters an alert()? Any idea?

Take care!
Title: Re: duktape error NetSurf OS3
Post by: chris on August 27, 2016, 06:58:33 AM
Quote from: Tygre;813026
Hi Chris and all!

Just to let you know that Sami replied to me very fast and very kindly with several suggestions :angel:

I tried some of his suggestions and got NetSurf and Duktape to compile and run :cool: I am now waiting for his feedback to confirm that my changes make sense or not...


Great!

Quote


Now, don't get too excited because nothing happens... I loaded various Web pages with JavaScript code and nothing happens but I believe that it could be now due to the way NetSurf handles JavaScript code? :swords:

For example, I noticed something called NETSURF_DUKTAPE_PROTOTYPE_WINDOW in the logs of Duktape... My guess is that this is the "callback" used by NetSurf to control what Duktape should do when it encounters an alert()? Any idea?


I'm not sure alert() is implemented in any visible way - I don't recall seeing any JS alerts since the changeover to Duktape.

This is a good test page:
http://www.javatester.org/javascript.html
Title: Re: duktape error NetSurf OS3
Post by: Tygre on August 27, 2016, 01:57:54 PM
Hi Chris!

Quote from: chris;813032

I'm not sure alert() is implemented in any visible way - I don't recall seeing any JS alerts since the changeover to Duktape.

This is a good test page:
http://www.javatester.org/javascript.html


Yes, exactly the page I have been using :) but it says that JavaScript is not working, it uses the noscript tag, is it implemented in NetSurf?

Code: [Select]
<script language=&quot;JavaScript&quot;>
     document.write (&quot; &nbsp; JavaScript &nbsp; <b>IS WORKING</b> &nbsp; in your web browser &nbsp;&quot; );
</script>
<noscript>&nbsp; JavaScript <b>IS NOT WORKING</b> in your web browser &nbsp;
</noscript>


I have also used the JavaScripter Web site, which has a simple page with the alert, and my own simpler page, but still no luck:

Code: [Select]
Alert Example




So, alert() may not be implemented but what about a simple document.write()? Into whose backyard does it fall? NetSurf's community?

Cheers! :)
Title: Re: duktape error NetSurf OS3
Post by: Tygre on August 27, 2016, 02:00:57 PM
PS. Sami confirmed that my fix may be the best solution to get Duktape to compile and run on AmigaOS3: all in duk_config.h, DUK_F_USE_REPL_ALL must be defined by:


Let me know!
Title: Re: duktape error NetSurf OS3
Post by: chris on August 27, 2016, 07:01:02 PM
Quote from: Tygre;813044
PS. Sami confirmed that my fix may be the best solution to get Duktape to compile and run on AmigaOS3: all in duk_config.h, DUK_F_USE_REPL_ALL must be defined by:

  • defining AMIGA
  • defining M68000
  • changing the code #elif defined(DUK_F_AMIGAOS) && defined(DUK_F_VBCC) into #elif defined(DUK_F_AMIGAOS)

Let me know!


The first two were already done (well, __m68k__ instead of M68000, but no difference).
The second one appears to have fixed the problem!
Note you need to enable Javascript in NetSurf through Prefs (the menu option just crashes) as using non-JS versions tends to switch it off.

Please thank Sami and ask him to remove that DUK_F_VBCC clause in trunk. (actually, maybe it needs to be changed to DUK_F_M68K - I'll check if this has broken OS4 a bit later! edit OS4 is fine with this change)

I've updated my archive with a JS version for testing.
Title: Re: duktape error NetSurf OS3
Post by: utri007 on August 27, 2016, 10:34:09 PM
Sorry to say but it doesn't work here. :( It also brokes menus. After I enabled java menus are not accessible anymore. Tested both of my machines with same result. Menu problem is noticeable in picture.

Another thing is that I got illeagal memory Access and needed reboot.
Title: Re: duktape error NetSurf OS3
Post by: chris on August 27, 2016, 11:04:57 PM
I repeat:
Quote
Note you need to enable Javascript in NetSurf through Prefs (the menu option just crashes)
Title: Re: duktape error NetSurf OS3
Post by: utri007 on August 27, 2016, 11:35:41 PM
My bad, I should have pay attention. It works.
Title: Re: duktape error NetSurf OS3
Post by: Tygre on August 28, 2016, 12:14:42 AM
Quote from: chris;813067
I repeat:

Thanks Chris!

Where do I find the preference program though? :)

Ah! Silly me :lol: They are in the menus...
Title: Re: duktape error NetSurf OS3
Post by: Tygre on August 28, 2016, 12:30:23 AM
And I am very happy to show that JavaScript works now for me too in NetSurf in AmigaOS3!!!

Code: [Select]

<html><head><title>Alert Example</title></head>
<body>
<script>
      document.write('Hello Amiga World!')
</script>
</body>
</html>


(http://www.chingu.asia/wiki/userfiles/image/Programming/NetSurf/NetSurf%20Test%201.png)
Title: Re: duktape error NetSurf OS3
Post by: Tygre on August 28, 2016, 12:48:48 AM
Chris, how could I help further?
Could we chat by PM or e-mail, please? :)

Cheers!
Title: Re: duktape error NetSurf OS3
Post by: freeaks on August 28, 2016, 10:46:46 AM
well done Tygre !
thanks for helping at making a better netsurf on amiga
Title: Re: duktape error NetSurf OS3
Post by: gregthecanuck on August 28, 2016, 10:50:19 AM
Tygre - nice work!!

Thanks for jumping in and helping out on the Netsurf project. There are a lot of people looking to Netsurf to be developed further and come into its own as a great browsing solution for OS3 (and other platforms).

If there is a way to lend a hand to the Netsurf team that would be appreciated by many users. There are going to be a lot of Vampire users coming out of the woodwork in the next few months and a decent browser is badly needed. Netsurf is very close.

Cheers!
Greg
Title: Re: duktape error NetSurf OS3
Post by: chris on August 28, 2016, 11:55:42 AM
Quote from: Tygre;813076
Chris, how could I help further?
Could we chat by PM or e-mail, please? :)


Well, there's the usual stuff (http://www.netsurf-browser.org/developers/contribute.html), and any OS3-specific bugs would be worth fixing (that JS menu item, tabs, the crash on exit that was mentioned, etc).

Of course you can email me :)
Title: Re: duktape error NetSurf OS3
Post by: utri007 on August 28, 2016, 12:37:19 PM
Quote from: chris;813107
Well, there's the usual stuff (http://www.netsurf-browser.org/developers/contribute.html), and any OS3-specific bugs would be worth fixing (that JS menu item, tabs, the crash on exit that was mentioned, etc).

Of course you can email me :)


I haven't get that crash on exit ever. When I resize and move Netsurf window buttons etc. GUI is not refreshed. Java menu item is weird it kills whole menu, not just a crash. Tabs kills Netsurf.

One new problem is that I can't restart Netsurf anymore. If I quit Netsurf wait a some secons and restart it, I get illegal memory Access and whole system freezes.
Title: Re: duktape error NetSurf OS3
Post by: utri007 on August 28, 2016, 03:08:18 PM
Some speedtesting. Java enabled rendering this site takes 50-57 seconds with 68060 66mhz. Without java 20-23 seconds.
Title: Re: duktape error NetSurf OS3
Post by: fishy_fiz on August 28, 2016, 03:29:05 PM
Javascript isnt Java.  :)

The OCD in me couldnt refrain after seeing this mistake made a handfull of times.

On a less pedantic note, thanks for your efforts to everyone involved.
Title: Re: duktape error NetSurf OS3
Post by: utri007 on August 28, 2016, 06:10:45 PM
Quote from: fishy_fiz;813115
Javascript isnt Java.  :)

The OCD in me couldnt refrain after seeing this mistake made a handfull of times.

On a less pedantic note, thanks for your efforts to everyone involved.


Amiga point of view, Java is meaningless, as there is no java for 68k amigas. OS4 has some sort of java wich is work in progres. So forgive me for being lazy to wrote java, instead java script.
Title: Re: duktape error NetSurf OS3
Post by: fishy_fiz on August 29, 2016, 03:06:21 AM
Actually there's efforts for a JVM for all amiganoid systems, including OS3.
And theyre completely different things to Javascript. Not interchangable just because one doesnt exist for amiga platforms.
Doing so is as accurate as calling Actionscript "AMOS" (because the amiganoid platforms have no flash or actionscript)  :)
Title: Re: duktape error NetSurf OS3
Post by: Tygre on September 14, 2016, 06:56:34 PM
@freeaks and @gregthecanuck

Thanks a lot!
Will try to contribute further :)
Title: Re: duktape error NetSurf OS3
Post by: Tygre on September 14, 2016, 07:04:46 PM
Hi Chris!

Quote from: chris;813107
Well, there's the usual stuff (http://www.netsurf-browser.org/developers/contribute.html), and any OS3-specific bugs would be worth fixing (that JS menu item, tabs, the crash on exit that was mentioned, etc).

Of course you can email me :)

Thanks a lot and sorry for the silence, busy with the "back to school" :rolleyes:
Actually, I would rather contribute for OS3-specific bugs... could you give me more info.? I will e-mail you!

Cheers!
Title: Re: duktape error NetSurf OS3
Post by: utri007 on September 23, 2016, 10:53:53 PM
Any recent procres with this :)