Author Topic: FreeBSD crashes  (Read 1396 times)

Offline CHannosset

  • Single posting newcomer
  • *
  • Posts: 9
FreeBSD crashes
« on: July 07, 2022, 12:31:39 pm »
Hi,
I am new developer in FreeBSD (30++ development in C/C++/C# experience) and am using Code Blocks.
I like it but I experience frequent crashes and core dump: I can provide core dump or can debug and point out where is the issue is.
I can help pointing out the bugs, can you please forward me to the best Forum to help developers stabilizing the application.

Christophe

Offline AndrewCot

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 678
Re: FreeBSD crashes
« Reply #1 on: July 07, 2022, 01:20:08 pm »
First with any report please supply details of the version of C::B you are using and if it's not the latest nightly build then give it a go. You can grab the latest nightly from the nightly build forum via links in the posts.

There are a number of ways to track down bug yourself at a high level they all require you to build C::B. So first question is what OS are you familiar with as IMHO you should start with it to build C::B in order to get familiar with the build process and debugging. From this answer I can then point you to what I think will be the quickest way to get up to speed.
C::B XML crash report file is way more usable than a core dump.

Offline CHannosset

  • Single posting newcomer
  • *
  • Posts: 9
Re: FreeBSD crashes
« Reply #2 on: July 08, 2022, 10:48:50 am »
Thanks
CODE::Blocks
Name             : Code::Blocks
Version          : 20.03-r11997
SDK Version      : 2.0.0
Scintilla Version: 3.7.5
Author           : The Code::Blocks Team
E-mail           : info@codeblocks.org
Website          : http://www.codeblocks.org

wxWidgets Library (wxGTK port)
Version 3.0.5 (Unicode: wchar_t, debug level: 1),
compiled at Feb 13 2022 05:37:23

Runtime version of toolkit used is 3.24.
Compile-time GTK+ version is 3.24.31.

Operating System

FreeBSD 13.0-RELEASE-p11

Questions

  • What compiler should I use to build Code::Blocks? (I am currently using gcc)
  • What is the procedure to (re)build Code::Blocks under FreeBSD?
  • Where can I find the xml file, so far I have never seen any xml file, only codeblocks.core
  • Is this the correct forum post for such discussion? (if not please point me to the adequate one)
  • Should I report an issue I have found, what is the procedure?

Offline AndrewCot

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 678
Re: FreeBSD crashes
« Reply #3 on: July 08, 2022, 01:01:44 pm »
Answers to your questions:
  • On most OS's it is GCC, but on the MAC it's CLANG and as for the exact version and package depends on the OS.
  • Check out the Code::Blocks WIKI pages for info if you want to jump in without my help.
  • On Windows there is a crash report file. On Linux there is a dialog that pops up where you can view the crash report. On MAC there is also a crash report. On FreeBSD I am assuming it will be similar to Linux, but FreeBSD is a BSD based Unix not a Linux based OS so it may be different.
  • If you want to try other places then go for it. This is a help forum and I am trying to help and until enough info is available then this IMHO is as good as anywhere else.
  • There is not enough info supplied in order to report your issue as a problem at this point in time that can be used to help resolve the problem you are seeing.
Things to try or questions to answer:
  • Can you please let me know what OS you are most familiar with that you still can use?
  • The r11997 from Feb 2022 is now almost 6 months old. Please try with the latest nightly build. The same process you used to get the release in Feb 2022 should work again with a later release.
  • Can you give more details on when the crashes occur and what you were doing when the crashes occur.
  • After gathering the info for item 4) give disabling the codecompletion plugin a go. You can control the enabling/disabling of plugins via the plugin menu.
  • When it crashes what do you see or get on the screen FreeBSD?
  • If you do not get anything when it crashes in Freebsd then manually run the C::B executable using GDB then when it crashes you can grab the call stack (backtrace in GDB speak) by runnint the "bt 100" command and grab the results and post them.
« Last Edit: July 08, 2022, 01:05:27 pm by AndrewCot »

Offline CHannosset

  • Single posting newcomer
  • *
  • Posts: 9
Re: FreeBSD crashes
« Reply #4 on: July 08, 2022, 02:11:27 pm »
Thanks for the info.
I am currently developing services and libraries in C under FreeBSD - I would like to stabilize the version as it crashes on a regular basis.
I have extracted from Source Forge the latest source code.

Where can I find the procedure to rebuild on FreeBSD?
I had a look on the web site and the documentation but there is no specific detail for FreeBSD. The manual also specifies that Building Code::Blocks for Linux "should be reviewed and completed. Does not seem to be totally updated"[sic]. As you correctly mentioned Linux is not FreeBSD and definitely some settings needs to be correctly configured.

I am also unaware of any third party library used. Is there a list?

Crashes mainly happens on 2 occasions:
  • building or rebuilding, excess of opened pipes (clicking cancel crashes, continue makes the whole environment unstable)
  • No action from the end-user. suddenly Code::Blocks crashes even overnight. Happens at least one time a day.
When Code::Blocks crashes, it simply disappear silently leaving only a .core file a proof of the sudden disappearance.

Offline AndrewCot

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 678
Re: FreeBSD crashes
« Reply #5 on: July 08, 2022, 02:48:48 pm »
I cannot help for much longer as I ask question and for you to try stuff and you want to not do it or go off on tangents.
So let me try again:

  • What OS you are most familiar with that you still can use? The latest source code changes most days, so latest is not relevant a SVN source r<number> is relevant as per the "r11997" and the  wxWidget "Feb 13 2022 05:37:23" date in the info you supplied let me know approx when C::B was built, but I would need to spend time gettign the exact date which is not relevant  as it is not the latest nightly r12839 or the latest SVN code r12847 (as of earlier today my time zone).
  • Did you try the last nightly release? If not, why not?
  • Thanks for the crash info as it helps in my understanding of the problem based on previous crash reports I have seen.
  • Lets go back to basic support on this one:
  • In Codeblocks there is a menu called "Plugins", in the Plugins drop down at the bottom is a sub menu called "Manager Plugins..."
  • Select the Manager Plugins sub menu
  • In the list shown find in the first column the plugin "Code Completion". Select it.
  • In the right side of the dialog is a "Disable" button. Select it.
  • Clock on the "Close" button.
  • Exit Codeblocks and save the config when asked.
      5. Please run codeblcoks from GDB and grab the back trace.

As for building C::B I have not got that far yet and will not advance to it until I get the info I want as I do not want you to spend days and days going off on the following and wasting your time and mine:
  • If you want to build C::B by yourself then let me know and I will stop.
  • There is no manual on the WIKI site, so I have no idea what manual you are referring to and I also know that only one manual that I am aware of has helpful info on building a library used by C::B.
  • There is specific info on the WIKI for Freebsd and as such I have no idea where you looked and do not want to know as 99% of the build guides you will find are out of date and if you find the three guides I am aware of that are up to date for some OS's then you are doing very well in finding them.

Offline CHannosset

  • Single posting newcomer
  • *
  • Posts: 9
Re: FreeBSD crashes
« Reply #6 on: July 09, 2022, 02:52:31 am »
  • I have been working under windows for the last 30 years. I am currentkly starting to develop under FreeBSD
  • No I haven't. As I am new in FreeBSD, I haven't figured out how to copy the CodeBlocks latest release and execute it. I have ran CodeBlocks under windows and it works fine ( I haven't encountered any issue so far). Due to security concerns, I decided to migrate the solution to FreebSD (& OpenBSD) as the package applicaiton I am developing requires a solid secured server to host the gateways. Now you understand why I want to use CodeBlocks under FreeBSD and why I am not very experienced in FreeBSD. The version I used is the one I got from the offcial FreeBSD ports
  • You can see me as an end-user and like CodeBlocks that I value as a good product. My goal is to help you finalizing CodeBlocks as a stable product for FreeBSD.
  • I will try this today and will report after a few days running if this solves the issue - I can of course also attach the core if you want.
  • GDB - shouldn't I need the source files corresponding to the executable? This is the only reason why I was thinking of building CodeBlocks.

I went to the Forum page on howe to use a nightly build and from there to the wiki page and the FreeBSD installation procedure. I will follow and install the latest build.

Thanks for your support.

Offline AndrewCot

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 678
Re: FreeBSD crashes
« Reply #7 on: July 09, 2022, 03:28:02 am »
Thanks for your reply.
  • Then I would advise to get you building C::B on Windows or Linux first using the same process I expect will be used on FreeBSD as it will help allot when you get to FreeBSD if you hit any problems. I have not used FreeBSD. I am not aware of anyone who is familiar with FreeBSD based on forum posts that can help you if you hit a specific FreeBSD issue. Building on Linux will be similar to FreBSD and may be a better choice and on Xubuntu or Mint or another Ubuntu based distro you can install the latest nightly build and the C::B devs can help with any issues you come across. You can setup the Linux OS as a Virtual Machine on Windows to do the building and testing before trying to do it on FreeBSD. Let me know if you want to do this and which OS you want to build on first. If you want to build on FreeBSD first then you are on your own.
  • See if you can find a nightly build for FreeBSD as it will be more stable than the 20.03 you are using, but you may be out of luck as it is not used allot compared to Linux.
  • Completed.
  • Give it a go as it has caused issues on Linux with old C::B releases and may causing your issues, but it may be something else. If it is something else then building C::B from source may be required, but before that the next thing to try is to disable all non essential plugins and try, but I would need to search the forum for this list as I cannot remember what is needed. I do know that the two most important plugins I keep using and updating are the compiler and debugger plugins.
  • No you do not require the source to get a backtrace. But saying that it as the C::B executable does not have symbol info it will have addresses for some of the all entries. It is better than nothing.

Offline CHannosset

  • Single posting newcomer
  • *
  • Posts: 9
Re: FreeBSD crashes
« Reply #8 on: July 09, 2022, 03:44:14 am »
  • I have stopped all current development on Windows (suspicious about windows after win7) - do not trust linux at all (maybe Debian but I only have 4 computers and all are already being used). This is an opportunity to have a C::B FreeBSD support. C::B has been built for FreeBSD as there is a distribution in FreeBSD ports, should I have time, then I guess I am on my own to build C::B :'(
  • I will have a look and try my luck
  • I will keep you posted on this - confirmation next week.
  • Can I send you the core dump instead?

Offline AndrewCot

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 678
Re: FreeBSD crashes
« Reply #9 on: July 09, 2022, 04:51:07 am »
You will need to perform the analysis of the core dump on your FreeBSD as I do not have the required files and FreeBSD to do the analysis.

Offline CHannosset

  • Single posting newcomer
  • *
  • Posts: 9
Re: FreeBSD crashes
« Reply #10 on: July 11, 2022, 02:00:35 pm »
Hi,
Good news, I was able to install a more recent release
Build July 5 2022, 19:47:41

Name             : Code::Blocks
Version          : 20.03-r11997
SDK Version      : 2.0.0
Scintilla Version: 3.7.5
Author           : The Code::Blocks Team
E-mail           : info@codeblocks.org
Website          : http://www.codeblocks.org

wxWidgets Library (wxGTK port)
Version 3.0.5 (Unicode: wchar_t, debug level: 1),
compiled at Jul  3 2022 16:37:06

Runtime version of toolkit used is 3.24.
Compile-time GTK+ version is 3.24.33.


I reactivated the code completion plugin and all seems stable so far.  :)

Offline AndrewCot

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 678
Re: FreeBSD crashes
« Reply #11 on: July 11, 2022, 02:19:05 pm »
When you had the codecompletion plugin disabled did you get and crashes?

You did not updated C::B. It is still r11997.
You installed a later wxWidgets build, but it looks to be the same 3.0.5 version.

So you effectively did no updates that I can see that matter or would change to help the crash and now that you have re-enabled the codecompletion IMHO you are back to the same position you were before you disabled the codecompletion plugin.
« Last Edit: July 11, 2022, 02:56:51 pm by AndrewCot »

Offline CHannosset

  • Single posting newcomer
  • *
  • Posts: 9
Re: FreeBSD crashes
« Reply #12 on: July 12, 2022, 01:52:50 am »
Indeed, the version is the same but the build is more recent as shown in the screenshot.
The Build specifies July and not February.
I have no idea how to update the binaries others than use pkg update -f and pkg upgrade -f.
I relaunched the commands today, CodeBlocks 20.03_2 was in the list but apparently there was no changes.

Note that after I tried to install subversion, I encounter Qt5 library incompatibility.
I have the hardware and coding expertise to help for FreeBSD, I simply do not have the experience and knowledge of the Operating System as my profile is not an administrator one.
« Last Edit: July 12, 2022, 02:27:29 am by CHannosset »

Offline CHannosset

  • Single posting newcomer
  • *
  • Posts: 9
Re: FreeBSD crashes
« Reply #13 on: July 12, 2022, 09:35:08 am »
Hi,

I do not know if this is the right post, please do not hesitate to correct me.
I noticed that sometimes the building of a project in FreeBSD triggers some message box due to a failed assert.
Here is the screenshot of one.

Offline CHannosset

  • Single posting newcomer
  • *
  • Posts: 9
Re: FreeBSD crashes
« Reply #14 on: July 20, 2022, 05:33:47 am »
The version I have (Build: Jul  5 2022, 19:47:41 - wx3.0.5 - clang 11.0.1 (FreeBSD , unicode) - 64 bit)  is very stable - no crash, no issue.
A delight to use.

Thank you.