CatBlock / catblock

CatBlock - An ad-blocking extension (with an ability to replace ads by pictures) for all major desktop browsers!
https://getcatblock.com
GNU General Public License v3.0
95 stars 44 forks source link

the el could be document itself. #65

Closed l12436 closed 8 years ago

l12436 commented 8 years ago

僅限英文!

Please answer the following questions so that we can process your bug report, otherwise, we may have to ignore it.

Can you provide detailed steps on how to reproduce the problem?

  1. browse this url https://share.dmhy.org/topics/list?keyword=%E5%BE%9E%E9%9B%B6%E9%96%8B%E5%A7%8B%E7%9A%84%E7%95%B0%E4%B8%96%E7%95%8C%E7%94%9F%E6%B4%BB&sort_id=0&team_id=407&order=date-desc
  2. see the console, you will saw three error

What should happen when you do the above steps

What actually happened?
catblock/contentscript.js:115 el could be the document itself. and the document did not has width and height prop. causing javascript crash.

you could return undefined if the el is same as document. this code could fix this if (el == document) { return undefined; }

Do you have any other comments? If you can, can you please attach a screenshot of the bug?

--- The questions below are optional but VERY helpful. ---

If unchecking all filter lists fixes the problem, which one filterlist must you check to cause the problem again after another restart?

Technical Chrome users: Go to chrome://extensions ->Developer Mode -> Inspect views: background page -> Console. Paste the contents here:

tomasko126 commented 8 years ago

Hi @l12436,

Thanks for submitting a bug report and sorry for a delay! Could you please provide us a debug data from CatBlock's Options page -> Support tab?

Thank you.

l12436 commented 8 years ago

=== Filter Lists === adblock_custom last updated: Tue, 23 Aug 2016 06:32:15 GMT easylist last updated: Tue, 23 Aug 2016 06:32:43 GMT malware last updated: Tue, 23 Aug 2016 06:32:15 GMT chinese last updated: Tue, 23 Aug 2016 06:32:16 GMT warning_removal last updated: Tue, 23 Aug 2016 06:33:50 GMT

=== Settings === catblock: true debug_logging: false youtube_channel_whitelist: false whitelist_hulu_ads: false show_context_menu_items: true show_advanced_options: false display_stats: true display_menu_stats: true show_block_counts_help_link: true malware-notification: undefined

=== Other Info === CatBlock version number: 1.4.4 Developer UserAgent: Mozilla/5.0 (X11 Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.116 Safari/537.36

tomasko126 commented 8 years ago

@l12436 Thanks for debug info. I have visited the link you've posted above and saw these three errors:

snimka obrazovky 2016-08-25 o 2 16 16

Did you mean these errors? Thanks

l12436 commented 8 years ago

nope, there are some backtrace below. something like this. wine2

tomasko126 commented 8 years ago

@l12436 Thanks for the stack trace info. I am not able to reproduce this error but will look further into this bug.

tomasko126 commented 8 years ago

@l12436 A fix is on the way - https://github.com/CatBlock/catblock/pull/66