Code::Blocks Forums

User forums => Help => Topic started by: asivakum on May 27, 2021, 11:19:19 am

Title: Codeblocks IDE not closing and returning when run in automated build environment
Post by: asivakum on May 27, 2021, 11:19:19 am
Hi,
I am seeing that when a codeblock project is built using make in automated build environment, the IDE is launching and build is complete, but the IDE window is not closing automatically after the build is done, and hence the build is stuck there.
Unfortunately, as its an automated build environment, we can not check what is the content displayed in the IDE, but can only see that one codeblocks application is running in the Task Manager.

FYI, the build is run on a Win2016 server.
The same issue is seen on latest 20.03 version of codeblocks as well.

Can someone suggest of ways to debug this issue.

Thanks.
Title: Re: Codeblocks IDE not closing and returning when run in automated build environment
Post by: BlueHazzard on May 27, 2021, 11:44:36 am
Can you give us the arguments you start codeblocks?
Does the project has errors after building?
Is your environment windows or linux?
Is the build complete, i mean is a executable/library generated?
If you load the project on a Desktop environment, does a error message pops up?
Title: Re: Codeblocks IDE not closing and returning when run in automated build environment
Post by: asivakum on May 27, 2021, 11:59:31 am
Hi
Cmd line Arguments used:
cd ./targets && cmd /C codeblocks.exe   mctl.workspace --target=mctl_default  /ns --build

No the project does not have errors after building, As per the log, build is complete and binaries are properly generated.
Environment is Windows - Win2016 server.

Opening the same codeblocks project on a Desktop, does not report any errors.

Thanks.
Title: Re: Codeblocks IDE not closing and returning when run in automated build environment
Post by: oBFusCATed on May 27, 2021, 12:40:59 pm
Can someone suggest of ways to debug this issue.
Connect with remote desktop or vnc and see where it got stuck.
Title: Re: Codeblocks IDE not closing and returning when run in automated build environment
Post by: BlueHazzard on May 27, 2021, 05:05:15 pm
Is the build duration long?
Is there a lot output in the log?
Title: Re: Codeblocks IDE not closing and returning when run in automated build environment
Post by: asivakum on May 28, 2021, 12:00:01 pm
Connect with remote desktop or vnc and see where it got stuck.

The codeblocks is launched as a background process, and when we do remote desktop to that server, we cannot see whats the issue, as no codeblocks window is opened in the server.
We can only see that a codeblocks application is running in the taskManager.
Title: Re: Codeblocks IDE not closing and returning when run in automated build environment
Post by: asivakum on May 28, 2021, 12:01:18 pm
Is the build duration long?
Is there a lot output in the log?
No, it takes only a minute to run the build, and the output file will be within 70 KB only,
Title: Re: Codeblocks IDE not closing and returning when run in automated build environment
Post by: oBFusCATed on May 28, 2021, 12:05:04 pm
The codeblocks is launched as a background process, and when we do remote desktop to that server, we cannot see whats the issue, as no codeblocks window is opened in the server.
We can only see that a codeblocks application is running in the taskManager.
What do you mean by "background process"? Windows service?

If you don't see any windows, then you'll have to attach a debugger and try to find where it is getting stuck.
Title: Re: Codeblocks IDE not closing and returning when run in automated build environment
Post by: asivakum on May 28, 2021, 12:08:34 pm
What do you mean by "background process"? Windows service?

If you don't see any windows, then you'll have to attach a debugger and try to find where it is getting stuck.

Not sure if its launched a windows service, but in the task Manager it is shown as a background process.

Can you say the steps to debug using a debugger ?
Title: Re: Codeblocks IDE not closing and returning when run in automated build environment
Post by: oBFusCATed on May 28, 2021, 12:47:48 pm
Not sure if its launched a windows service, but in the task Manager it is shown as a background process.
You have to find out. Most probably CB cannot work correctly if run as a service.

Can you say the steps to debug using a debugger ?
Find a debugger (some version of gdb) and attach to the running process.
Title: Re: Codeblocks IDE not closing and returning when run in automated build environment
Post by: BlueHazzard on May 28, 2021, 02:58:02 pm
It would be nice to know what calls codeblocks, so i can try to reproduce this
Title: Re: Codeblocks IDE not closing and returning when run in automated build environment
Post by: asivakum on May 31, 2021, 07:29:58 am
Not sure if its launched a windows service, but in the task Manager it is shown as a background process.
You have to find out. Most probably CB cannot work correctly if run as a service.

Can you say the steps to debug using a debugger ?
Find a debugger (some version of gdb) and attach to the running process.
Thanks I will check it out.
Title: Re: Codeblocks IDE not closing and returning when run in automated build environment
Post by: asivakum on May 31, 2021, 07:31:17 am
It would be nice to know what calls codeblocks, so i can try to reproduce this
I think there is a separe build framework, which launches the build script. I am not aware of much details about it, as its not disclosed outside of the build team.
Hence, I think I can't provide much information here.