News:

When registered with our forums, feel free to send a "here I am" post here to differ human beings from SPAM bots.

Main Menu

open one header file always crush, need help!

Started by Simbaba, February 27, 2013, 04:48:48 PM

Previous topic - Next topic

Simbaba

I want write a plugin for notepad++.

Firstly,reference the demo code.

But when open the "Notepad_plus_msgs.h" file, the codeblocks IDE crushed!


Jenna

I can confirm this on windows.
It seems to be the ToDoListView that crashes.
Can you please try it with ToDoList-plugin disabled ?

MortenMacFly

...works for me under Windows. ToDoList (basically all) plugin(s) enabled.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: [url="https://www.codeblocks.org/docs/main_codeblocks_en.html"]https://www.codeblocks.org/docs/main_codeblocks_en.html[/url]
C::B FAQ: [url="https://wiki.codeblocks.org/index.php?title=FAQ"]https://wiki.codeblocks.org/index.php?title=FAQ[/url]

jarod42

Crash here too (C::B 12.11, win) (all plugins enable).
but I can open the file if it is not in the project.

Simbaba

Quote from: jens on February 27, 2013, 05:23:04 PM
I can confirm this on windows.
It seems to be the ToDoListView that crashes.
Can you please try it with ToDoList-plugin disabled ?

Thanks, that's it!

Simbaba

Quote from: jarod42 on February 28, 2013, 10:45:05 AM
Crash here too (C::B 12.11, win) (all plugins enable).
but I can open the file if it is not in the project.

So am i. ;D

Simbaba

Accidental found that under the C:\CodeBlocks directory, a file "codeblocks.RPT",as following:

-------------------

Error occured on Thursday, February 28, 2013 at 20:53:19.

C:\CodeBlocks\codeblocks.exe caused an Access Violation at location 6bacfc45 in module C:\CodeBlocks\share\codeblocks\plugins\todo.dll Reading from location 038eb000.

Registers:
eax=00000000 ebx=000043d0 ecx=000057fe edx=038e0004 esi=00ca0f78 edi=0022df28
eip=6bacfc45 esp=0022dc30 ebp=0022dd78 iopl=0         nv up ei pl nz na pe cy
cs=001b  ss=0023  ds=0023  es=0023  fs=003b  gs=0000             efl=00010203

Call stack:
6BACFC45  C:\CodeBlocks\share\codeblocks\plugins\todo.dll:6BACFC45
6BAD0EE8  C:\CodeBlocks\share\codeblocks\plugins\todo.dll:6BAD0EE8

617E083E  C:\CodeBlocks\codeblocks.dll:617E083E  _ZN8cbEditor17DoInitializationsERK8wxStringP10LoaderBase
63090FC7  C:\CodeBlocks\share\codeblocks\plugins\FileManager.dll:63090FC7

Simbaba

I want to debug this bug, but don't know how on windows ;D

Jenna

Can anybody, who gets the crash, test the attached patch.

The cause for the crash seems to be the headerguard at the last line, which has a comment, that starts with NOTE (a keyword for the todolist), and the fact, that there is no line after it, so there is no linefeed (or carriage-return) and the plugin tries to read beyond the buffers length.

Simbaba


Simbaba

Met much trouble, if each plugin has CBP project would be better!

Luckily, all resolved.

Jens's Patch seemly resolve the crush problem.