Author Topic: Codeblocks IDE not closing and returning when run in automated build environment  (Read 2912 times)

Offline asivakum

  • Multiple posting newcomer
  • *
  • Posts: 11
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.

Offline BlueHazzard

  • Developer
  • Lives here!
  • *****
  • Posts: 2980
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?

Offline asivakum

  • Multiple posting newcomer
  • *
  • Posts: 11
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.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13405
    • Travis build status
Can someone suggest of ways to debug this issue.
Connect with remote desktop or vnc and see where it got stuck.
(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 BlueHazzard

  • Developer
  • Lives here!
  • *****
  • Posts: 2980
Is the build duration long?
Is there a lot output in the log?

Offline asivakum

  • Multiple posting newcomer
  • *
  • Posts: 11
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.

Offline asivakum

  • Multiple posting newcomer
  • *
  • Posts: 11
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,

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13405
    • Travis build status
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.
(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 asivakum

  • Multiple posting newcomer
  • *
  • Posts: 11
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 ?

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13405
    • Travis build status
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.
(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 BlueHazzard

  • Developer
  • Lives here!
  • *****
  • Posts: 2980
It would be nice to know what calls codeblocks, so i can try to reproduce this

Offline asivakum

  • Multiple posting newcomer
  • *
  • Posts: 11
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.

Offline asivakum

  • Multiple posting newcomer
  • *
  • Posts: 11
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.