News:

As usual while waiting for the next release - don't forget to check the nightly builds in the forum.

Main Menu

[trunk] OsX Catalina: crash on init due to wxTheClipboard issue

Started by perazz, February 08, 2022, 07:55:41 PM

Previous topic - Next topic

perazz

Hi,

I'm a longtime C::B user but new to developing and contributing to this forum - sorry if I'm posting in the wrong place.
I've just managed to build C::B trunk on Mac OSX Catalina (arm64). I would like to help debuggin/bugfixing on Mac.

The app does not open because of an assert issue with the clipboard.

I think it's related to this mac-specific bug: https://github.com/OSGeo/grass/pull/819. It's fixed if the call to Flush() is only made if the clipboard IsOpened():
applies to both OnInit (src/app.cpp, line 581) and OnExit (src/app.cpp, line 829)
and I solved it by wrapping:


   if (wxTheClipboard->IsOpened()) {
        wxTheClipboard->Flush();
      }


Is this the right way to suggest a bug fix?
Thanks for the hard work on C::B,

Federico





BlueHazzard

Hi,
QuoteI would like to help debuggin/bugfixing on Mac.
Highly appreciated!!! Thank you!

QuoteIs this the right way to suggest a bug fix?
The best way for bug fixes and patches is to provide them on sourceforge.
Here they will get lost in the noise of normal forum posts

AndrewCot

Posted in the right forum and good to see a Mac dev trying to help out.

The following wiki page has info on patches and info on the C::B SF ticket process:
   https://wiki.codeblocks.org/index.php/Creating_a_patch_to_submit_(Patch_Tracker)
Unfortunately the page is for Windows/Linux, so not all of the info may be applicable or may work on OSX, but a large chunk of it will. The page info on submitting a patch is not right, create a ticket and attach the patch.

Miguel Gimenez

@perazz or @Xaviou, would this be acceptable?


#ifdef __WXOSX_MAC__
if (wxTheClipboard->IsOpened())
#endif
        wxTheClipboard->Flush();


or, is there a method to check specifically for Catalina?

Miguel Gimenez