Bug 798103 - elinks crashes on loading the attached page with ecmascript enabled
Summary: elinks crashes on loading the attached page with ecmascript enabled
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: elinks
Version: 16
Hardware: x86_64
OS: Linux
unspecified
urgent
Target Milestone: ---
Assignee: Kamil Dudka
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-02-28 03:46 UTC by SharpyWarpy
Modified: 2012-08-03 07:52 UTC (History)
2 users (show)

Fixed In Version: elinks-0.12-0.28.pre5.fc17
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-03-17 23:45:52 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
This WAS the startup homepage for elinks that caused immediate crash. (1.92 KB, text/html)
2012-03-08 02:27 UTC, SharpyWarpy
no flags Details

Description SharpyWarpy 2012-02-28 03:46:17 UTC
Description of problem:

Elinks crashes with javascript (spidermonkey) enabled
Version-Release number of selected component (if applicable):
elinks 0.12pre5
How reproducible:
Every time

Steps to Reproduce:
1.open elinks config file, ~/.elinks/elinks.conf and enable ECMA script
2.
3.
  
Actual result: Attempts to start and does not.


Expected results: Elinks to open to startup file.


Additional info:Output dialog following crash:
ELinks crashed. That shouldn't happen. Please report this incident to
the developers. If you would like to help to debug the problem you just
uncovered, please keep the core you just got and send the developers
the output of 'bt' command entered inside of gdb (which you run as:
gdb elinks core). Thanks a lot for your cooperation!

ELinks 0.12pre5
Built on May  6 2011 13:56:28

Features:
Standard, IPv6, gzip, bzip2, UTF-8, Periodic Saving, Viewer (Search
History, Timer, Marks), Cascading Style Sheets, Protocol
(Authentication, BitTorrent, File, FTP, HTTP, URI rewrite, User
protocols), SSL (OpenSSL), MIME (Option system, Mailcap, Mimetypes
files), LED indicators, Bookmarks, Cookies, ECMAScript (SpiderMonkey),
Form History, Global History, Scripting (Spidermonkey ECMAScript), Goto
URL History

elinks(dump_backtrace+0x20)[0x4b0f40]
elinks[0x47b65e]
elinks[0x47b93b]
/lib64/libpthread.so.0[0x3f4440f4f0]
elinks(done_heartbeat+0x10)[0x4642e0]
elinks(spidermonkey_eval+0x9a)[0x45f68a]
elinks(ecmascript_eval+0x53)[0x45e2c3]
elinks(render_document+0x23e)[0x441a9e]
elinks(render_document_frames+0x18e)[0x44204e]
elinks(draw_formatted+0x44)[0x4baf34]
elinks(doc_loading_callback+0x103)[0x4a0ed3]
elinks[0x4751f7]
elinks[0x475a74]
elinks(abort_connection+0x6f)[0x47679f]
elinks(file_protocol_handler+0x151)[0x491661]
elinks[0x476548]
elinks(check_bottom_halves+0x46)[0x471ab6]
elinks(select_loop+0x468)[0x4722e8]
elinks(main+0x39)[0x417cd9]
/lib64/libc.so.6(__libc_start_main+0xed)[0x3f43c2169d]
Aborted (core dumped)

This is using the elinks package which ships Fedora 16. I'm using 64 bit.I've tried compiling other STABLE versions of elinks to no avail. I have js, js-devel and js-debugging packages installed, all version 1.8.5. No problems with Firefox using this same javascript installation.

Comment 1 Kamil Dudka 2012-02-28 14:14:03 UTC
Works fine here.  Please attach the contents of your ~/.elinks/elinks.conf and the output of 'rpm -q elinks js'.  What site are you connecting to when the crash happens?

Comment 2 SharpyWarpy 2012-02-28 19:22:19 UTC
contents of ~/.elinks/elinks.conf:
## ELinks 0.12pre5 configuration file

## This is ELinks configuration file. You can edit it manually,
## if you wish so; this file is edited by ELinks when you save
## options through UI, however only option values will be altered
## and missing options will be added at the end of file; if option
## is not written in this file, but in some file included from it,
## it is NOT counted as missing. Note that all your formatting,
## own comments and so on will be kept as-is.
##
## Obviously, if you don't like what ELinks is going to do with
## this file, you can change it by altering the config.saving_style
## option. Come on, aren't we friendly guys after all?



##############################
# Automatically saved options
#

## config 
#  Configuration handling options.

  ## config.saving_style_w [0|1]
  #  This is internal option used when displaying a warning about obsolete
  #  config.saving_style. You shouldn't touch it.
  set config.saving_style_w = 1


## ui 
#  User interface options.

  ## ui.sessions 
  #  Sessions settings.

    ## ui.sessions.homepage <str>
    #  The URI to load either at startup time when no URI was given on the
    #  command line or when requested by the goto-url-home action. Set to "" if
    #  the environment variable WWW_HOME should be used as homepage URI instead.
    set ui.sessions.homepage = "/rbandmb/.elinks/DuckDuckGo.html"


  ## ui.language <language>
  #  Language of user interface. 'System' means that the language will be
  #  extracted from the environment dynamically.
  set ui.language = "System"





##################################
# Automatically saved keybindings
#

bind "main" "Q" = "quit"
bind "main" "q" = "really-quit"



##############################
# Automatically saved options
#

## ecmascript 
#  ECMAScript options.

  ## ecmascript.enable [0|1]
  #  Whether to run those scripts inside of documents.
  set ecmascript.enable = 0


##############################
# Automatically saved options
#

## document 
#  Document options.

  ## document.colors 
  #  Default document color settings.

    ## document.colors.text <color|#rrggbb>
    #  Default text color.
    set document.colors.text = "white"






##############################
# Automatically saved options
#

## document 
#  Document options.

  ## document.colors 
  #  Default document color settings.

    ## document.colors.background <color|#rrggbb>
    #  Default background color.
    set document.colors.background = "black"



## ui 
#  User interface options.

  ## ui.success_msgbox [0|1]
  #  When you pressed a [ Save ] button in some manager, this option will make
  #  sure that a box confirming success of the operation will pop up.
  set ui.success_msgbox = 0





##############################
# Automatically saved options
#

## document 
#  Document options.

  ## document.browse 
  #  Document browsing options (mainly interactivity).

    ## document.browse.forms 
    #  Options for handling of the forms interaction.

      ## document.browse.forms.confirm_submit [0|1]
      #  Ask for confirmation when submitting a form.
      set document.browse.forms.confirm_submit = 0







##############################
# Automatically saved options
#

## ui 
#  User interface options.

  ## ui.colors 
  #  Default user interface color settings.

    ## ui.colors.color 
    #  Color settings for color terminal.

      ## ui.colors.color.dialog 
      #  Dialog colors.

        ## ui.colors.color.dialog.generic 
        #  Generic dialog colors.

          ## ui.colors.color.dialog.generic.text <color|#rrggbb>
          #  Default text color.
          set ui.colors.color.dialog.generic.text = "white"

          ## ui.colors.color.dialog.generic.background <color|#rrggbb>
          #  Default background color.
          set ui.colors.color.dialog.generic.background = "black"









##############################
# Automatically saved options
#

## document 
#  Document options.

  ## document.colors 
  #  Default document color settings.

    ## document.colors.use_document_colors <num>
    #  Use colors specified in document:
    #  0 is use always the default settings
    #  1 is use document colors if available, except background
    #  2 is use document colors, including background. This can
    #    mostly look very impressive, but some sites will appear
    #    really ugly. Note, that obviously if the background is
    #    not black, it will break the behaviour of transparency.
    set document.colors.use_document_colors = 0






##############################
# Automatically saved options
#

## ecmascript 
#  ECMAScript options.

  ## ecmascript.ignore_noscript [0|1]
  #  Whether to ignore content enclosed by the <noscript> tag when ECMAScript is
  #  enabled.
  set ecmascript.ignore_noscript = 1

  ## ecmascript.block_window_opening [0|1]
  #  Whether to disallow scripts to open new windows or tabs.
  set ecmascript.block_window_opening = 1





##################################
# Automatically saved keybindings
#

bind "main" "," = "open-os-shell"
 
And output of "rpm -q elinks js":
elinks-0.12-0.26.pre5.fc16.x86_64
js-1.8.5-7.fc16.x86_64

Comment 3 SharpyWarpy 2012-02-28 19:27:46 UTC
I should add here the config file has javascript disabled. Otherwise elinks won't start. I can enable it from the browser after start but it eventually will freeze. "killall elinks" from another tty (or, in X, another terminal emulator) is all I can do. I should also say sometimes elinks freezes WITHOUT javascript enabled, but not nearly as often. It does not seem to matter what site I am attempting to load. None in particular. Thank you.

Comment 4 Kamil Dudka 2012-02-28 19:52:16 UTC
Thanks for the additional info.  I am still not able to repeat the issue.  I was testing it on an up2date rawhide machine with elinks and js downgraded to f16 versions.  I will try it on a genuine f16 installation.

(In reply to comment #3)
> It does not seem to matter what site I am attempting to load. None in particular.

Then you can give us an example of a site you were testing it with?

Comment 5 SharpyWarpy 2012-02-28 22:29:39 UTC
No, darn it I can't. I just tried several sites, even one test site that popped up a dialog box with "You can use javascript". Bear in mind I can't start elinks with javascript enabled. I have to manually disable it with the config file then enable it within elinks. That said, no, I could not get it to crash. I'm in KDE now. It shouldn't matter if I'm in multi-user mode though, should it? Maybe I should try that too, maybe it was only in console mode. But I don't see how that would be different.

Comment 6 SharpyWarpy 2012-02-28 22:52:39 UTC
Just tried it in console mode and it locked up. That's after I edited the config file to disable javascript first. Then I changed it to enable javascript within the browser. After navigating several pages of no particular interest or complication I hit the "next" on the Google search engine with an example search for "test javascript" and it said "Request Sent" and hung there. There was no response to anything. It would not stop when I hit the "z" key, the menu would not come up with "Escape", control-c had no effect. I logged into tty2 and entered "killall elinks" with no effect on tty1. I did this several times and finally decided to do "killall -9 elinks" which of course killed the process. Then I edited the config file to disable javascript and everything worked without stalling or hanging. Hope this helps.

Comment 7 SharpyWarpy 2012-02-29 00:54:49 UTC
Is there anything else I can do to help? I'd upload the core file but it's 19mb and that's pretty big for dial up. I suppose I could let it upload all night to my website and provide the URL. 1.7kbs isn't very fast, that's my upload speed. Poor choice of words there, "speed".

Comment 8 Kamil Dudka 2012-03-02 13:56:12 UTC
(In reply to comment #4)
> I will try it on a genuine f16 installation.

I tried your elinks.conf on a genuine f16 installation and it worked just fine.  Note there was ECMA script disabled in your configuration, so I enabled it.

(In reply to comment #7)
> Is there anything else I can do to help?

Yes, please tell me a publicly available web site I can test it with.

Comment 9 SharpyWarpy 2012-03-02 20:00:01 UTC
A publicly available web site you can test it with. Just about any, really. Can we make sure we're on the same page here on a couple of things? About the elinks.conf file, I know javascript was disabled there. As I have said I have to disable it manually like that before elinks will start. Otherwise it refuses to start and spits out the error message I posted earlier. After I start it then I open the options dialogue and enable javascript to continue. Also, did you notice my comment about running it in console mode? You didn't mention whether you ran it in X or in console (multi-user) mode. In X it does not misbehave NEARLY as much as in console mode. That is to say, run level 3. Did you try it in run level 3 or were you in X (run level 5)? Just to be clear, I don't mean to sound angry or condescending at all, please. I would not continue with this issue purely for myself, I am also thinking of people who have vision impairments and require a good text browser in conjunction with a reader program. Thank you very much for your time, I'm sure it is extremely valuable.

Comment 10 Kamil Dudka 2012-03-02 20:41:37 UTC
(In reply to comment #9)
> A publicly available web site you can test it with. Just about any, really.

I tried the following, it did not crash:

elinks https://github.com/kdudka

> Can we make sure we're on the same page here on a couple of things? About the
> elinks.conf file, I know javascript was disabled there. As I have said I have
> to disable it manually like that before elinks will start. Otherwise it refuses
> to start and spits out the error message I posted earlier.

You pasted a configuration file that prevents your elinks from crashing on startup whereas I asked you to attach a configuration file that _triggers_ the crash.

> After I start it then I open the options dialogue and enable javascript to continue.

I tried exactly that and it worked.

> Also, did you notice my comment about running it in console mode?

Pardon my ignorance, but elinks always runs in console mode, doesn't it?

> You didn't mention
> whether you ran it in X or in console (multi-user) mode. In X it does not
> misbehave NEARLY as much as in console mode. That is to say, run level 3. Did
> you try it in run level 3 or were you in X (run level 5)?

I tried it via ssh interactive session, will check it on tty[1-6] in run level 3 as soon as I have a better connection bandwidth to my Fedora 16 VM.

Comment 11 SharpyWarpy 2012-03-02 22:02:21 UTC
Forgive me if my terminology is wrong. What I mean by "console mode" is in run level 3 -- without X windows, without KDE or Gnome. I boot into run level 3 which is multi-user and if I want KDE I start it from there. What you call console in X, whether it's KDE or Gnome, I call a terminal. I think Windows users call it "command prompt". I like running elinks in run level 3 because KDE interferes with elinks. For one thing I can't get full screen. And some of the keys don't behave like they should. For example when I open a new tab it becomes high-lited and switching back and forth between tabs with "shift-<" and "shift->" leaves me wondering which tab I'm actually using. It's one of the differences encountered between using elinks in KDE and in run level 3. All that being said I hope you understand more what I meant by "console". Thank you.

Comment 12 SharpyWarpy 2012-03-02 22:13:57 UTC
How about tonight I upload the directory containing the coredump file and all the other files associated with running elinks with ecmascript enabled? That is to say, when it fails to start? Would that provide more insight to the problem? I can provide the URL for you after the upload.

Comment 13 SharpyWarpy 2012-03-03 01:48:33 UTC
Okay I uploaded all the files pertaining to the core dump to this directory:
ftp.wfeca.net/users/rbandmb/ccpp-2012-03-02-16:08:31-2081 and I changed the permissions so the directory and all its contents are read by all. So using wget should work to get all that. Hope it helps.

Comment 14 SharpyWarpy 2012-03-04 20:27:16 UTC
Oh crap, I'm sorry. Don't know what I was thinking. That link should have been:
http://www.wfeca.net/users/rbandmb/ccpp-2012-03-02-16:08:31-2081
"wget -r" should get it, there are no subdirectories there, just the core dump and related files.

Comment 15 Kamil Dudka 2012-03-05 11:53:48 UTC
Thanks for the details.  It looks like the js package you are using is not from the Fedora Project repository although all the other packages from dso_lsit are.  Why?

Comment 16 SharpyWarpy 2012-03-05 15:51:27 UTC
Because in an effort to solve the problem I downloaded the js source and compiled it and installed.

Comment 17 Kamil Dudka 2012-03-05 18:10:21 UTC
Please reinstall the js package by the original one.  I was not even able to get a backtrace from your core file.

Comment 18 SharpyWarpy 2012-03-05 23:14:18 UTC
Okay I'll do that and run elinks with javascript enabled, then I'll upload the core dump files again. When that's done uploading I'll give you the new URL for downloading.

Comment 19 SharpyWarpy 2012-03-06 00:28:43 UTC
Here's the new URL:
http://www.wfeca.net/users/rbandmb/ccpp-2012-03-05-17:47:12-3001

Comment 20 SharpyWarpy 2012-03-07 04:56:16 UTC
Something I've discovered. When I start elinks with no startup URI even with javascript enabled it does not crash. However, if I set a LOCAL startup page, it will crash unless I disable javascript in the elinks.conf file first. Now get this: If I set a remote startup page, such as "www.google.com" it does not crash even with javascript enabled. So what has changed in regard to setting a local file as the startup page since Fedora 14? Because that seems to be what is causing the crash, at least the crash on initial starup WITH javascript enabled. Confusing.

Comment 21 SharpyWarpy 2012-03-07 05:36:49 UTC
Well it seems the local file I was using as elinks startup homepage had some corrupt javascript. Probably modified and therefore corrupted by ME. I am using a different local startup homepage file and now it starts without crashing WITH javascript enabled. So at least the startup crash is fixed. That was all my fault. Now in the coming days I will see if elinks crashes in console mode during use. I will report back. One thing I want to add is with Fedora 14 I used the same corrupt startup homepage file and it always started without crashing. It's late and I'm frazzled.

Comment 22 SharpyWarpy 2012-03-08 02:27:42 UTC
Created attachment 568471 [details]
This WAS the startup homepage for elinks that caused immediate crash.

It occurred to me the starup homepage that was causing immediate crash of elinks might be helpful in troubleshooting this bug. I have changed the startup homepage and it now starts. But if I try to load the file I attached here elinks crashes.

Comment 23 Kamil Dudka 2012-03-09 12:27:42 UTC
(In reply to comment #22)
> Created attachment 568471 [details]
> This WAS the startup homepage for elinks that caused immediate crash.

Thanks.  This answers my question from comment #1.  I am able to reproduce the crash now, will have a look what is wrong.

Comment 24 Kamil Dudka 2012-03-09 13:02:05 UTC
This will fix it:

http://repo.or.cz/w/elinks.git/commitdiff/12803e4

Comment 25 Kamil Dudka 2012-03-09 13:18:14 UTC
fixed in elinks-0.12-0.28.pre5.fc18

Comment 26 Fedora Update System 2012-03-09 13:25:34 UTC
elinks-0.12-0.27.pre5.fc16 has been submitted as an update for Fedora 16.
https://admin.fedoraproject.org/updates/elinks-0.12-0.27.pre5.fc16

Comment 27 Fedora Update System 2012-03-09 13:27:25 UTC
elinks-0.12-0.26.pre5.fc15 has been submitted as an update for Fedora 15.
https://admin.fedoraproject.org/updates/elinks-0.12-0.26.pre5.fc15

Comment 28 Fedora Update System 2012-03-09 13:27:56 UTC
elinks-0.12-0.28.pre5.fc17 has been submitted as an update for Fedora 17.
https://admin.fedoraproject.org/updates/elinks-0.12-0.28.pre5.fc17

Comment 29 SharpyWarpy 2012-03-09 14:22:43 UTC
Thank you, Kamil, for your hard work and patience.

Comment 30 Fedora Update System 2012-03-09 17:56:16 UTC
Package elinks-0.12-0.28.pre5.fc17:
* should fix your issue,
* was pushed to the Fedora 17 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing elinks-0.12-0.28.pre5.fc17'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2012-3449/elinks-0.12-0.28.pre5.fc17
then log in and leave karma (feedback).

Comment 31 SharpyWarpy 2012-03-09 22:11:50 UTC
Already updated. Works fine now. Surfed several javascript intensive sites with no problems. I sincerely appreciate all your work. And I'm sure it will benefit many others too, especially those with vision impairments.

Comment 32 Kamil Dudka 2012-03-10 03:05:58 UTC
Great.  Thanks for testing it!

Comment 33 SharpyWarpy 2012-03-10 03:22:04 UTC
(In reply to comment #32)
> Great.  Thanks for testing it!

You are quite welcome, thank YOU, sir.

Comment 34 Fedora Update System 2012-03-17 23:45:52 UTC
elinks-0.12-0.26.pre5.fc15 has been pushed to the Fedora 15 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 35 Fedora Update System 2012-03-17 23:59:33 UTC
elinks-0.12-0.27.pre5.fc16 has been pushed to the Fedora 16 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 36 Fedora Update System 2012-03-18 00:46:40 UTC
elinks-0.12-0.28.pre5.fc17 has been pushed to the Fedora 17 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 37 SharpyWarpy 2012-08-03 00:54:00 UTC
This bug is still not fixed. I navagated to this site:
http://www.nbcnews.com/
and keyedin "shift-t" on the following link on said page:
'Panda Cam' captures birth at San Diego Zoo
which has the following javascript code:
javascript:vPlayer('48462421','617233ce-1ede-4c7d-a78e-af3292866509','26184891')
and the following error popped up right there in the middle of the page and would not go away until I keyed in "ctl-l".
INTERNAL ERROR at spidermonkey.c:71: assertion interpreter && interpreter->vs && interpreter->vs->doc_view && interpreter->vs->doc_view->session && interpreter->vs->doc_view->session->tab failed!
The browser did not crash but since this is definitely still a javascript problem I feel it prudent to add this information to this bug report. Especially since the fix before was to include "Do Not Crash" to the source code. I suspect the same problem is still there, the browser is just not crashing now. What does happen is a new tab opens, which is expected, but the appropriate page does not load. It simply loads a copy of the original page from which the link was activated.

Comment 38 Kamil Dudka 2012-08-03 07:52:37 UTC
I believe the bug described in comment #0 is fixed.  Please submit a separate bug report for the other issue with clear steps to reproduce and attach your ~/.elinks/elinks.conf.  Thanks!


Note You need to log in before you can comment on or make changes to this bug.