Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Task failure loading an image from the commandline #3108

Closed
larsbergstrom opened this issue Aug 18, 2014 · 2 comments
Closed

Task failure loading an image from the commandline #3108

larsbergstrom opened this issue Aug 18, 2014 · 2 comments
Labels

Comments

@larsbergstrom
Copy link
Contributor

@larsbergstrom larsbergstrom commented Aug 18, 2014

./servo http://s27.postimg.org/vqbtrolyr/servo.jpg

According to @Ms2ger, this is attempting to read in the jpeg as an HTML file. We then crash in hubbub attempting to create a string with non-UTF8 characters.

task 'ScriptTask' failed at 'called `Result::unwrap()` on an `Err` value: [239, 191, 189, 23, 47, 91, 45, 239, 191, 189, 91, 239, 191, 189, 31, 239, 191, 189, 239, 191, 189, 101, 23, 198, 159, 239, 191, 189, 239, 191, 189, 246, 188, 178, 183, 239, 191, 189, 239, 191, 189]', /home/larsberg/rust/src/libcore/result.rs:548
stack backtrace:
   1:           0xfb6210 - rt::backtrace::imp::write::h31edb94522b79b60gcq
   2:           0xfb9270 - failure::on_fail::hb2b37deb41014e2frxq
   3:           0xfd7d40 - unwind::begin_unwind_inner::hb0aa0f9950827646B8d
   4:           0xfd7a30 - unwind::begin_unwind_fmt::hef9a8959da61fbba65d
   5:           0xfd79f0 - rust_begin_unwind
   6:          0x10084d0 - failure::begin_unwind::h9965619bbb55eb47c0j
   7:           0xf9f3b0 - fmt::format::h56249d3ff4157084bYp
   8:           0x7f1910 - dom::attr::Attr::set_value::ha6e6fe6170468319yAZ
   9:           0x812cf0 - dom::element::JSRef<'a, Element>.AttributeHandlers::do_set_attribute::h3a009df2ffefc702y34
  10:           0x812700 - dom::element::JSRef<'a, Element>.AttributeHandlers::set_attribute_from_parser::h473f70b24b272d89DX4
  11:           0x8a79c0 - html::hubbub_html_parser::parse_html::closure.85651
  12:           0xcb7300 - hubbub::tree_callbacks::create_element::h77b137ab60f0220fbUa
  13:           0xcbce20 - insert_element
  14:           0xcc9cd0 - handle_in_body
  15:           0xcbbff0 - hubbub_treebuilder_token_handler
  16:           0xcbd720 - hubbub_tokeniser_emit_token
  17:           0xcbd7f0 - emit_current_tag
  18:           0xcc4280 - hubbub_tokeniser_run
  19:           0xcb9880 - hubbub_parser_parse_chunk
  20:           0xcb8b50 - hubbub::Parser<'a>::parse_chunk::h1603f5c703b297c17ta
  21:           0x8959f0 - html::hubbub_html_parser::parse_html::h56843be8a1735d51SOl
  22:           0x9323f0 - script_task::ScriptTask::load::hb267e5d49c0f34359Eo
  23:           0x91f8f0 - script_task::ScriptTask::handle_msgs::hd14c335bcc1a5125Rko
  24:           0x91f8a0 - script_task::ScriptTask::start::h5f9cbd090f299ebdHko
  25:           0x484920 - script_task::ScriptTask.ScriptTaskFactory::create::closure.10135
  26:           0x47f790 - task::TaskBuilder<S>::try_future::closure.10046
  27:           0xcabb60 - task::bootstrap_green_task::closure.6716
  28:           0xfd8a20 - rust_try
  29:           0xfd58e0 - unwind::try::h0648d3e5329c30960Wd
  30:           0xfd5690 - task::Task::run::h3139914caede1196C4c
  31:           0xcab8d0 - task::bootstrap_green_task::hec3319e2cc8a64a6Pdc
  32:                0x0 - <unknown>

And:

DEBUG:hubbub::hubbub::tree_callbacks: from_hubbub_string: �/[-�[���eƟ��������
@Manishearth
Copy link
Member

@Manishearth Manishearth commented Aug 18, 2014

Would it make sense to detect images by MIME types and wrapping them in a tiny HTML document? Most browsers seem to do that.

Manishearth added a commit to Manishearth/servo that referenced this issue Aug 21, 2014
Manishearth added a commit to Manishearth/servo that referenced this issue Aug 25, 2014
Manishearth added a commit to Manishearth/servo that referenced this issue Aug 26, 2014
Manishearth added a commit that referenced this issue Aug 26, 2014
Load bare images within an HTML document (#3108); r=Ms2ger
@Manishearth
Copy link
Member

@Manishearth Manishearth commented Aug 26, 2014

Fixed in #3131

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.