Author Topic: The color changing bug.  (Read 13823 times)

AssemblyChallenge

  • Member
  • **
  • Posts: 110
The color changing bug.
« on: February 16, 2015, 11:30:27 PM »
Greetings.

I find this one from time to time and figure out a possible way to generate it:

Open EasyCode, load any project.
Let it open for a very long time.
Suspend the computer for several hours.

If you are lucky, the result will be as the attached example. The only solution is to close EasyCode and reopen it.

Regards.

rsala

  • Moderator
  • Member
  • *****
  • Posts: 296
    • Easy Code
Re: The color changing bug.
« Reply #1 on: February 20, 2015, 10:05:47 AM »
Hi,

Sorry for this issue and thanks for reporting it.

Please give some time to see whether I can find the bug and fix it.

Regards!
EC coder

AssemblyChallenge

  • Member
  • **
  • Posts: 110
Re: The color changing bug.
« Reply #2 on: February 21, 2015, 02:12:56 AM »
Thank you Ramon, and please don't be; we are only human  ;) :t

The two most interesting elements are:

* Only the background color changes, not the letters.
* So far it only seems to happen is you suspend the computer.

A humble theory: Does EasyCode read the background color from some Windows variable/structure that may change after suspending ??

Best regards.

rsala

  • Moderator
  • Member
  • *****
  • Posts: 296
    • Easy Code
Re: The color changing bug.
« Reply #3 on: February 21, 2015, 08:08:58 AM »
Hi again,

Actually, the only thing I can think of is that Easy Code processes de WM_SYSCOLORCHANGE message, which is only sent by Windows when a system color changes. The point is I do not know whether the windows background system color changes when Windows is suspended. I will try to find it out.

Regards,

Ramon
EC coder

rsala

  • Moderator
  • Member
  • *****
  • Posts: 296
    • Easy Code
Re: The color changing bug.
« Reply #4 on: February 21, 2015, 08:26:46 AM »
Hi AssemblyChallenge,

Would you please do me a favor?

I attach a slightly modified version of EC. It will show a message box if the WM_SYSCOLORCHANGE has been sent to Easy Code, so that I can know if it is the responsible of the "whiteness".

Please replace your EasyCode.exe file, in the \EasyCode.Ms\Bin folder with the one attached to this post.

Thanks for your help,

Ramon
EC coder

AssemblyChallenge

  • Member
  • **
  • Posts: 110
Re: The color changing bug.
« Reply #5 on: February 24, 2015, 12:21:07 AM »
Hi,

Testing in progress, will let you know ASAP.  :biggrin:

Regards.

rsala

  • Moderator
  • Member
  • *****
  • Posts: 296
    • Easy Code
Re: The color changing bug.
« Reply #6 on: February 25, 2015, 05:29:28 AM »
Thank you very much!
EC coder

AssemblyChallenge

  • Member
  • **
  • Posts: 110
Re: The color changing bug.
« Reply #7 on: February 28, 2015, 06:12:04 AM »
So far, not so good  :(

For several days with no luck. Still waiting for changes or messages.

Still trying, Master.

rsala

  • Moderator
  • Member
  • *****
  • Posts: 296
    • Easy Code
Re: The color changing bug.
« Reply #8 on: March 01, 2015, 08:58:23 PM »
Thanks for your help  :t
EC coder

AssemblyChallenge

  • Member
  • **
  • Posts: 110
Re: The color changing bug.
« Reply #9 on: March 10, 2015, 01:41:05 AM »
Finally! After so many days trying the new exe I got some movement  :lol:

Loaded two different projects and both failed (color changed) without messages or errors.

Attached images from both.

rsala

  • Moderator
  • Member
  • *****
  • Posts: 296
    • Easy Code
Re: The color changing bug.
« Reply #10 on: March 12, 2015, 09:10:47 AM »
Thank you very much! I really appreciate your help!

However, I have no idea why color changes but I will try to find it out.

Regards,

Ramon
EC coder

AssemblyChallenge

  • Member
  • **
  • Posts: 110
Re: The color changing bug.
« Reply #11 on: March 13, 2015, 02:04:25 AM »
Ok.

The projects with the new exe were open (and failed) at the same time, just in case it may be useful to know about it.

More humble ideas: The editor part (Edit control, right?) is mounted on MDI window. Is there any chance this could be related? How about WMPaint or something AFTER resuming from standby? Is it only the Edit's background color who is changing and, so far, never on runtime.

AssemblyChallenge

  • Member
  • **
  • Posts: 110
Re: The color changing bug.
« Reply #12 on: March 13, 2015, 03:23:58 AM »
Even more ideas!

Please take a look at this this. It doesnt looks like our case but, who knows  :lol:

Whatever, as long as it gives you some light/inspiration  ;)

AssemblyChallenge

  • Member
  • **
  • Posts: 110
Re: The color changing bug.
« Reply #13 on: March 18, 2015, 06:50:12 AM »
Feedback continues:

* Took note from background colors before and after the bug.
* In Preferences, Editor, there is no change (it's default, Background, System colors). Even after bug, Preferences are fine.
* With affected EasyCode still open, opened new instance: It does with normal colors.

What else:

* Just in case will keep bugged EasyCode opened (as it is hard to replicate problem). If you need any info let me know (ej. attach Ollydbg, look into memory, etc) :bgrin:
* Will make a simple experiment with very small project checking background colors. Who knows, maybe it's Windows Policies the problem's source.

Regards, Master.

rsala

  • Moderator
  • Member
  • *****
  • Posts: 296
    • Easy Code
Re: The color changing bug.
« Reply #14 on: March 21, 2015, 05:27:02 AM »
Hi AssemblyChallenge,

Once again thank you very much! I really appreciate your useful help.

I will study all this informatio to see whether I can find the problem.

Regards,

Ramon
EC coder