Code::Blocks Forums

User forums => Help => Topic started by: ollydbg on March 01, 2012, 08:35:01 am

Title: crash when copy pase in abbreviation window
Post by: ollydbg 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)


Title: Re: crash when copy pase in abbreviation window
Post by: MortenMacFly on March 01, 2012, 11:58:10 am
and I can confirm this bug.
I can't. Works fine for me.
Title: Re: crash when copy pase in abbreviation window
Post by: Jenna on March 01, 2012, 12:13:07 pm
No crash here either.

Can you give exact steps to reproduce this issue.
Title: Re: crash when copy pase in abbreviation window
Post by: p2rkw 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.
Title: Re: crash when copy pase in abbreviation window
Post by: MortenMacFly 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?
Title: Re: crash when copy pase in abbreviation window
Post by: p2rkw 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.
Title: Re: crash when copy pase in abbreviation window
Post by: Jenna 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.
Title: Re: crash when copy pase in abbreviation window
Post by: MortenMacFly 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?
Title: Re: crash when copy pase in abbreviation window
Post by: MortenMacFly 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?
Title: Re: crash when copy pase in abbreviation window
Post by: MortenMacFly 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...
Title: Re: crash when copy pase in abbreviation window
Post by: MortenMacFly on March 01, 2012, 08:08:05 pm
...can you try again with current debugger branch's head?
Title: Re: crash when copy pase in abbreviation window
Post by: Jenna on March 01, 2012, 08:58:48 pm
It was indeed debugger branch, that crashed and it's fixed now.
Title: Re: crash when copy pase in abbreviation window
Post by: MortenMacFly 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... ::)
Title: Re: crash when copy pase in abbreviation window
Post by: ollydbg 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.
Title: Re: crash when copy pase in abbreviation window
Post by: MortenMacFly 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.