kaskr / adcomp

AD computation with Template Model Builder (TMB)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Non-interactive gdbsource hangs under windows

lentinj opened this issue · comments

Description:

Under Windows, gdbsource(interactive = FALSE) will never return.

The solution may well be quite easy. Compared to the UNIX version, the gdbscript formed in .gdbsource.win seems to be missing a final quit\n when interactive = FALSE:

adcomp/TMB/R/gdbsource.R

Lines 51 to 52 in 3155ebd

txt <- paste("set breakpoint pending on\nb abort\nrun --vanilla -f",
file, "\nbt\n")

Reproducible Steps:

writeLines('print("Hello, world")', con = 'gdbsource_test.R') ;
TMB::gdbsource('gdbsource_test.R', interactive = FALSE)

Current Output:

Nothing, the gdb process hangs.

Expected Output:

The same as other operating systems: Program returned without errors

TMB Version:

TMB 1.9.6

R Version:

R-4.3.1-win.exe

Operating System:

Windows 11

Sorry for late reply. I've been trying to replicate without luck. It seems to work well on the Windows server I have access to (feel free to re-open if you still think there's a problem).