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

StorageManager panicking on slashdot.org #5548

Closed
jagtalon opened this issue Apr 6, 2015 · 3 comments · Fixed by #5576
Closed

StorageManager panicking on slashdot.org #5548

jagtalon opened this issue Apr 6, 2015 · 3 comments · Fixed by #5576
Labels
A-content/script Related to the script thread E-less-complex Straightforward. Recommended for a new contributor. I-wrong An incorrect behaviour is observed.

Comments

@jagtalon
Copy link

jagtalon commented Apr 6, 2015

$ ./mach run http://slashdot.org/       
ERROR:js::rust: Error at http://slashdot.org/:25: ReferenceError: $ is not defined

thread 'StorageManager' panicked at 'called `Option::unwrap()` on a `None` value', /Users/larsberg/rust/src/libcore/option.rs:362
stack backtrace:
   1:        0x1073d6ded - sys::backtrace::write::h22d7886ea3e34df8JDA
   2:        0x1073eae6d - panicking::on_panic::hcde1662b6a2f62e2LsJ
   3:        0x1073b71a9 - rt::unwind::begin_unwind_inner::hc0862f0ae0b66b7chbJ
   4:        0x1073b762e - rt::unwind::begin_unwind_fmt::hce9ab1c081fbc798S9I
   5:        0x1073ea6fd - rust_begin_unwind
   6:        0x10740d3b5 - panicking::panic_fmt::hc7d3b6a3960519fdHZs
   7:        0x10740ca87 - panicking::panic::h4158d1652bbc7938TXs
   8:        0x10606eda5 - option::Option<T>::unwrap::h3301369630804163101
   9:        0x10618fada - storage_task::StorageManager::remove_item::hb6ac0603fe5c82eeuYf
  10:        0x106187ea7 - storage_task::StorageManager::start::h51a40ea5d5e9d37fORf
  11:        0x1061877ef - storage_task::StorageTask.StorageTaskFactory::new::closure.26606
  12:        0x10618771e - task::spawn_named::closure.26602
  13:        0x10618766e - thunk::Thunk<'a, (), R>::new::closure.26599
  14:        0x1061875ae - thunk::F.Invoke<A, R>::invoke::h8712563139474070488
  15:        0x106066dc0 - thunk::Thunk<'a, A, R>::invoke::h12771924919246353326
  16:        0x106067b29 - thread::Builder::spawn_inner::closure.16154
  17:        0x106067aae - rt::unwind::try::try_fn::__rust_abi::h8243538247422857478
  18:        0x106067a49 - rt::unwind::try::try_fn::h8243538247422857478
  19:        0x1073eceb8 - rust_try_inner
  20:        0x1073ecea5 - rust_try
  21:        0x106066f0b - rt::unwind::try::h1185134201880303421
  22:        0x106065acc - thread::Builder::spawn_inner::closure.16004
  23:        0x106068b67 - thunk::Thunk<'a, (), R>::new::closure.16172
  24:        0x106068a5c - thunk::F.Invoke<A, R>::invoke::h4236836237872994162
  25:        0x1073d9ce2 - sys::thread::thread_start::hc1f580397175540a22E
  26:     0x7fff8a2d6267 - _pthread_body
  27:     0x7fff8a2d61e4 - _pthread_start

Error can be replicated in this branch #5543.
You can find more information about it below #5504 (comment)

@jdm jdm added the A-content/script Related to the script thread label Apr 6, 2015
@jdm
Copy link
Member

jdm commented Apr 6, 2015

Ah, the implementation of remove_item isn't quite correct in storage_task.rs: instead of calling map, it should call and_then and remove the unwrap. This will yield an Option<String> as desired.

@jdm jdm added E-less-complex Straightforward. Recommended for a new contributor. I-wrong An incorrect behaviour is observed. labels Apr 6, 2015
@jagtalon
Copy link
Author

jagtalon commented Apr 6, 2015

@jdm wow good catch. And yeah it actually works.

screen shot 2015-04-06 at 7 45 36 pm

@jagtalon
Copy link
Author

jagtalon commented Apr 6, 2015

@jdm I have https://github.com/jagtalon/servo/commit/f9817da0c465d6a1d58e5e72e065fe167819fdbd but I should probably wait for #5543 to get merged.

bors-servo pushed a commit that referenced this issue Apr 11, 2015
Use `and_then` and remove `unwrap` instead of using a `map` as described in #5548 (comment).

Fixes #5548
jrmuizel pushed a commit to jrmuizel/gecko-cinnabar that referenced this issue Jun 12, 2017
…lon:jag/slashdot-storage); r=jdm

Use `and_then` and remove `unwrap` instead of using a `map` as described in servo/servo#5548 (comment).

Fixes #5548

Source-Repo: https://github.com/servo/servo
Source-Revision: 9754c4c255988475d12a9c64a335d9bc8828076b
gecko-dev-updater pushed a commit to marco-c/gecko-dev-comments-removed that referenced this issue Sep 30, 2019
…lon:jag/slashdot-storage); r=jdm

Use `and_then` and remove `unwrap` instead of using a `map` as described in servo/servo#5548 (comment).

Fixes #5548

Source-Repo: https://github.com/servo/servo
Source-Revision: 9754c4c255988475d12a9c64a335d9bc8828076b

UltraBlame original commit: acb172dc8353e4e88c8ae12ac3ff3c2703154275
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified that referenced this issue Oct 1, 2019
…lon:jag/slashdot-storage); r=jdm

Use `and_then` and remove `unwrap` instead of using a `map` as described in servo/servo#5548 (comment).

Fixes #5548

Source-Repo: https://github.com/servo/servo
Source-Revision: 9754c4c255988475d12a9c64a335d9bc8828076b

UltraBlame original commit: acb172dc8353e4e88c8ae12ac3ff3c2703154275
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified-and-comments-removed that referenced this issue Oct 1, 2019
…lon:jag/slashdot-storage); r=jdm

Use `and_then` and remove `unwrap` instead of using a `map` as described in servo/servo#5548 (comment).

Fixes #5548

Source-Repo: https://github.com/servo/servo
Source-Revision: 9754c4c255988475d12a9c64a335d9bc8828076b

UltraBlame original commit: acb172dc8353e4e88c8ae12ac3ff3c2703154275
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-content/script Related to the script thread E-less-complex Straightforward. Recommended for a new contributor. I-wrong An incorrect behaviour is observed.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants