Using mushclient 4.90, I'm running approximately 8-10 miniwindows at the same time. It has happened now several times that one of my miniwindows renders black instead of what I tell it to. The miniwindow still responds to clicks and movement, all other windows work fine. Reinstalling the plugin does not help (probably since the miniwindow isn't deleted/re-added). Running WindowDelete() and then WindowCreate() solves the issue.
Miniwindow renders only black
Posted by Mr.lundmark on Mon 16 Sep 2013 08:16 AM — 13 posts, 48,831 views.
That's odd. Can you post the code that draws the miniwindow?
It's wrapped in multiple files so I can't just paste the code.
I do a WindowGradient on a part of the window (a menu bar), I do WindowText on multiple parts of the window. I use WindowTextWidth, WindowResize, WindowRectOp almost all the time. When I first install it I draw it completely black and then a white boarder around it. I never draw on the boarder except when I install my plugin. The rest of the time I use WindowRectOp inside the boarder so that I don't redraw the border-pixels. Even though my drawing works this way, all of the window - including the boarder - is black when it bugs out.
Oh I also use WindowShow every time I redraw it.
The rate of this occuring is once every two weeks or so. I let my mushclient run for several weeks before rebooting it (only forced my windows updates). :/
I do a WindowGradient on a part of the window (a menu bar), I do WindowText on multiple parts of the window. I use WindowTextWidth, WindowResize, WindowRectOp almost all the time. When I first install it I draw it completely black and then a white boarder around it. I never draw on the boarder except when I install my plugin. The rest of the time I use WindowRectOp inside the boarder so that I don't redraw the border-pixels. Even though my drawing works this way, all of the window - including the boarder - is black when it bugs out.
Oh I also use WindowShow every time I redraw it.
The rate of this occuring is once every two weeks or so. I let my mushclient run for several weeks before rebooting it (only forced my windows updates). :/
Quote:
That's odd.
That's odd.
This has been reported before. :)
http://www.gammon.com.au/forum/?id=11315
This might be related.
http://www.mushclient.com/forum/?id=11636
Anything happening with this issue? It's causing me a lot of headache :(
If I can't reproduce it, I can't fix it. Something that happens every two weeks is hard to get a handle on. Clearly there is no egregious problem. Maybe you are running out of RAM or something.
I still think it is probably related to the bug I reported at http://www.mushclient.com/forum/?id=11636 that hasn't been fixed yet. Take a look at that one again. It is completely reproducible with the included short plugin.
Mr. lundmark, change the background color of your plugin miniwindow to something other than black and tell us if that has any effect on the nature of this bug.
Mr. lundmark, change the background color of your plugin miniwindow to something other than black and tell us if that has any effect on the nature of this bug.
I will try changing the background color this week and get back to you.
Even if I use other colors as background colors, it still goes black. I have found a 100% reproducable case where I just rescale one of my windows a lot (by having a drag handler that rescales it). Then just drag/release fast a lot.
I wish I had the time to create a plugin where I could reproduce it but I have a lot on my hands at the moment. I will try to get to it as soon as I can.
I wish I had the time to create a plugin where I could reproduce it but I have a lot on my hands at the moment. I will try to get to it as soon as I can.
I think this has to do with running luaJit dll instead of normal dll. Which one are you running Fiendish?
I can reproduce the problem Fiendish refers to in the other thread, however I can't see why. Updating the screen from within a drag handler appears to be the cause.
That seems to be one of the cases, Nick. I could be updating it in other quirky places that's causing it there as well. I don't really know the mushclient code so unfortunately I'm not I'm out of ideas as to why it would fail. But once it's failed I need to reinstall the plugin to get drawing back. I'm not sure if it's the actual plugin reinstall or just that I'm recreating the window.
I also have to point out that a friend who's running my plugins isn't having this issue. With the same (latest) version of mushclient. He's not running all my plugins, though.
But essentially I have a plugin system with event handling so one plugin could trigger an event from within a function that is called to another plugin which could be updating their window. It shouldn't be like that (you shouldn't be updating your window in an event), but I'm not 100% certain. There's quite a lot of code and I could have made such a mistake.
But essentially I have a plugin system with event handling so one plugin could trigger an event from within a function that is called to another plugin which could be updating their window. It shouldn't be like that (you shouldn't be updating your window in an event), but I'm not 100% certain. There's quite a lot of code and I could have made such a mistake.