Code::Blocks Forums
Developer forums (C::B DEVELOPMENT STRICTLY!) => Plugins development => Topic started by: mushakk on June 19, 2007, 12:35:11 pm
-
When I try to format generated code (gcc -E) sometimes the plugin crashes :(
Some of the lines in these files are up to 2840 chars!
Thx for your work!
-
Hi !
I think your description is light...
Nightly ? OS? GCC version ? Bug report (*.RPT) ? File that made AStyle crash ?
It would be useful to debug. Don't forget to put the bug on BerliOS !
Dje
-
It would be great if you could provide a sample file that causes the plugin to crash.
-
Sorry I'm using yesterday version (20 jun)
With this example file the app crashes.
Don't forget to put the bug on BerliOS
I'm new here. How can I do that? url for bugs?
[attachment deleted by admin]
-
With this example file the app crashes.
That's the culprit (asstreamiterator.h):
It will result in crashing at line 47 in asstreamiterator.cpp:
(Notice that filterPtr equals buffer.)
So - you might want to just increase the value in the header to e.g. 4096 and that's basically it.
With regards, Morten.
-
Dynamic allocation seems to be a better choice :)
Fixed and committed :wink:
-
Thanks, Cen! Yes, dynamic allocation is the way to go. Otherwise we'd be hitting buffer overflows everytime someone ends up with a weird file, and we'd do the resizing to 4096,8192, blah blah blah :-P
Thumbs up.
-
Thx!
:D