Author Topic: open one header file always crush, need help!  (Read 13651 times)

Offline Simbaba

  • Single posting newcomer
  • *
  • Posts: 9
open one header file always crush, need help!
« on: February 27, 2013, 04:48:48 pm »
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!


Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: open one header file always crush, need help!
« Reply #1 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 ?

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: open one header file always crush, need help!
« Reply #2 on: February 27, 2013, 09:26:50 pm »
...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: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline jarod42

  • Multiple posting newcomer
  • *
  • Posts: 87
Re: open one header file always crush, need help!
« Reply #3 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.

Offline Simbaba

  • Single posting newcomer
  • *
  • Posts: 9
Re: open one header file always crush, need help!
« Reply #4 on: February 28, 2013, 01:32:26 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!

Offline Simbaba

  • Single posting newcomer
  • *
  • Posts: 9
Re: open one header file always crush, need help!
« Reply #5 on: February 28, 2013, 01:33:40 pm »
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

Offline Simbaba

  • Single posting newcomer
  • *
  • Posts: 9
Re: open one header file always crush, need help!
« Reply #6 on: February 28, 2013, 04:29:25 pm »
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

Offline Simbaba

  • Single posting newcomer
  • *
  • Posts: 9
Re: open one header file always crush, need help!
« Reply #7 on: February 28, 2013, 04:30:47 pm »
I want to debug this bug, but don't know how on windows ;D

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: open one header file always crush, need help!
« Reply #8 on: March 01, 2013, 06:54:40 pm »
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.

Offline Simbaba

  • Single posting newcomer
  • *
  • Posts: 9
Re: open one header file always crush, need help!
« Reply #9 on: March 06, 2013, 12:43:07 pm »
i will, but if dll file would be better.

Offline Simbaba

  • Single posting newcomer
  • *
  • Posts: 9
Re: open one header file always crush, need help!
« Reply #10 on: March 06, 2013, 03:24:31 pm »
Met much trouble, if each plugin has CBP project would be better!

Luckily, all resolved.

Jens's Patch seemly resolve the crush problem.