Author Topic: Possible bug in $ACTIVE_EDITOR_FILENAME  (Read 8170 times)

Offline cichmen

  • Multiple posting newcomer
  • *
  • Posts: 12
Possible bug in $ACTIVE_EDITOR_FILENAME
« on: June 17, 2009, 08:08:14 pm »
Hi,

I have experienced odd behaviour of $ACTIVE_EDITOR_FILENAME built-in. I'm using it in post-build step.

- Open file "file1.c" in editor, do rebuild, the built-in is right = "file1.c"
- close file "file1.c", open "file2.c" in editor, do rebuild, the build-in contains still "file1.c", but should contain "file2.c"

Any advice?

Thanks,
C.

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5491
Re: Possible bug in $ACTIVE_EDITOR_FILENAME
« Reply #1 on: June 17, 2009, 08:10:55 pm »
thanks for the feedback, can you also file this issue in our bug tracker on our berlios page ?
So it doesn't get lost ..

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: Possible bug in $ACTIVE_EDITOR_FILENAME
« Reply #2 on: June 17, 2009, 08:23:19 pm »
I just tried it with a simple test project and cannot reproduce this behaviour.

Which OS and which version of C::B do you use ?

Can you provide a simple test-project whre this behaviour occurs ?

Offline cichmen

  • Multiple posting newcomer
  • *
  • Posts: 12
Re: Possible bug in $ACTIVE_EDITOR_FILENAME
« Reply #3 on: June 17, 2009, 08:52:17 pm »
I'm using Release 8.02, on XP SP2.

Important to reproduce is the order:
1) Open only "file1.c" in editor, do rebuild
2) Close "file1.c"
3) Open only "file2.c" in editor, do rebuild

I'm not able to attach file (3kB) to this discussion, it says  "The upload folder is full. Please try a smaller file and/or contact an administrator".

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5491
Re: Possible bug in $ACTIVE_EDITOR_FILENAME
« Reply #4 on: June 17, 2009, 09:07:00 pm »
could you try to download the latest nightly (see nightly builds section in the forum).
Those are also very stable and up to date.

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: Possible bug in $ACTIVE_EDITOR_FILENAME
« Reply #5 on: June 17, 2009, 11:40:12 pm »
I can confirm this bug, and it is fixed in trunk (r5654).

We only recalced the name of the active editor, if the pointer to the editor has changed.
Normally perfectly legal, but in some cases, if nothing else changed the calling new cbEditor(... allocated the same memory as before, so the macrosmanager was unable to detect that the editor has changed.
It now checks if the name of the file associated with the editor has changed.

Offline cichmen

  • Multiple posting newcomer
  • *
  • Posts: 12
Re: Possible bug in $ACTIVE_EDITOR_FILENAME
« Reply #6 on: June 18, 2009, 08:09:04 pm »
Thanks for fixing it!