Author Topic: Release 16.01 for Mac  (Read 24488 times)

Offline dkulp

  • Multiple posting newcomer
  • *
  • Posts: 16
Re: Release 16.01 for Mac
« Reply #15 on: February 03, 2016, 08:29:06 pm »

Hi, Dan! I have made another try to build CB on Mac OS by merging your patches into CB source tree. My steps are as follows:
Code: bash
$ git clone https://github.com/wxWidgets/wxWidgets.git -b WX_3_0_BRANCH --depth=1
$ cd wxWidgets
$ mkdir cocoabuild && cd cocoabuild
$ ../configure --enable-monolithic --with-macosx-version-min=10.7 --enable-debug=no --with-cocoa CXXFLAGS="-stdlib=libc++ -std=c++11" OBJCXXFLAGS="-stdlib=libc++ -std=c++11" CPPFLAGS="-stdlib=libc++" LDFLAGS="-stdlib=libc++" CXX=clang++ CXXCPP="clang++ -E" CC=clang CPP="clang -E" --enable-shared --enable-unicode --enable-threads --without-subdirs
$ make
then do some patches and bootstrap CB by CB.

If you plan on making a binary that will actually look great on a Retina display, you'll need my fixes to wxWidgets.   They are in my fork of wxWidgets:
https://github.com/dkulp/wxWidgets
on the  WX_3_0_BRANCH branch there.   I've submitted pull requests back, but  they haven't applied them yet.

That said, we also need to add some flags to the Info.plist:

Code
<key>NSPrincipalClass</key>
<string>NSApplication</string>
<key>NSHighResolutionCapable</key>
<true/>

to turn on support.  Your binary isn't allowing it to use the retina display resolution.

Quote
The binary file is located at
https://fedorapeople.org/~easior/CodeBlocks-Mac-16.1-r1.tar.bz2.
I found that some bugs are fixed, e.g. changing font size in CB Editor does not make CB crash. However, my binary file is full of bugs. For examples:
* mouse scrolling in CB Editor with some source codes will make CB crashed;
* Compiler plugin does not work well because the build target of project to build is not displayed on compiler toolbar.

The attachment is the patch which have been merged together.

I don't build anything from with CB, I pretty much just use it for wxSmith.  The scrolling crash looks like it's in Scintilla which I know nothing about. 

I stuck a new binary up at:
http://dankulp.com/xlights/CodeBlocks-MAC-16.1.tar.gz

that I build from the command line and should be retina ready.   

Offline Easior Lars

  • Multiple posting newcomer
  • *
  • Posts: 44
Re: Release 16.01 for Mac
« Reply #16 on: February 04, 2016, 02:38:32 am »
They are in my fork of wxWidgets:
https://github.com/dkulp/wxWidgets
on the  WX_3_0_BRANCH branch there.   I've submitted pull requests back, but  they haven't applied them yet.

Your branch can't be compiled on My Mac, for
Code: bash
../src/osx/cocoa/window.mm:514:50: warning: 'convertBaseToScreen:' is deprecated: first deprecated in OS X 10.7 - Use -convertRectToScreen: instead [-Wdeprecated-declarations]
            locationInWindow = [[nsEvent window] convertBaseToScreen:locationInWindow];
                                                 ^
/System/Library/Frameworks/AppKit.framework/Headers/NSWindow.h:661:1: note: 'convertBaseToScreen:' has been explicitly marked deprecated here
- (NSPoint)convertBaseToScreen:(NSPoint)aPoint __attribute__((availability(macosx,introduced=10.0 ,deprecated=10.7,message="" "Use -convertRectToScreen: instead")));
^
../src/osx/cocoa/window.mm:517:52: warning: 'convertScreenToBase:' is deprecated: first deprecated in OS X 10.7 - Use -convertRectFromScreen: instead [-Wdeprecated-declarations]
            locationInWindow = [[m_osxView window] convertScreenToBase:locationInWindow];
                                                   ^
/System/Library/Frameworks/AppKit.framework/Headers/NSWindow.h:662:1: note: 'convertScreenToBase:' has been explicitly marked deprecated here
- (NSPoint)convertScreenToBase:(NSPoint)aPoint __attribute__((availability(macosx,introduced=10.0 ,deprecated=10.7,message="" "Use -convertRectFromScreen: instead")));
^
../src/osx/cocoa/window.mm:2439:46: error: use of undeclared identifier 'NSTextAlignmentCenter'
                [paragraphStyle setAlignment:NSTextAlignmentCenter];
                                             ^
../src/osx/cocoa/window.mm:2461:24: warning: 'NSView' may not respond to 'setAttributedTitle:'
            [m_osxView setAttributedTitle:attrString];
             ~~~~~~~~~ ^
../src/osx/cocoa/window.mm:2886:40: warning: 'convertScreenToBase:' is deprecated: first deprecated in OS X 10.7 - Use -convertRectFromScreen: instead [-Wdeprecated-declarations]
        location = [[m_osxView window] convertScreenToBase:location];
                                       ^
/System/Library/Frameworks/AppKit.framework/Headers/NSWindow.h:662:1: note: 'convertScreenToBase:' has been explicitly marked deprecated here
- (NSPoint)convertScreenToBase:(NSPoint)aPoint __attribute__((availability(macosx,introduced=10.0 ,deprecated=10.7,message="" "Use -convertRectFromScreen: instead")));
^
4 warnings and 1 error generated.
make: *** [monodll_osx_cocoa_window.o] Error 1

Could you fix it?

Quote
The scrolling crash looks like it's in Scintilla which I know nothing about. 
Hi, Dan! Could you share any experiences on how to debug the CB binary? Is there any effective debugging tool to be recommended?

Quote
I stuck a new binary up at:
http://dankulp.com/xlights/CodeBlocks-MAC-16.1.tar.gz
Unfortunately, Your binary also has a bug. It will crash if you open a c++ source code and format it by choosing format use astyle in a popup menu with right mouse clicking.
« Last Edit: February 04, 2016, 02:58:12 am by Easior Lars »
Development Environments:GCC+CodeBlocks+wxWidgets
Developing Languages:Bash+Python+C/CPP+LaTeX
Developer Utils:Emacs+GIT+OpenSSH+GPG
OS:Mac OS X, Gentoo/Kali Linux/Fedora/CentOS, MS Windows
Blog:http://easior.i11r.com

Offline Easior Lars

  • Multiple posting newcomer
  • *
  • Posts: 44
Re: Release 16.01 for Mac
« Reply #17 on: February 06, 2016, 05:47:39 am »
I made another build which is more stable than ever. However, new completion plugin does not still work well. The following attachments are the recently crashing report.
« Last Edit: February 06, 2016, 07:58:10 am by Easior Lars »
Development Environments:GCC+CodeBlocks+wxWidgets
Developing Languages:Bash+Python+C/CPP+LaTeX
Developer Utils:Emacs+GIT+OpenSSH+GPG
OS:Mac OS X, Gentoo/Kali Linux/Fedora/CentOS, MS Windows
Blog:http://easior.i11r.com

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: Release 16.01 for Mac
« Reply #18 on: February 06, 2016, 12:39:26 pm »
I made another build which is more stable than ever.
...where?! :-)

The following attachments are the recently crashing report.
Did you strip the sources? Because all lines are missing. For the development on the Mac you should not strip anything. This will help to track down the errors.
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 MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: Release 16.01 for Mac
« Reply #19 on: February 06, 2016, 12:48:40 pm »
...wrt the patch you kindly provided: The method:
m_Bitmap->CreateScaled
...is not available on wx2.8.x. Therefore the build will be broken with that version. You'll need to wrap this into a wxCHECK_VERSION or alike.
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 dkulp

  • Multiple posting newcomer
  • *
  • Posts: 16
Re: Release 16.01 for Mac
« Reply #20 on: February 06, 2016, 02:51:06 pm »
...wrt the patch you kindly provided: The method:
m_Bitmap->CreateScaled
...is not available on wx2.8.x. Therefore the build will be broken with that version. You'll need to wrap this into a wxCHECK_VERSION or alike.

Personally, I would suggest requiring 3.0.x for the Mac.   There are so many parts of wxWidgets that will cause awful behavior or crashes with 2.8.x on the Mac, particularly with Yosemite or newer.   Without my fixes to 3.0.x, the Retina support is pretty bad as well, particularly for wxSmith.  :(



Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: Release 16.01 for Mac
« Reply #21 on: February 06, 2016, 03:14:21 pm »
Personally, I would suggest requiring 3.0.x for the Mac.
I have not problem with that, but as long as we don't have a stable wx3.0 for all platforms we need to consider using wx28 on other platforms as base.

If you wrap this code into
Code: cpp
#ifdef wxCHECK_VERSION(3, 0, 0)
 ... // new code
#else
 ... // old code
#endif

All is fine.

We surely target supporting wx3 for the next release.
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 Easior Lars

  • Multiple posting newcomer
  • *
  • Posts: 44
Re: Release 16.01 for Mac
« Reply #22 on: February 06, 2016, 11:31:07 pm »
...where?! :-)

It is at https://fedorapeople.org/~easior/CodeBlocks-Mac-16.01-r2-debug.tar.bz2 with debug symbols.

Quote
Did you strip the sources? Because all lines are missing. For the development on the Mac you should not strip anything. This will help to track down the errors.
Ok. I have changed the value of variable CB_RELEASE_TYPE from -O2 to -g and temporally comment all strip scripts in update30.

All cbp files for Mac OS, I think, work fine. It should be committed to CB source tree. I have abandoned patch for update30 since there are there places to hold update scripts, i.e CB_DIR/src, PLUGIN_DIR/ and cbp file for plugin.

There is also some bug for wxsmith (see the second attachment).
« Last Edit: February 11, 2016, 08:51:20 am by Easior Lars »
Development Environments:GCC+CodeBlocks+wxWidgets
Developing Languages:Bash+Python+C/CPP+LaTeX
Developer Utils:Emacs+GIT+OpenSSH+GPG
OS:Mac OS X, Gentoo/Kali Linux/Fedora/CentOS, MS Windows
Blog:http://easior.i11r.com

Offline Easior Lars

  • Multiple posting newcomer
  • *
  • Posts: 44
Re: Release 16.01 for Mac
« Reply #23 on: February 14, 2016, 10:40:31 am »
Did you strip the sources? Because all lines are missing. For the development on the Mac you should not strip anything. This will help to track down the errors.

CB has crashed again. It complained that
Code: xml
<?xml version="1.0" encoding="UTF-8"?>
<report version="1.0" kind="exception">
  <system description="Mac OS X (Darwin 14.5.0 x86_64)"/>
  <stack>
    <frame level="0" function="wxDebugReport::AddContext(wxDebugReport::Context) " offset="00000000" file="debugrpt.cpp" line="49"/>
    <frame level="1" function="wxDebugReport::AddAll(wxDebugReport::Context) " offset="00000000" file="debugrpt.cpp" line="35"/>
    <frame level="2" function="CodeBlocksApp::OnFatalException() " offset="00000000" file="app.cpp" line="88"/>
    <frame level="3" function="wxFatalSignalHandler " offset="00000000" file="utilsunx.cpp" line="139"/>
    <frame level="4" function="_sigtramp " offset="00000000"/>
    <frame level="5" function="_sigtramp " offset="00000000"/>
    <frame level="6" function="CallTip::CallTipCancel() " offset="00000000" file="CallTip.cxx" line="30"/>
    <frame level="7" function="ScintillaBase::WndProc(unsigned int, unsigned long, long) " offset="00000000" file="ScintillaBase.cxx" line="92"/>
    <frame level="8" function="ScintillaWX::WndProc(unsigned int, unsigned long, long) " offset="00000000" file="ScintillaWX.cpp" line="94"/>
    <frame level="9" function="wxScintilla::SendMsg(unsigned int, unsigned long, long) const " offset="00000000" file="wxscintilla.cpp" line="26"/>
    <frame level="10" function="wxScintilla::CallTipCancel() " offset="00000000" file="wxscintilla.cpp" line="200"/>
    <frame level="11" function="cbStyledTextCtrl::CallTipCancel() " offset="00000000" file="cbstyledtextctrl.cpp" line="33"/>
    <frame level="12" function="cbStyledTextCtrl::OnKillFocus(wxFocusEvent&amp;) " offset="00000000" file="cbstyledtextctrl.cpp" line="8"/>
    <frame level="13" function="wxAppConsoleBase::HandleEvent(wxEvtHandler*, void (wxEvtHandler::*)(wxEvent&amp;), wxEvent&amp;) const " offset="00000000" file="appbase.cpp" line="61"/>
    <frame level="14" function="wxAppConsoleBase::CallEventHandler(wxEvtHandler*, wxEventFunctor&amp;, wxEvent&amp;) const " offset="00000000" file="appbase.cpp" line="62"/>
    <frame level="15" function="wxEvtHandler::ProcessEventIfMatchesId(wxEventTableEntryBase const&amp;, wxEvtHandler*, wxEvent&amp;) " offset="00000000" file="event.cpp" line="139"/>
    <frame level="16" function="wxEventHashTable::HandleEvent(wxEvent&amp;, wxEvtHandler*) " offset="00000000" file="event.cpp" line="99"/>
    <frame level="17" function="wxEvtHandler::TryHereOnly(wxEvent&amp;) " offset="00000000" file="event.cpp" line="158"/>
    <frame level="18" function="wxEvtHandler::TryBeforeAndHere(wxEvent&amp;) " offset="00000000" file="event.h" line="367"/>
    <frame level="19" function="wxEvtHandler::ProcessEvent(wxEvent&amp;) " offset="00000000" file="event.cpp" line="148"/>
    <frame level="20" function="wxEvtHandler::DoTryChain(wxEvent&amp;) " offset="00000000" file="event.cpp" line="155"/>
    <frame level="21" function="wxEvtHandler::ProcessEventLocally(wxEvent&amp;) " offset="00000000" file="event.cpp" line="152"/>
    <frame level="22" function="wxEvtHandler::ProcessEvent(wxEvent&amp;) " offset="00000000" file="event.cpp" line="149"/>
    <frame level="23" function="wxEvtHandler::SafelyProcessEvent(wxEvent&amp;) " offset="00000000" file="event.cpp" line="161"/>
    <frame level="24" function="wxWindowBase::HandleWindowEvent(wxEvent&amp;) const " offset="00000000" file="wincmn.cpp" line="152"/>
    <frame level="25" function="wxWidgetCocoaImpl::DoNotifyFocusEvent(bool, wxWidgetImpl*) " offset="00000000" file="window.mm" line="287"/>
    <frame level="26" function="wxWidgetCocoaImpl::DoNotifyFocusLost() " offset="00000000" file="window.mm" line="283"/>
    <frame level="27" function="wxWidgetCocoaImpl::resignFirstResponder(NSView*, void*) " offset="00000000" file="window.mm" line="153"/>
    <frame level="28" function="wxOSX_resignFirstResponder(NSView*, objc_selector*) " offset="00000000" file="window.mm" line="105"/>
    <frame level="29" function="-[NSWindow makeFirstResponder:] " offset="00000000"/>
    <frame level="30" function="-[wxNSWindow makeFirstResponder:] " offset="00000000" file="nonownedwnd.mm" line="21"/>
    <frame level="31" function="-[wxNonOwnedWindowController windowDidResignKey:] " offset="00000000" file="nonownedwnd.mm" line="50"/>
    <frame level="32" function="__CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ " offset="00000000"/>
    <frame level="33" function="_CFXNotificationPost " offset="00000000"/>
    <frame level="34" function="-[NSNotificationCenter postNotificationName:object:userInfo:] " offset="00000000"/>
    <frame level="35" function="-[NSWindow resignKeyWindow] " offset="00000000"/>
    <frame level="36" function="-[NSWindow _changeKeyAndMainLimitedOK:] " offset="00000000"/>
    <frame level="37" function="-[NSWindow _makeKeyRegardlessOfVisibility] " offset="00000000"/>
    <frame level="38" function="-[NSWindow makeKeyAndOrderFront:] " offset="00000000"/>
    <frame level="39" function="wxNonOwnedWindowCocoaImpl::Show(bool) " offset="00000000" file="nonownedwnd.mm" line="77"/>
    <frame level="40" function="wxNonOwnedWindow::Show(bool) " offset="00000000" file="nonownedwnd_osx.cpp" line="37"/>
    <frame level="41" function="Window::Show(bool) " offset="00000000" file="PlatWX.cpp" line="80"/>
    <frame level="42" function="ScintillaWX::WndProc(unsigned int, unsigned long, long) " offset="00000000" file="ScintillaWX.cpp" line="92"/>
    <frame level="43" function="wxScintilla::SendMsg(unsigned int, unsigned long, long) const " offset="00000000" file="wxscintilla.cpp" line="26"/>
    <frame level="44" function="wxScintilla::CallTipShow(int, wxString const&amp;) " offset="00000000" file="wxscintilla.cpp" line="200"/>
    <frame level="45" function="CCManager::DoShowTips(std::__1::vector&lt;wxString, std::__1::allocator&lt;wxString&gt; &gt; const&amp;, cbStyledTextCtrl*, int, int, int, int) " offset="00000000" file="ccmanager.cpp" line="137"/>
    <frame level="46" function="CCManager::OnEditorTooltip(CodeBlocksEvent&amp;) " offset="00000000" file="ccmanager.cpp" line="71"/>
    <frame level="47" function="cbEventFunctor&lt;CCManager, CodeBlocksEvent&gt;::Call(CodeBlocksEvent&amp;) " offset="00000000" file="cbfunctor.h" line="4"/>
    <frame level="48" function="Manager::ProcessEvent(CodeBlocksEvent&amp;) " offset="00000000" file="manager.cpp" line="26"/>
    <frame level="49" function="PluginManager::NotifyPlugins(CodeBlocksEvent&amp;) " offset="00000000" file="pluginmanager.cpp" line="145"/>
    <frame level="50" function="cbEditor::NotifyPlugins(int, int, wxString const&amp;, int, int) " offset="00000000" file="cbeditor.cpp" line="82"/>
    <frame level="51" function="cbEditor::OnEditorDwellStart(wxScintillaEvent&amp;) " offset="00000000" file="cbeditor.cpp" line="327"/>
    <frame level="52" function="wxAppConsoleBase::HandleEvent(wxEvtHandler*, void (wxEvtHandler::*)(wxEvent&amp;), wxEvent&amp;) const " offset="00000000" file="appbase.cpp" line="61"/>
    <frame level="53" function="wxAppConsoleBase::CallEventHandler(wxEvtHandler*, wxEventFunctor&amp;, wxEvent&amp;) const " offset="00000000" file="appbase.cpp" line="62"/>
    <frame level="54" function="wxEvtHandler::ProcessEventIfMatchesId(wxEventTableEntryBase const&amp;, wxEvtHandler*, wxEvent&amp;) " offset="00000000" file="event.cpp" line="139"/>
    <frame level="55" function="wxEvtHandler::SearchDynamicEventTable(wxEvent&amp;) " offset="00000000" file="event.cpp" line="174"/>
    <frame level="56" function="wxEvtHandler::TryHereOnly(wxEvent&amp;) " offset="00000000" file="event.cpp" line="158"/>
    <frame level="57" function="wxEvtHandler::TryBeforeAndHere(wxEvent&amp;) " offset="00000000" file="event.h" line="367"/>
    <frame level="58" function="wxEvtHandler::ProcessEventLocally(wxEvent&amp;) " offset="00000000" file="event.cpp" line="152"/>
    <frame level="59" function="wxEvtHandler::ProcessEvent(wxEvent&amp;) " offset="00000000" file="event.cpp" line="149"/>
    <frame level="60" function="wxWindowBase::TryAfter(wxEvent&amp;) " offset="00000000" file="wincmn.cpp" line="342"/>
    <frame level="61" function="wxEvtHandler::TryAfter(wxEvent&amp;) " offset="00000000" file="event.cpp" line="144"/>
    <frame level="62" function="wxEvtHandler::ProcessEvent(wxEvent&amp;) " offset="00000000" file="event.cpp" line="150"/>
    <frame level="63" function="wxScintilla::NotifyParent(SCNotification*) " offset="00000000" file="wxscintilla.cpp" line="570"/>
    <frame level="64" function="ScintillaWX::NotifyParent(SCNotification) " offset="00000000" file="ScintillaWX.cpp" line="54"/>
    <frame level="65" function="Editor::NotifyDwelling(Point, bool) " offset="00000000" file="Editor.cxx" line="240"/>
    <frame level="66" function="Editor::TickFor(Editor::TickReason) " offset="00000000" file="Editor.cxx" line="465"/>
    <frame level="67" function="ScintillaWX::DoOnTimer(wxTimerEvent&amp;) " offset="00000000" file="ScintillaWX.cpp" line="132"/>
    <frame level="68" function="wxScintilla::OnTimer(wxTimerEvent&amp;) " offset="00000000" file="wxscintilla.cpp" line="550"/>
    <frame level="69" function="wxAppConsoleBase::HandleEvent(wxEvtHandler*, void (wxEvtHandler::*)(wxEvent&amp;), wxEvent&amp;) const " offset="00000000" file="appbase.cpp" line="61"/>
    <frame level="70" function="wxAppConsoleBase::CallEventHandler(wxEvtHandler*, wxEventFunctor&amp;, wxEvent&amp;) const " offset="00000000" file="appbase.cpp" line="62"/>
    <frame level="71" function="wxEvtHandler::ProcessEventIfMatchesId(wxEventTableEntryBase const&amp;, wxEvtHandler*, wxEvent&amp;) " offset="00000000" file="event.cpp" line="139"/>
    <frame level="72" function="wxEvtHandler::SearchDynamicEventTable(wxEvent&amp;) " offset="00000000" file="event.cpp" line="174"/>
    <frame level="73" function="wxEvtHandler::TryHereOnly(wxEvent&amp;) " offset="00000000" file="event.cpp" line="158"/>
    <frame level="74" function="wxEvtHandler::TryBeforeAndHere(wxEvent&amp;) " offset="00000000" file="event.h" line="367"/>
    <frame level="75" function="wxEvtHandler::ProcessEventLocally(wxEvent&amp;) " offset="00000000" file="event.cpp" line="152"/>
    <frame level="76" function="wxEvtHandler::ProcessEvent(wxEvent&amp;) " offset="00000000" file="event.cpp" line="149"/>
    <frame level="77" function="wxEvtHandler::SafelyProcessEvent(wxEvent&amp;) " offset="00000000" file="event.cpp" line="161"/>
    <frame level="78" function="wxTimerImpl::SendEvent() " offset="00000000" file="timerimpl.cpp" line="5"/>
    <frame level="79" function="wxTimer::Notify() " offset="00000000" file="timercmn.cpp" line="10"/>
    <frame level="80" function="wxTimerImpl::Notify() " offset="00000000" file="timer.h" line="4"/>
    <frame level="81" function="wxProcessTimer(__CFRunLoopTimer*, void*) " offset="00000000" file="timer.cpp" line="3"/>
    <frame level="82" function="__CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ " offset="00000000"/>
    <frame level="83" function="__CFRunLoopDoTimer " offset="00000000"/>
    <frame level="84" function="__CFRunLoopDoTimers " offset="00000000"/>
    <frame level="85" function="__CFRunLoopRun " offset="00000000"/>
    <frame level="86" function="CFRunLoopRunSpecific " offset="00000000"/>
    <frame level="87" function="RunCurrentEventLoopInMode " offset="00000000"/>
    <frame level="88" function="ReceiveNextEventCommon " offset="00000000"/>
    <frame level="89" function="_BlockUntilNextEventMatchingListInModeWithFilter " offset="00000000"/>
    <frame level="90" function="_DPSNextEvent " offset="00000000"/>
    <frame level="91" function="-[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] " offset="00000000"/>
    <frame level="92" function="-[NSApplication run] " offset="00000000"/>
    <frame level="93" function="wxGUIEventLoop::OSXDoRun() " offset="00000000" file="evtloop.mm" line="30"/>
    <frame level="94" function="wxCFEventLoop::DoRun() " offset="00000000" file="evtloop_cf.cpp" line="34"/>
    <frame level="95" function="wxEventLoopBase::Run() " offset="00000000" file="evtloopcmn.cpp" line="7"/>
    <frame level="96" function="wxAppConsoleBase::MainLoop() " offset="00000000" file="appbase.cpp" line="33"/>
    <frame level="97" function="wxAppConsoleBase::OnRun() " offset="00000000" file="appbase.cpp" line="25"/>
    <frame level="98" function="wxAppBase::OnRun() " offset="00000000" file="appcmn.cpp" line="30"/>
    <frame level="99" function="wxApp::OnRun() " offset="00000000" file="app.cpp" line="92"/>
    <frame level="100" function="CodeBlocksApp::OnRun() " offset="00000000" file="app.cpp" line="85"/>
    <frame level="101" function="wxEntry(int&amp;, wchar_t**) " offset="00000000" file="init.cpp" line="50"/>
    <frame level="102" function="wxEntry(int&amp;, char**) " offset="00000000" file="init.cpp" line="51"/>
    <frame level="103" function="main " offset="00000000" file="app.cpp" line="32"/>
    <frame level="104" function="start " offset="00000000"/>
  </stack>
</report>
Any clue to debug?
Development Environments:GCC+CodeBlocks+wxWidgets
Developing Languages:Bash+Python+C/CPP+LaTeX
Developer Utils:Emacs+GIT+OpenSSH+GPG
OS:Mac OS X, Gentoo/Kali Linux/Fedora/CentOS, MS Windows
Blog:http://easior.i11r.com

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Release 16.01 for Mac
« Reply #24 on: February 14, 2016, 11:49:37 am »
Does it happen every time or is it just some random event?
You can try to start cb under lldb/gdb and wait for the crash to happen.
Then inspect the variables.

The line numbers in the crash report are totally wrong (the last character is removed).
« Last Edit: February 14, 2016, 11:51:55 am by oBFusCATed »
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Release 16.01 for Mac
« Reply #25 on: February 14, 2016, 11:58:59 am »
If the backtrace is correct the crash has happened, because the editor has lost the focus while the tooltip is still being created.
Which leads to the tooltip being destroyed in an unexpected time.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline Easior Lars

  • Multiple posting newcomer
  • *
  • Posts: 44
Re: Release 16.01 for Mac
« Reply #26 on: February 14, 2016, 12:24:04 pm »
Does it happen every time or is it just some random event?

It happened while mouse scrolling in CB editor with some source codes.

Quote from: oBFusCATed
You can try to start cb under lldb/gdb and wait for the crash to happen.
Then inspect the variables.

The line numbers in the crash report are totally wrong (the last character is removed).

Thanks. lldb is used by me  this time to debug and it gives some information as follow:
Code: bash
Process 62378 stopped
* thread #1: tid = 0x7770f, 0x0000000101f9025d libcodeblocks.dylib`Window::Destroy(this=0x0000000110f2ed90) + 61 at PlatWX.cpp:764, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x0)
    frame #0: 0x0000000101f9025d libcodeblocks.dylib`Window::Destroy(this=0x0000000110f2ed90) + 61 at PlatWX.cpp:764
   761 {
   762     if (wid) {
   763         Show(false);
-> 764         GETWIN(wid)->Destroy();
   765     }
   766     wid = 0;
   767 }
(lldb)

Any suggestion?
« Last Edit: February 14, 2016, 12:29:05 pm by Easior Lars »
Development Environments:GCC+CodeBlocks+wxWidgets
Developing Languages:Bash+Python+C/CPP+LaTeX
Developer Utils:Emacs+GIT+OpenSSH+GPG
OS:Mac OS X, Gentoo/Kali Linux/Fedora/CentOS, MS Windows
Blog:http://easior.i11r.com

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Release 16.01 for Mac
« Reply #27 on: February 14, 2016, 12:59:22 pm »
Any suggestion?
Am I correct in my guess that the calltip is cancelled while it is being created?
Probably you can add a flag that marks the beginning/end of the calltip creation and then don't call the cancel function if this flag is set.
Or find out why the creation or cancellation is happening.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline Easior Lars

  • Multiple posting newcomer
  • *
  • Posts: 44
Re: Release 16.01 for Mac
« Reply #28 on: February 14, 2016, 01:18:08 pm »
Am I correct in my guess that the calltip is cancelled while it is being created?

I don't know whether you are correct or not since I'm not familiar with the CB sources.

Quote from: oBFusCATed
Probably you can add a flag that marks the beginning/end of the calltip creation and then don't call the cancel function if this flag is set.
How to add a flag? Do you mean that setting a breakpoint in lldb to debug CB?
Development Environments:GCC+CodeBlocks+wxWidgets
Developing Languages:Bash+Python+C/CPP+LaTeX
Developer Utils:Emacs+GIT+OpenSSH+GPG
OS:Mac OS X, Gentoo/Kali Linux/Fedora/CentOS, MS Windows
Blog:http://easior.i11r.com

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Release 16.01 for Mac
« Reply #29 on: February 14, 2016, 02:45:15 pm »
I don't know whether you are correct or not since I'm not familiar with the CB sources.
Just inspect the backtrace. The name of the function on it will reveal what is going on.

How to add a flag? Do you mean that setting a breakpoint in lldb to debug CB?
Modify the source by adding a bool flag then when you start the method that creates the calltip set it to true, when the method exits set it to false. Lastly add a check if the flag is set in the onkillfocus method.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]