Code::Blocks Forums

Developer forums (C::B DEVELOPMENT STRICTLY!) => Plugins development => Topic started by: killerbot on July 23, 2007, 07:29:54 pm

Title: wxFlatNotebook 2.2
Post by: killerbot on July 23, 2007, 07:29:54 pm
tests carried out on windows :

- some strange visual side effects, especially in the messages pane !!!
- crashes on  exit

Quote
Error occured on Monday, July 23, 2007 at 19:29:32.

C:\Projects\CodeBlocks\src\output\codeblocks.exe caused an Access Violation at location 6d2ef40a in module C:\Projects\CodeBlocks\src\output\wxmsw28u_gcc_cb.dll Reading from location ffffffff.

Registers:
eax=01a0f028 ebx=03484800 ecx=00dd1ea0 edx=01a0f9d8 esi=00000000 edi=00dc2008
eip=6d2ef40a esp=0022e080 ebp=0022e08c iopl=0         nv up ei pl zr na po nc
cs=001b  ss=0023  ds=0023  es=0023  fs=003b  gs=0000             efl=00010246

Call stack:
6D2EF40A  C:\Projects\CodeBlocks\src\output\wxmsw28u_gcc_cb.dll:6D2EF40A  _ZTV8wxObject
6CE7E7A8  C:\Projects\CodeBlocks\src\output\wxmsw28u_gcc_cb.dll:6CE7E7A8  _ZN10wxBoxSizer7CalcMinEv
6CE7B802  C:\Projects\CodeBlocks\src\output\wxmsw28u_gcc_cb.dll:6CE7B802  _ZN7wxSizer6LayoutEv
6193836B  C:\Projects\CodeBlocks\src\output\codeblocks.dll:6193836B  _ZN14wxFlatNotebook12SetSelectionEj
6193E1DF  C:\Projects\CodeBlocks\src\output\codeblocks.dll:6193E1DF  _ZN15wxPageContainer12DoDeletePageEj
61939232  C:\Projects\CodeBlocks\src\output\codeblocks.dll:61939232  _ZN14wxFlatNotebook10RemovePageEjb
6188ABE7  C:\Projects\CodeBlocks\src\output\codeblocks.dll:6188ABE7  _ZN14MessageManager9RemoveLogEP10MessageLog
64B9EF33  C:\Projects\CodeBlocks\src\output\share\codeblocks\plugins\compiler.dll:64B9EF33
617DED50  C:\Projects\CodeBlocks\src\output\codeblocks.dll:617DED50  _ZN8cbPlugin7ReleaseEb
61898124  C:\Projects\CodeBlocks\src\output\codeblocks.dll:61898124  _ZN13PluginManager12DetachPluginEP8cbPlugin
618A11AB  C:\Projects\CodeBlocks\src\output\codeblocks.dll:618A11AB  _ZN13PluginManager12UnloadPluginEP8cbPlugin
618A116E  C:\Projects\CodeBlocks\src\output\codeblocks.dll:618A116E  _ZN13PluginManager16UnloadAllPluginsEv
61897F1A  C:\Projects\CodeBlocks\src\output\codeblocks.dll:61897F1A  _ZN13PluginManagerD0Ev
619C25EC  C:\Projects\CodeBlocks\src\output\codeblocks.dll:619C25EC  _ZN3MgrI13PluginManagerE4FreeEv
61883B8E  C:\Projects\CodeBlocks\src\output\codeblocks.dll:61883B8E  _ZN7Manager8ShutdownEv
00439E0C  C:\Projects\CodeBlocks\src\output\codeblocks.exe:00439E0C
6CD07305  C:\Projects\CodeBlocks\src\output\wxmsw28u_gcc_cb.dll:6CD07305  _ZN12wxEvtHandler21ProcessEventIfMatchesERK21wxEventTableEntryBasePS_R7wxEvent
6CD0765C  C:\Projects\CodeBlocks\src\output\wxmsw28u_gcc_cb.dll:6CD0765C  _ZN16wxEventHashTable11HandleEventER7wxEventP12wxEvtHandler
6CD08629  C:\Projects\CodeBlocks\src\output\wxmsw28u_gcc_cb.dll:6CD08629  _ZN12wxEvtHandler12ProcessEventER7wxEvent
6CD085C9  C:\Projects\CodeBlocks\src\output\wxmsw28u_gcc_cb.dll:6CD085C9  _ZN12wxEvtHandler12ProcessEventER7wxEvent
6CD085C9  C:\Projects\CodeBlocks\src\output\wxmsw28u_gcc_cb.dll:6CD085C9  _ZN12wxEvtHandler12ProcessEventER7wxEvent
6CD085C9  C:\Projects\CodeBlocks\src\output\wxmsw28u_gcc_cb.dll:6CD085C9  _ZN12wxEvtHandler12ProcessEventER7wxEvent
6CD085C9  C:\Projects\CodeBlocks\src\output\wxmsw28u_gcc_cb.dll:6CD085C9  _ZN12wxEvtHandler12ProcessEventER7wxEvent
6CD085C9  C:\Projects\CodeBlocks\src\output\wxmsw28u_gcc_cb.dll:6CD085C9  _ZN12wxEvtHandler12ProcessEventER7wxEvent
6CD085C9  C:\Projects\CodeBlocks\src\output\wxmsw28u_gcc_cb.dll:6CD085C9  _ZN12wxEvtHandler12ProcessEventER7wxEvent
6CD085C9  C:\Projects\CodeBlocks\src\output\wxmsw28u_gcc_cb.dll:6CD085C9  _ZN12wxEvtHandler12ProcessEventER7wxEvent
6CD085C9  C:\Projects\CodeBlocks\src\output\wxmsw28u_gcc_cb.dll:6CD085C9  _ZN12wxEvtHandler12ProcessEventER7wxEvent
6CD085C9  C:\Projects\CodeBlocks\src\output\wxmsw28u_gcc_cb.dll:6CD085C9  _ZN12wxEvtHandler12ProcessEventER7wxEvent
6CD085C9  C:\Projects\CodeBlocks\src\output\wxmsw28u_gcc_cb.dll:6CD085C9  _ZN12wxEvtHandler12ProcessEventER7wxEvent
6CD085C9  C:\Projects\CodeBlocks\src\output\wxmsw28u_gcc_cb.dll:6CD085C9  _ZN12wxEvtHandler12ProcessEventER7wxEvent
6CD085C9  C:\Projects\CodeBlocks\src\output\wxmsw28u_gcc_cb.dll:6CD085C9  _ZN12wxEvtHandler12ProcessEventER7wxEvent
6CD085C9  C:\Projects\CodeBlocks\src\output\wxmsw28u_gcc_cb.dll:6CD085C9  _ZN12wxEvtHandler12ProcessEventER7wxEvent
6CD085C9  C:\Projects\CodeBlocks\src\output\wxmsw28u_gcc_cb.dll:6CD085C9  _ZN12wxEvtHandler12ProcessEventER7wxEvent
6CD085C9  C:\Projects\CodeBlocks\src\output\wxmsw28u_gcc_cb.dll:6CD085C9  _ZN12wxEvtHandler12ProcessEventER7wxEvent
6CD085C9  C:\Projects\CodeBlocks\src\output\wxmsw28u_gcc_cb.dll:6CD085C9  _ZN12wxEvtHandler12ProcessEventER7wxEvent
6CD085C9  C:\Projects\CodeBlocks\src\output\wxmsw28u_gcc_cb.dll:6CD085C9  _ZN12wxEvtHandler12ProcessEventER7wxEvent
6CD085C9  C:\Projects\CodeBlocks\src\output\wxmsw28u_gcc_cb.dll:6CD085C9  _ZN12wxEvtHandler12ProcessEventER7wxEvent
6CD085C9  C:\Projects\CodeBlocks\src\output\wxmsw28u_gcc_cb.dll:6CD085C9  _ZN12wxEvtHandler12ProcessEventER7wxEvent
6CD085C9  C:\Projects\CodeBlocks\src\output\wxmsw28u_gcc_cb.dll:6CD085C9  _ZN12wxEvtHandler12ProcessEventER7wxEvent
6CD085C9  C:\Projects\CodeBlocks\src\output\wxmsw28u_gcc_cb.dll:6CD085C9  _ZN12wxEvtHandler12ProcessEventER7wxEvent
6CD085C9  C:\Projects\CodeBlocks\src\output\wxmsw28u_gcc_cb.dll:6CD085C9  _ZN12wxEvtHandler12ProcessEventER7wxEvent
6CD085C9  C:\Projects\CodeBlocks\src\output\wxmsw28u_gcc_cb.dll:6CD085C9  _ZN12wxEvtHandler12ProcessEventER7wxEvent
6CD085C9  C:\Projects\CodeBlocks\src\output\wxmsw28u_gcc_cb.dll:6CD085C9  _ZN12wxEvtHandler12ProcessEventER7wxEvent
6CD085C9  C:\Projects\CodeBlocks\src\output\wxmsw28u_gcc_cb.dll:6CD085C9  _ZN12wxEvtHandler12ProcessEventER7wxEvent
6CD085C9  C:\Projects\CodeBlocks\src\output\wxmsw28u_gcc_cb.dll:6CD085C9  _ZN12wxEvtHandler12ProcessEventER7wxEvent
6CD085C9  C:\Projects\CodeBlocks\src\output\wxmsw28u_gcc_cb.dll:6CD085C9  _ZN12wxEvtHandler12ProcessEventER7wxEvent
6CD085C9  C:\Projects\CodeBlocks\src\output\wxmsw28u_gcc_cb.dll:6CD085C9  _ZN12wxEvtHandler12ProcessEventER7wxEvent
6CD085C9  C:\Projects\CodeBlocks\src\output\wxmsw28u_gcc_cb.dll:6CD085C9  _ZN12wxEvtHandler12ProcessEventER7wxEvent
6CD085C9  C:\Projects\CodeBlocks\src\output\wxmsw28u_gcc_cb.dll:6CD085C9  _ZN12wxEvtHandler12ProcessEventER7wxEvent
6CD085C9  C:\Projects\CodeBlocks\src\output\wxmsw28u_gcc_cb.dll:6CD085C9  _ZN12wxEvtHandler12ProcessEventER7wxEvent
6CD085C9  C:\Projects\CodeBlocks\src\output\wxmsw28u_gcc_cb.dll:6CD085C9  _ZN12wxEvtHandler12ProcessEventER7wxEvent
6CD085C9  C:\Projects\CodeBlocks\src\output\wxmsw28u_gcc_cb.dll:6CD085C9  _ZN12wxEvtHandler12ProcessEventER7wxEvent
6CD085C9  C:\Projects\CodeBlocks\src\output\wxmsw28u_gcc_cb.dll:6CD085C9  _ZN12wxEvtHandler12ProcessEventER7wxEvent
6CD085C9  C:\Projects\CodeBlocks\src\output\wxmsw28u_gcc_cb.dll:6CD085C9  _ZN12wxEvtHandler12ProcessEventER7wxEvent
6CD085C9  C:\Projects\CodeBlocks\src\output\wxmsw28u_gcc_cb.dll:6CD085C9  _ZN12wxEvtHandler12ProcessEventER7wxEvent
6CE8FFA3  C:\Projects\CodeBlocks\src\output\wxmsw28u_gcc_cb.dll:6CE8FFA3  _ZN12wxWindowBase5CloseEb
6CDA3007  C:\Projects\CodeBlocks\src\output\wxmsw28u_gcc_cb.dll:6CDA3007  _ZN7wxFrame13MSWWindowProcEjjl
6CD72220  C:\Projects\CodeBlocks\src\output\wxmsw28u_gcc_cb.dll:6CD72220  _Z9wxWndProcP6HWND__jjl@16
7E418734  C:\WINDOWS\system32\USER32.dll:7E418734  GetDC
7E418816  C:\WINDOWS\system32\USER32.dll:7E418816  GetDC
7E41B4C0  C:\WINDOWS\system32\USER32.dll:7E41B4C0  DefWindowProcW
7E41B50C  C:\WINDOWS\system32\USER32.dll:7E41B50C  DefWindowProcW
7C90EAE3  C:\WINDOWS\system32\ntdll.dll:7C90EAE3  KiUserCallbackDispatcher
7E41B3F9  C:\WINDOWS\system32\USER32.dll:7E41B3F9  DefWindowProcW
5AD73C20  C:\WINDOWS\system32\uxtheme.dll:5AD73C20  DrawThemeText
5AD8E300  C:\WINDOWS\system32\uxtheme.dll:5AD8E300  GetThemeTextMetrics
5AD71AC7  C:\WINDOWS\system32\uxtheme.dll:5AD71AC7
5AD71B3D  C:\WINDOWS\system32\uxtheme.dll:5AD71B3D
7E41BB15  C:\WINDOWS\system32\USER32.dll:7E41BB15  GetPropW
6CD7193A  C:\Projects\CodeBlocks\src\output\wxmsw28u_gcc_cb.dll:6CD7193A  _ZN8wxWindow16MSWDefWindowProcEjjl
6CD79AFC  C:\Projects\CodeBlocks\src\output\wxmsw28u_gcc_cb.dll:6CD79AFC  _ZN8wxWindow13MSWWindowProcEjjl
6CD69146  C:\Projects\CodeBlocks\src\output\wxmsw28u_gcc_cb.dll:6CD69146  _ZN19wxTopLevelWindowMSW13MSWWindowProcEjjl
6CDA2E4A  C:\Projects\CodeBlocks\src\output\wxmsw28u_gcc_cb.dll:6CDA2E4A  _ZN7wxFrame13MSWWindowProcEjjl
6CD72220  C:\Projects\CodeBlocks\src\output\wxmsw28u_gcc_cb.dll:6CD72220  _Z9wxWndProcP6HWND__jjl@16
7E418734  C:\WINDOWS\system32\USER32.dll:7E418734  GetDC
7E418816  C:\WINDOWS\system32\USER32.dll:7E418816  GetDC
7E41B89B  C:\WINDOWS\system32\USER32.dll:7E41B89B  GetParent
7E41B903  C:\WINDOWS\system32\USER32.dll:7E41B903  SendMessageW
5AD9881F  C:\WINDOWS\system32\uxtheme.dll:5AD9881F  GetThemeTextMetrics
5AD71AC7  C:\WINDOWS\system32\uxtheme.dll:5AD71AC7
5AD71B3D  C:\WINDOWS\system32\uxtheme.dll:5AD71B3D
7E41BB15  C:\WINDOWS\system32\USER32.dll:7E41BB15  GetPropW
6CD7193A  C:\Projects\CodeBlocks\src\output\wxmsw28u_gcc_cb.dll:6CD7193A  _ZN8wxWindow16MSWDefWindowProcEjjl
6CD79AFC  C:\Projects\CodeBlocks\src\output\wxmsw28u_gcc_cb.dll:6CD79AFC  _ZN8wxWindow13MSWWindowProcEjjl
6CD69146  C:\Projects\CodeBlocks\src\output\wxmsw28u_gcc_cb.dll:6CD69146  _ZN19wxTopLevelWindowMSW13MSWWindowProcEjjl
6CDA2E4A  C:\Projects\CodeBlocks\src\output\wxmsw28u_gcc_cb.dll:6CDA2E4A  _ZN7wxFrame13MSWWindowProcEjjl
6CD72220  C:\Projects\CodeBlocks\src\output\wxmsw28u_gcc_cb.dll:6CD72220  _Z9wxWndProcP6HWND__jjl@16
7E418734  C:\WINDOWS\system32\USER32.dll:7E418734  GetDC
7E418816  C:\WINDOWS\system32\USER32.dll:7E418816  GetDC
7E4189CD  C:\WINDOWS\system32\USER32.dll:7E4189CD  GetWindowLongW
7E418A10  C:\WINDOWS\system32\USER32.dll:7E418A10  DispatchMessageW
6CD4D2F5  C:\Projects\CodeBlocks\src\output\wxmsw28u_gcc_cb.dll:6CD4D2F5  _ZN11wxEventLoop14ProcessMessageEP6tagMSG
6CD4D6EA  C:\Projects\CodeBlocks\src\output\wxmsw28u_gcc_cb.dll:6CD4D6EA  _ZN11wxEventLoop8DispatchEv
6CE23366  C:\Projects\CodeBlocks\src\output\wxmsw28u_gcc_cb.dll:6CE23366  _ZN17wxEventLoopManual3RunEv
6CDF202E  C:\Projects\CodeBlocks\src\output\wxmsw28u_gcc_cb.dll:6CDF202E  _ZN9wxAppBase8MainLoopEv
0040482A  C:\Projects\CodeBlocks\src\output\codeblocks.exe:0040482A
6CC8E477  C:\Projects\CodeBlocks\src\output\wxmsw28u_gcc_cb.dll:6CC8E477  _Z14wxUninitializev
6CD10ACC  C:\Projects\CodeBlocks\src\output\wxmsw28u_gcc_cb.dll:6CD10ACC  _Z7wxEntryP11HINSTANCE__S0_Pci
0040189C  C:\Projects\CodeBlocks\src\output\codeblocks.exe:0040189C
0046281A  C:\Projects\CodeBlocks\src\output\codeblocks.exe:0046281A
00401237  C:\Projects\CodeBlocks\src\output\codeblocks.exe:00401237
00401288  C:\Projects\CodeBlocks\src\output\codeblocks.exe:00401288
7C816FD7  C:\WINDOWS\system32\kernel32.dll:7C816FD7  RegisterWaitForInputIdle


Title: Re: wxFlatNotebook 2.2
Post by: eranif on July 23, 2007, 07:31:39 pm
Thats strange, I am using in my application and I can verify that wxFormBuilder is also using it with no problems,
can you be more specific on where it crashes?

EDIT: Now I see the stack, did not load first time I saw this post.
Are you using SVN trunk? or the official build 2.2?

Eran
Title: Re: wxFlatNotebook 2.2
Post by: killerbot on July 23, 2007, 07:32:03 pm
attached on previous post

EDIT : can I still download your 2.1 zip file, so I can compare if we did special stuff in CB on the 2.1 sources. I remember we fixed some bugs in 2.0 and most off them made it into your code, but maybe there are still some differences.
Title: Re: wxFlatNotebook 2.2
Post by: eranif on July 23, 2007, 07:43:06 pm
Most of your bug fixes (if not all of them) were added to my code base.
But sure go ahead and download v2.1, but I do recommend giving the svn trunk a chance - since the function you are crushing ( DoDeletePage() ) was completely rewritten.

Eran
Title: Re: wxFlatNotebook 2.2
Post by: killerbot on July 23, 2007, 07:44:34 pm
but now I am using 2.2 ! So svn has some fixes wrt 2.2 ?
Title: Re: wxFlatNotebook 2.2
Post by: eranif on July 23, 2007, 07:50:20 pm
There are no known major issues on 2.2. I modified this function (DoDeletePage()) for other reasons - for smart tabbing.
However, there were some minor bug fixes that I made, but no one related to crash fixes.

Eran
Title: Re: wxFlatNotebook 2.2
Post by: killerbot on July 23, 2007, 07:56:23 pm
I saw some files we use (official in our svn, based upon your 2.1) have changed afterwards, some for MAC stuff, some for event stuff on Mac, and some for calculating the number of tabs or something.
Will attach them in 30 minutes.

Dunno if you have time to build cb, with your updated sources on windows, if so I can provide you with a codeblocks.cbp which deals with the new files, and the 2 renamed ones.
Title: Re: wxFlatNotebook 2.2
Post by: eranif on July 23, 2007, 08:01:12 pm
Can I build CB on Linux with pure makefile?
Title: Re: wxFlatNotebook 2.2
Post by: killerbot on July 23, 2007, 08:45:13 pm
yes you can

bootstrap, configure, make

[edit] : for wxFNB 2.2, 2 makefiles in the CB tree need to be adjusted
Title: Re: wxFlatNotebook 2.2
Post by: killerbot on July 23, 2007, 08:48:56 pm
these are the files != the official wxFNB 2.1

[attachment deleted by admin]
Title: Re: wxFlatNotebook 2.2
Post by: killerbot on July 23, 2007, 09:10:56 pm
some more callstack info : (seems crash is at shutdown of cb) :

#0 6CE7A909   wxmsw28u_gcc_cb!_ZNK11wxSizerItem7IsShownEv() (C:\Projects\CodeBlocks\src\devel\wxmsw28u_gcc_cb.dll:??)

#1 6CE7E7A8   wxmsw28u_gcc_cb!_ZN10wxBoxSizer7CalcMinEv() (C:\Projects\CodeBlocks\src\devel\wxmsw28u_gcc_cb.dll:??)

#2 6CE7B802   wxmsw28u_gcc_cb!_ZN7wxSizer6LayoutEv() (C:\Projects\CodeBlocks\src\devel\wxmsw28u_gcc_cb.dll:??)

#3 6193836B   wxFlatNotebook::SetSelection(this=0x16cf0a0, page=2) (C:/Projects/CodeBlocks/src/sdk/wxFlatNotebook/src/wxFlatNotebook/wxFlatNotebook.cpp:293)

#4 6193E1DF   wxPageContainer::DoDeletePage(this=0x16a8d80, page=3) (C:/Projects/CodeBlocks/src/sdk/wxFlatNotebook/src/wxFlatNotebook/wxFlatNotebook.cpp:1274)

#5 61939232   wxFlatNotebook::RemovePage(this=0x16cf0a0, page=3, notify=true) (C:/Projects/CodeBlocks/src/sdk/wxFlatNotebook/src/wxFlatNotebook/wxFlatNotebook.cpp:554)

#6 6188ABE7   MessageManager::RemoveLog(this=0x16a3be8, log=0x3e31f90) (C:/Projects/CodeBlocks/src/sdk/messagemanager.cpp:354)

#7 64B9EF33   CompilerGCC::OnRelease(this=0x21b0ca0, appShutDown=true) (C:/Projects/CodeBlocks/src/plugins/compilergcc/compilergcc.cpp:413)

#8 617DED50   cbPlugin::Release(this=0x21b0ca0, appShutDown=true) (C:/Projects/CodeBlocks/src/sdk/cbplugin.cpp:81)

#9 61898124   PluginManager::DetachPlugin(this=0x2024af0, plugin=0x21b0ca0) (C:/Projects/CodeBlocks/src/sdk/pluginmanager.cpp:216)

#10 618A11AB   PluginManager::UnloadPlugin(this=0x2024af0, plugin=0x21b0ca0) (C:/Projects/CodeBlocks/src/sdk/pluginmanager.cpp:1154)

#11 618A116E   PluginManager::UnloadAllPlugins(this=0x2024af0) (C:/Projects/CodeBlocks/src/sdk/pluginmanager.cpp:1142)

#12 61897F1A   PluginManager::~PluginManager(this=0x2024af0) (C:/Projects/CodeBlocks/src/sdk/pluginmanager.cpp:187)

#13 619C25EC   Mgr<PluginManager>::Free() (C:/Projects/CodeBlocks/src/include/manager.h:187)

#14 61883B8E   Manager::Shutdown() (C:/Projects/CodeBlocks/src/sdk/manager.cpp:166)

#15 00439E0C   MainFrame::OnApplicationClose(this=0x16539c0, event=@0x22ed94) (C:/Projects/CodeBlocks/src/src/main.cpp:2553)

#16 6CD07305   wxmsw28u_gcc_cb!_ZN12wxEvtHandler21ProcessEventIfMatchesERK21wxEventTableEntryBasePS_R7wxEvent() (C:\Projects\CodeBlocks\src\devel\wxmsw28u_gcc_cb.dll:??)

#17 6CD0765C   wxmsw28u_gcc_cb!_ZN16wxEventHashTable11HandleEventER7wxEventP12wxEvtHandler() (C:\Projects\CodeBlocks\src\devel\wxmsw28u_gcc_cb.dll:??)

#18 6CD08629   wxmsw28u_gcc_cb!_ZN12wxEvtHandler12ProcessEventER7wxEvent() (C:\Projects\CodeBlocks\src\devel\wxmsw28u_gcc_cb.dll:??)

#19 6CD085C9   wxmsw28u_gcc_cb!_ZN12wxEvtHandler12ProcessEventER7wxEvent() (C:\Projects\CodeBlocks\src\devel\wxmsw28u_gcc_cb.dll:??)

#20 6CD085C9   wxmsw28u_gcc_cb!_ZN12wxEvtHandler12ProcessEventER7wxEvent() (C:\Projects\CodeBlocks\src\devel\wxmsw28u_gcc_cb.dll:??)

#21 6CD085C9   wxmsw28u_gcc_cb!_ZN12wxEvtHandler12ProcessEventER7wxEvent() (C:\Projects\CodeBlocks\src\devel\wxmsw28u_gcc_cb.dll:??)

#22 6CD085C9   wxmsw28u_gcc_cb!_ZN12wxEvtHandler12ProcessEventER7wxEvent() (C:\Projects\CodeBlocks\src\devel\wxmsw28u_gcc_cb.dll:??)

#23 6CD085C9   wxmsw28u_gcc_cb!_ZN12wxEvtHandler12ProcessEventER7wxEvent() (C:\Projects\CodeBlocks\src\devel\wxmsw28u_gcc_cb.dll:??)

#24 6CD085C9   wxmsw28u_gcc_cb!_ZN12wxEvtHandler12ProcessEventER7wxEvent() (C:\Projects\CodeBlocks\src\devel\wxmsw28u_gcc_cb.dll:??)

#25 6CD085C9   wxmsw28u_gcc_cb!_ZN12wxEvtHandler12ProcessEventER7wxEvent() (C:\Projects\CodeBlocks\src\devel\wxmsw28u_gcc_cb.dll:??)

#26 6CD085C9   wxmsw28u_gcc_cb!_ZN12wxEvtHandler12ProcessEventER7wxEvent() (C:\Projects\CodeBlocks\src\devel\wxmsw28u_gcc_cb.dll:??)

#27 6CD085C9   wxmsw28u_gcc_cb!_ZN12wxEvtHandler12ProcessEventER7wxEvent() (C:\Projects\CodeBlocks\src\devel\wxmsw28u_gcc_cb.dll:??)

#28 6CD085C9   wxmsw28u_gcc_cb!_ZN12wxEvtHandler12ProcessEventER7wxEvent() (C:\Projects\CodeBlocks\src\devel\wxmsw28u_gcc_cb.dll:??)

#29 6CD085C9   wxmsw28u_gcc_cb!_ZN12wxEvtHandler12ProcessEventER7wxEvent() (C:\Projects\CodeBlocks\src\devel\wxmsw28u_gcc_cb.dll:??)


EDIT : and thje crash is in the message panes, which look weird, line seems doubled, just like you would split screen an  editor
Title: Re: wxFlatNotebook 2.2
Post by: killerbot on July 23, 2007, 09:38:51 pm
as what our differences to official wxFNB 2.1 :
 - 98% due to upgrades of your cvs/svn repos (months ago)
 - 2 changes for wx2.8 and something for event (see overview here : http://svn.berlios.de/wsvn/codeblocks/trunk/src/sdk/wxFlatNotebook/src/wxFlatNotebook/wxFlatNotebook.cpp?op=log&rev=0&sc=0&isdir=0)
 - maybe this ? http://svn.berlios.de/wsvn/codeblocks/trunk/src/sdk/wxFlatNotebook/src/wxFlatNotebook/renderer.cpp?op=diff&rev=3314&sc=0

so it seems that wrt wxFNB and first svn revision after that we hardly changed anything, so no special tricks from our side [in case the 2 changes mentioned above could be the culprit when they are lacking ?]

In case the changes are harmless, either CB is doing something wrong which bcomes an issue now, or we are on the verge of discovering wxFNB bug ?
Title: Re: wxFlatNotebook 2.2
Post by: eranif on July 23, 2007, 09:45:42 pm
I have a wild guess (without testing the code):
I discovered a bug that could happen in the following sequence:

- Open 4 tabs [A B C D] A-D means the order they were created
- At this point the active tab is D, now select B
- Now close D using middle mouse click - I choose the middle mouse click, since this is the only option (beside doing it programtically) that allows user to close a tab without making it active.

now the editor is splitted as you described. (btw, this bug was fixed in SVN).

To fix it locally without chaging to SVN version, apply the following fix to wxFlatNotebook.cpp:
Code
Index: ../../src/wxFlatNotebook/wxFlatNotebook.cpp
===================================================================
--- ../../src/wxFlatNotebook/wxFlatNotebook.cpp (revision 17)
+++ ../../src/wxFlatNotebook/wxFlatNotebook.cpp (working copy)
@@ -1235,7 +1235,7 @@
 {
  // Remove the page from the vector
  wxFlatNotebook* book = (wxFlatNotebook*)GetParent();
- m_pagesInfoVec.RemoveAt(page);
+
 
  // Armel Asselin's patch
  int newActivePageIndex = m_iActivePage, newPreviousPageIndex = m_iPreviousActivePage;
@@ -1259,6 +1259,7 @@
  newActivePageIndex = newPreviousPageIndex;
  }
 
+ m_pagesInfoVec.RemoveAt(page);
  m_iActivePage = newActivePageIndex;
  m_iPreviousActivePage = newPreviousPageIndex;
  if (m_iActivePage == m_iPreviousActivePage)
note that this patch only moves m_pagesInfoVec.RemoveAt(page); few lines later.

try it
Eran
Title: Re: wxFlatNotebook 2.2
Post by: killerbot on July 24, 2007, 03:04:51 pm
I haven't been able to reproduce the crash with this :-)

will test a few times more
Title: Re: wxFlatNotebook 2.2
Post by: killerbot on July 24, 2007, 03:55:52 pm
seems ok : I will commit this evening.
@ everybody : keep your eyes open on issues please
Title: Re: wxFlatNotebook 2.2
Post by: eranif on July 24, 2007, 05:44:13 pm
Killerbot,

Are you using the official 2.2 or the svn trunk?

By using the SVN trunk, you will get the following:
- Unlimited stack of recently visited tabs
- When closing a tab, the selected tab is the previously selected one

Eran
Title: Re: wxFlatNotebook 2.2
Post by: killerbot on July 24, 2007, 11:34:36 pm
currently I am using official 2.2 + the fix you mentioned above, after that one I will upgrade to your latest svn.
Title: Re: wxFlatNotebook 2.2
Post by: killerbot on July 25, 2007, 02:42:19 pm
I have upgraded our sources to your latest svn, with a few differences :

1) renderer.cpp
   - removed the unused wxPoint regPts[9]; in DrawButton

2) wxFlatNotebook.cpp
  - added on your suggestion at the end of 'OnNavigationKey' : event.Skip();
  - extra cast to avoid warning in DoDeletePage :    if (m_iActivePage > (int)page || (int)page >= (int)(m_pagesInfoVec.Count())){


Maybe you can apply them in your source tree also. Thanks Eran for the help and the code ;-)
Title: Re: wxFlatNotebook 2.2
Post by: eranif on July 25, 2007, 03:04:15 pm
changes are now in SVN trunk of wxFlatNotebook

Eran
Title: Re: wxFlatNotebook 2.2
Post by: MortenMacFly on July 26, 2007, 09:17:17 am
changes are now in SVN trunk of wxFlatNotebook
Eran, I have attached a ZIP file containning 2 C::B project files -> one for the lib and one for the sample with a default/debug target. They follow "our" C::B guidelines for a project setup and should thus allow anyone able to compile C::B also to be able to compile wxFlatNotebook (demo). This is for your reference and a request from a board member.
With regards, Morten.
Ps.: BTW: I believe you can savely remove the *.layout file in the "build" folder in SVN. In addition the DevCpp project files most likely won't work.

[attachment deleted by admin]
Title: Re: wxFlatNotebook 2.2
Post by: TDragon on July 26, 2007, 07:08:39 pm
I have verified that the event.Skip() at the end of OnNavigationKey causes a tab to be inserted in the previously current editor whenever the editors are switched with Ctrl+Tab.
Title: Re: wxFlatNotebook 2.2
Post by: eranif on July 26, 2007, 07:49:24 pm
mm, it make sense, since the editor will also process it and will process it as regular char
So I guess it should be removed from then
Eran
Title: Re: wxFlatNotebook 2.2
Post by: Biplab on July 26, 2007, 08:00:19 pm
mm, it make sense, since the editor will also process it and will process it as regular char
So I guess it should be removed from then

Removed. :)
Title: Re: wxFlatNotebook 2.2
Post by: killerbot on July 26, 2007, 08:16:33 pm
does anyone remember why we put it there, I think it was to fix something else. So we should reinvestigate for that other problem, bu I can't recall from the top of my head.
Title: Re: wxFlatNotebook 2.2
Post by: TDragon on July 26, 2007, 08:38:33 pm
See this topic (http://forums.codeblocks.org/index.php/topic,6093.msg49987.html#msg49987).
Title: Re: wxFlatNotebook 2.2
Post by: MortenMacFly on July 26, 2007, 09:21:13 pm
does anyone remember why we put it there,

Please also notice this:
http://forums.codeblocks.org/index.php/topic,6093.msg50047.html#msg50047

So you can safely remove it - it doesn't make sense at all.

With regards, Morten.
Title: Re: wxFlatNotebook 2.2
Post by: stahta01 on July 30, 2007, 03:18:10 am
Since wxFlatNotebook 2.2 requires wxWidgets 2.8, have we dropped support for using 2.6 to build C::B?
I wish to verify before updating some patches.

Thanks

Tim S
Title: Re: wxFlatNotebook 2.2
Post by: Der Meister on July 31, 2007, 07:34:03 pm
I think dropping support for wxWidgets 2.6 isn't a good idea yet. At least on gentoo (and probably on other Linux distributions) wxGTK 2.6.3.3 still is the only available version (for stable systems).
Title: Re: wxFlatNotebook 2.2
Post by: killerbot on July 31, 2007, 08:06:35 pm
is it for sure that with wxFNB 2.2 it no longer builds/works with wx26x ??
It initially thaught so, but it could well be it works with wx26x

if not : then yes : bye bye wx 26x.

Title: Re: wxFlatNotebook 2.2
Post by: Der Meister on July 31, 2007, 08:26:08 pm
In wxWidgets 2.8 the wxRect class got an additional member-function: wxRect::Contains. wxFNB 2.2 uses this function and therefore does not build with wxWidgets 2.6 anymore.

Anyway, I don't know whether this function is the only item that is special to wxWidgets 2.8 and used by wxFNB 2.2. If it is the only one, that it *should* be easy to fix as this function could probably replaced by a few lines of code or a simple self-made function.
Title: Re: wxFlatNotebook 2.2
Post by: SharkCZ on July 31, 2007, 08:26:53 pm
Since wxFlatNotebook 2.2 requires wxWidgets 2.8, have we dropped support for using 2.6 to build C::B?
I wish to verify before updating some patches.

It looks like that wxFlatNotebook can be compiled on wxGTK 2.6 when you change the Contains(wxPoint) method of wxRect back to Inside(wxPoint) - 6 occurences in wxFlatNotebook.cpp
Title: Re: wxFlatNotebook 2.2
Post by: SharkCZ on July 31, 2007, 08:28:36 pm
In wxWidgets 2.8 the wxRect class got an additional member-function: wxRect::Contains. wxFNB 2.2 uses this function and therefore does not build with wxWidgets 2.6 anymore.

Contains() from wx2.8 == Inside() from wx2.6, there is an compatibility #define in the code of wx2.8 (gdicmn.h)
Title: Re: wxFlatNotebook 2.2
Post by: killerbot on July 31, 2007, 08:44:18 pm
In wxWidgets 2.8 the wxRect class got an additional member-function: wxRect::Contains. wxFNB 2.2 uses this function and therefore does not build with wxWidgets 2.6 anymore.

Contains() from wx2.8 == Inside() from wx2.6, there is an compatibility #define in the code of wx2.8 (gdicmn.h)
meaning it should build on wx26 ?
Title: Re: wxFlatNotebook 2.2
Post by: SharkCZ on July 31, 2007, 08:45:49 pm
In wxWidgets 2.8 the wxRect class got an additional member-function: wxRect::Contains. wxFNB 2.2 uses this function and therefore does not build with wxWidgets 2.6 anymore.

Contains() from wx2.8 == Inside() from wx2.6, there is an compatibility #define in the code of wx2.8 (gdicmn.h)
meaning it should build on wx26 ?

Sure, I have just built it.
Title: Re: wxFlatNotebook 2.2
Post by: killerbot on July 31, 2007, 08:52:31 pm
so although we do not support wx26x (officially anymore : more or less) : it still works ;-)
Title: Re: wxFlatNotebook 2.2
Post by: SharkCZ on July 31, 2007, 09:03:29 pm
The patch is here
Code
Index: wxFlatNotebook.cpp
===================================================================
--- wxFlatNotebook.cpp (revision 4338)
+++ wxFlatNotebook.cpp (working copy)
@@ -1122,7 +1122,11 @@
  }
 
  rect = wxRect(btnXPos, 8, 16, 16);
+#if wxCHECK_VERSION(2, 8, 0)
  if(rect.Contains(pt))
+#else
+ if(rect.Inside(pt))
+#endif
  {
  return (style & wxFNB_NO_X_BUTTON) ? wxFNB_NOWHERE : wxFNB_X;
  }
@@ -1131,18 +1135,30 @@
  if( style & wxFNB_DROPDOWN_TABS_LIST )
  {
  rect = wxRect(render->GetDropArrowButtonPos( this ), 8, 16, 16);
+#if wxCHECK_VERSION(2, 8, 0)
  if( rect.Contains(pt) )
+#else
+ if( rect.Inside(pt) )
+#endif
  return wxFNB_DROP_DOWN_ARROW;
  }
 
+#if wxCHECK_VERSION(2, 8, 0)
  if(rect.Contains(pt))
+#else
+ if(rect.Inside(pt))
+#endif
  {
  return (style & wxFNB_NO_NAV_BUTTONS) ? wxFNB_NOWHERE : wxFNB_RIGHT_ARROW;
  }
 
 
  rect = wxRect(btnLeftPos, 8, 16, 16);
+#if wxCHECK_VERSION(2, 8, 0)
  if(rect.Contains(pt))
+#else
+ if(rect.Inside(pt))
+#endif
  {
  return (style & wxFNB_NO_NAV_BUTTONS) ? wxFNB_NOWHERE : wxFNB_LEFT_ARROW;
  }
@@ -1159,7 +1175,11 @@
  if(style & wxFNB_X_ON_TAB && (int)cur == GetSelection())
  {
  // 'x' button exists on a tab
+#if wxCHECK_VERSION(2, 8, 0)
  if(m_pagesInfoVec[cur].GetXRect().Contains(pt))
+#else
+ if(m_pagesInfoVec[cur].GetXRect().Inside(pt))
+#endif
  {
  pageInfo = pgInfo;
  tabIdx = (int)cur;
@@ -1187,7 +1207,11 @@
 
  wxRect tabRect = wxRect(pgInfo.GetPosition().x, pgInfo.GetPosition().y,
  pgInfo.GetSize().x, pgInfo.GetSize().y);
+#if wxCHECK_VERSION(2, 8, 0)
  if(tabRect.Contains(pt))
+#else
+ if(tabRect.Inside(pt))
+#endif
  {
  // We have a match
  pageInfo = pgInfo;
Title: Re: wxFlatNotebook 2.2
Post by: killerbot on July 31, 2007, 09:09:46 pm
so it does not build without manual patch. I prefer to not to apply this patch, so our sources are the same as eranif's. Unless he would do a similar thing, but my opinion : wx26 is old ....
Title: Re: wxFlatNotebook 2.2
Post by: SharkCZ on July 31, 2007, 09:14:26 pm
so it does not build without manual patch. I prefer to not to apply this patch, so our sources are the same as eranif's. Unless he would do a similar thing, but my opinion : wx26 is old ....

I agree, it was published only for "archive" purposes. And I will use it locally for official FC-6 builds during then next few months until the Fedora 8 is published.
Title: Re: wxFlatNotebook 2.2
Post by: eranif on July 31, 2007, 10:00:55 pm
I fixed this portability issue with 2.6.x in SVN
wxFlatNotebook.cpp:
Code
static bool InsideRect(const wxRect &rect, const wxPoint &pt)
{
#if wxCHECK_VERSION(2, 8, 0)
return rect.Contains(pt);
#else
return rect.Inside(pt);
#endif
}

and replaced all calls for wxRect::Contains to it.
I dont have 2.6 - but I think it should compile now (can anyone confirm this?)

Eran
Title: Re: wxFlatNotebook 2.2
Post by: killerbot on July 31, 2007, 10:26:18 pm
I will upgrade our sources tomorrow accordingly