[Home] [Downloads] [Search] [Help/forum]


Register forum user name Search FAQ

Gammon Forum

[Folder]  Entire forum
-> [Folder]  MUSHclient
. -> [Folder]  Bug reports
. . -> [Subject]  Installing both Omit_Blank_Lines and some other plugin causes crash

Installing both Omit_Blank_Lines and some other plugin causes crash

It is now over 60 days since the last post. This thread is closed.     [Refresh] Refresh page


Posted by KidZero   (1 post)  [Biography] bio
Date Fri 11 May 2018 12:13 AM (UTC)
Message
Versions tested:
Fiendish's aard package, 5.06 pre
Latest source from github

How to create a crash:
- Open a world (aardwolf in my case) with many aard_* plugins installed
- Go to plugins, try to add Omit_Blank_Lines
- Mushclient.exe crashes with access violation

Also:
- Clear the world of all plugins
- Add Omit_Blank_Lines, no crash
- Try to add some aard_* plugin (I tried aardwolf_gmcp_mapper)
- Crash

VS debugging shows a null pointer exception of "this" being empty. Call stack:

MUSHclient.exe!CScriptEngine::GetDispid(const ATL::CStringT<char,StrTraitMFC<char,ATL::ChTraitsCRT<char> > > & strName) - line 485

MUSHclient.exe!CMUSHclientDoc::PluginSupports(const char * PluginID, const char * Routine) - line 482

MUSHclient.exe!L_PluginSupports(lua_State * L) - line 4835

CMushclientDoc::PluginSupports does not check whether pPlugin -> m_scriptEngine is NULL. This check is being done in CMUSHclientDoc::CallPlugin, though.

I would suggest adding a null check of m_scriptEngine to CMushclientDoc::PluginSupports. However, I'm no expert at C++ let alone mushclient client code, so please forgive my ignorance if this behavior is intended.
[Go to top] top

Posted by Fiendish   USA  (2,514 posts)  [Biography] bio   Global Moderator
Date Reply #1 on Fri 11 May 2018 12:29 AM (UTC)

Amended on Fri 11 May 2018 12:57 AM (UTC) by Fiendish

Message
Oh wow.

I can totally reproduce it too.

Man, what a find.

The problem occurs when calling PluginSupports on that plugin, regardless of what else is installed. And the problem goes away if you add <script>print("foo")</script> to the plugin. So, yeah, the suggestion seems good.

https://github.com/fiendish/aardwolfclientpackage
[Go to top] top

Posted by Nick Gammon   Australia  (22,973 posts)  [Biography] bio   Forum Administrator
Date Reply #2 on Fri 11 May 2018 02:42 AM (UTC)
Message

Yes, well spotted.

Fixed in the latest pre-release. See here for how to obtain that.

Patch 079ba7f at GitHub.

Presumably if a plugin has no script at all, then it wouldn’t support the function being asked about.


- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by Nick Gammon   Australia  (22,973 posts)  [Biography] bio   Forum Administrator
Date Reply #3 on Fri 11 May 2018 07:27 AM (UTC)
Message
And thanks very much for such a detailed bug description. You described exactly what caused the problem, and how to reproduce it, and also suggested a fix.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


11,400 views.

It is now over 60 days since the last post. This thread is closed.     [Refresh] Refresh page

Go to topic:           Search the forum


[Go to top] top

Quick links: MUSHclient. MUSHclient help. Forum shortcuts. Posting templates. Lua modules. Lua documentation.

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.

[Home]


Written by Nick Gammon - 5K   profile for Nick Gammon on Stack Exchange, a network of free, community-driven Q&A sites   Marriage equality

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( https://gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Hosted at HostDash]