Ticket #55 (new defect)

Opened 1 year ago

Last modified 3 weeks ago

Error console filled with > GM_MenuCommander.attach...

Reported by: inertia+greasemonkeybu..@gmail.com Assigned to:
Priority: major Milestone: 0.8.1
Version: Keywords:
Cc:

Description

(Copied from my posting in the GM-users discussion group: http://groups.google.com/group/greasemonkey-users/browse_frm/thread/a6a9575e3329af84)

Every time I load a page, or switch tabs the following gets added to my Error Console:

< GM_MenuCommander.attach
> GM_MenuCommander.attach
< GM_MenuCommander.detach
* this.menuPopup2: [object XULElement]
* this.menuPopup: [object XULElement]
> GM_MenuCommander.detach

This is beyond annoying as I'm trying to debug some other javascript code at the moment.

Some responses with suggestions, and my responses, again from the aforementioned discussions thread:


On Nov 6, 10:16 pm, "Patrick Wiseman" <pwise...@gmail.com> wrote:

Disable all the GM scripts running on that page. Patrick

It happens on every page, even with no scripts enabled, and with GM in disabled mode.


On Nov 6, 10:53 pm, "Patrick Wiseman" <pwise...@gmail.com> wrote:

Apologies for asking, but you have cleared the Error Console? GM_messages appearing when GM is disabled seems unlikely. Patrick

Yes, I have cleared the Error Console after disabling Greasemonkey. This is also how I identified that it's the exact the 6 messages occuring each time I switch tabs or load a new page.

The messages all seem to come from internal GS calls to GM_log: See: http://greasemonkey.devjavu.com/browser/trunk/src/content/menucommander.js?rev=205#L93 http://greasemonkey.devjavu.com/browser/trunk/src/content/menucommander.js?rev=205#L111 http://greasemonkey.devjavu.com/browser/trunk/src/content/menucommander.js?rev=205#L98


On Nov 7, 4:00 am, BD <bdggetc...@donnelly-house.net> wrote:

Parts of Gm always execute, even when it is "disabled". Unless you use the Firefox "disable this extension" feature, which requires a browser reboot and might be a severe pain. I suggest you go into the code and remove the offending error message code. It's pretty easy to do. You should be able to find the code, but if you can't, I can suggest where to look if you need me to remember where it is. (what is your OS?)

Of course, I could disable GM outright, and even uninstall it, but then I'd loose all my GM scripts, which would be quite sad (having written several myself, and even released a few of the more useful-to- the-general-public ones: http://userscripts.org/users/627/scripts).

And yes, I could go into the extensions folder, extract the jar, comment out the lines in menucommander.js. Of course, the next time extension is updated, I'd have to repeat the whole process. This doesn't really get to the root of the problem however, andI'd prefer to see the issue tackled at the source (pardon the pun). I guess I'll take this to the GM issue tracker.


On Nov 7, 9:46 am, Anthony Lieuallen <arant...@gmail.com> wrote:

It would appear, for some unknown reason, that you have the Greasemonkey "logChrome" preference set to true. Open about:config and find the "greasemonkey.logChrome" preference. If it's there and set to true, that's why. Set it to false. If it's not, there must be a bug, somewhere.

Anthony,

The setting was not in about:config, and even after adding it manually (as a boolean set to false), (even restarting firefox to be sure), the problem persists. So indeed, there must be a bug "somewhere". :)


Attachments

Change History

11/07/07 14:18:09 changed by aranti..@gmail.com

Does the error persist in a blank profile, with just GM installed? Does it persist in a blank profile with GM and all of your other normal extensions installed? If so, blank again, install one by one, and report which causes the issue.

11/07/07 14:53:08 changed by aranti..@gmail.com

OP can't log in but says:

I've identified this problem as an issue with Gmail Manager 0.5.3. With out this extension enabled, the errors go away. I will approach them with the issue. Thanks.

And I've said I/we will look into it from GM's side as well. If I get time =)

11/10/07 07:10:22 changed by aranti..@gmail.com

This is a name conflict. Both _G_rease_M_onkey and _G_mail _M_anager define a convenience function called GM_log().

The former calls it all the time, with a setting to make its output conditional. The latter always shows it, I guess manually calling it only during development.

One of the two will have to change, to work together.

(follow-up: ↓ 5 ) 12/22/07 15:39:06 changed by thalam..@hotmail.com

This is one of may reasons why Aaron added the @namespace metadatakey and it should be a valid URI. If the @namespace is just "gobbledygook", it will make it harder to implement whitelisting/blacklisting.

It sounds to me like those web owners are using GM_log in their code and of course because it's a global function you will see those messages from their server. Currently I don't see any log messages when I visit those URI's, but I also don't have a script centered around that. If you write a simple sample script to test this and post it in relation to those links, I'll ponder what I can do about it.

(in reply to: ↑ 4 ) 12/23/07 11:10:11 changed by aranti..@gmail.com

Replying to thalam..@hotmail.com:

This is one of may reasons why Aaron added the @namespace metadatakey

No, as discussed (elsewhere?) it is simply to create separate spaces for user script names. To control when a script installation is an upgrade (replace existing script) or an install (new script).

It sounds to me like those web owners are using GM_log in their code ... I don't see any log messages when I visit those URI's

Because this ticket has nothing to do with websites, and everything to do with conflicts with other extensions, which also define/call a function called GM_log() in global firefox chrome (not user) space.

03/20/08 20:48:40 changed by anonymous

徐州辉煌钢结构工程有限公司是一家集网架钢结构设计、制作、安装及技术服务为一体的大型专业化企业。公司坐落于有网架之乡美誉的江苏省徐州市,这里是全国优质网架原材料供应基地,也是全国网架技术熟练工人培训基地,有着人才,技术和原材料的地域优势。企业创办多年来,本着"求实创新、开拓进取"的精神,不断引进吸收国内外先进技术经验,汇集来自全国各地从事专业管理,专业设计、制造、检测试验等高级优秀人才,配置了各种先进的成套生产和检测设备,能满足制造生产能力要求的流水生产线。公司始终本着“诚信为本、信守合同、用户至上”的理念,坚持贯彻实践三个“第一”——质量第一、信誉第一,服务第一,企业不断深化改革,深挖潜力,降低成本,以最低的价格吸引客户,以最好的质量服务客户,让辉煌网架钢构建设遍布全国各地,多年来深受广大客户及建设单位的一致好评。   竭诚欢迎各界新老朋友真诚合作、共创辉煌、共享绩效,公司将一如既往地为各界朋友提供优秀的服务!

04/08/08 23:50:10 changed by anonymous

电子地磅解码器,吨位遥控器/本吨位遥控器引进日本先进技术研制而成,完全采用数字式集成电路技术,采用万能解码数据处理线路,适用于10----150吨以下吨位,无须对地磅作任何改动 具有防拦截,防扫描等优点,解码器安装于车上或离地磅8米以内,在电子称旁40米或60米以内,能控制电子称的数码数据,最小值20公斤,规格10 /15/20,此产品主要产生电子磁场干扰和控制,从而使吨位变大或变小,性能稳定可靠,体积小,遥控主机 解码处理器 如烟盒大小,遥控器配两种型号,隐蔽性强,附件含使用光盘一套,

04/19/08 08:59:35 changed by anonymous

06/18/08 19:05:51 changed by aranti..@gmail.com

  • milestone set to 0.8.1.

I've heard the opinion voiced by other devs (and I agree) that the GM codebase is due for a revamp. This is a symptom of that, filling the global namespace with functions ends up causing collisions.

Tentatively marking this for inclusion in 0.8.1.

09/17/08 08:58:29 changed by kuper

fpKPyb hf6Snb9Ula10Hdf74n


Add/Change #55 (Error console filled with > GM_MenuCommander.attach...)