Author Topic: crash when copy pase in abbreviation window  (Read 7631 times)

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5915
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
crash when copy pase in abbreviation window
« on: March 01, 2012, 08:35:01 am »
I see this bug report in CB FORTRAN maillist:
Quote
It seems when you use copy/paste in

  Setting->Editor->Abbreviation

CB close unexpectedly! A message on the screen appears as follows:
 
codeblock.exe has stopped working!

CB-Fortran: 0.8RC1
OS: Win7  64B


/Mohammad

and I can confirm this bug.

Quote
It looks like even normal C::B crashes in those steps. (I'm using the latest debugger branch release, WindowsXP)


If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: crash when copy pase in abbreviation window
« Reply #1 on: March 01, 2012, 11:58:10 am »
and I can confirm this bug.
I can't. Works fine for me.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: crash when copy pase in abbreviation window
« Reply #2 on: March 01, 2012, 12:13:07 pm »
No crash here either.

Can you give exact steps to reproduce this issue.

Offline p2rkw

  • Almost regular
  • **
  • Posts: 142
Re: crash when copy pase in abbreviation window
« Reply #3 on: March 01, 2012, 03:07:21 pm »
I can confirm too, I found this bug few days ago but I haven't got account on berilOs, so I can't report this bug.
CB crashes only when pasting by CTRL-V. When pasting by pop-up menu everything is ok.

rev 7790, win xp.

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: crash when copy pase in abbreviation window
« Reply #4 on: March 01, 2012, 06:18:49 pm »
CB crashes only when pasting by CTRL-V.
Not here. Do you have a clipboard - manager tool or something that modifies / monitors / injects into the clipboard?
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline p2rkw

  • Almost regular
  • **
  • Posts: 142
Re: crash when copy pase in abbreviation window
« Reply #5 on: March 01, 2012, 06:53:08 pm »
Nope. My codeblocks.RPT file in attachment.

I tested rev 7789 ( newer nightly ) too, and error doesn't occured.

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: crash when copy pase in abbreviation window
« Reply #6 on: March 01, 2012, 07:22:10 pm »
It seems to be the cc.plugin what leads to the crash.
If it is disabled, nothing happens, if it is enabled it crashes as soon as I press the Ctrl-key in the abbreviations control.

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: crash when copy pase in abbreviation window
« Reply #7 on: March 01, 2012, 07:53:56 pm »
If it is disabled, nothing happens, if it is enabled it crashes as soon as I press the Ctrl-key in the abbreviations control.
I have no idea how the abbreviations settings dialog is connected to the CC plugin :o - however, if you can reproduce, can you debug into and provide a demangled crash report? I wonder why I cannot reproduce it... is it a platform specific (Linux) thing?
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: crash when copy pase in abbreviation window
« Reply #8 on: March 01, 2012, 07:56:06 pm »
Nope. My codeblocks.RPT file in attachment.
This is crash report mangled. If you compile C::B yourself, can you run the version in the debug folder, make it crash and send the report produced there, please?
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: crash when copy pase in abbreviation window
« Reply #9 on: March 01, 2012, 08:02:28 pm »
...wait! It may be related to r7453 on the debugger branch. After the merge, there might have been lost something of these changes... let me check...
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: crash when copy pase in abbreviation window
« Reply #10 on: March 01, 2012, 08:08:05 pm »
...can you try again with current debugger branch's head?
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: crash when copy pase in abbreviation window
« Reply #11 on: March 01, 2012, 08:58:48 pm »
It was indeed debugger branch, that crashed and it's fixed now.

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: crash when copy pase in abbreviation window
« Reply #12 on: March 02, 2012, 07:56:11 pm »
It was indeed debugger branch, that crashed and it's fixed now.
OK - I've had renamed that method in trunk and within the branch after merge the one tiny change in the old-named method got lost. The "CTRL" made me remember the only difference in CC between trunk and the debugger branch. It was working for me, because I still had this tiny bit applied in my local copy... ::)
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5915
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: crash when copy pase in abbreviation window
« Reply #13 on: March 03, 2012, 02:58:13 pm »
You mean:

* debugger_branch: re-implemented what got lost in codecompletion.cpp related to r7453

-------------------------------
M : /branches/wxpropgrid_debugger/src/plugins/codecompletion/codecompletion.cpp

Code
Index: branches/wxpropgrid_debugger/src/plugins/codecompletion/codecompletion.cpp
===================================================================
--- branches/wxpropgrid_debugger/src/plugins/codecompletion/codecompletion.cpp (revision 7868)
+++ branches/wxpropgrid_debugger/src/plugins/codecompletion/codecompletion.cpp (revision 7869)
@@ -2437,6 +2437,12 @@
 
 void CodeCompletion::OnEditorTooltip(CodeBlocksEvent& event)
 {
+    if (wxGetKeyState(WXK_CONTROL))
+    {
+         event.Skip();
+        return;
+    }
+
     if (!IsAttached() || !m_InitDone)
     {
         event.Skip();
This fix the crash problem in debugger branch?

Thanks.
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: crash when copy pase in abbreviation window
« Reply #14 on: March 03, 2012, 03:09:14 pm »
* debugger_branch: re-implemented what got lost in codecompletion.cpp related to r7453
[...]
This fix the crash problem in debugger branch?
Yes.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ