Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

After loading qtbase, closing quartz windows crashes R #2

Open
hadley opened this issue Mar 7, 2011 · 3 comments
Open

After loading qtbase, closing quartz windows crashes R #2

hadley opened this issue Mar 7, 2011 · 3 comments

Comments

@hadley
Copy link
Member

hadley commented Mar 7, 2011

On OS X:

library(qtbase)
plot(x)
# Close the plot window

#  *** caught segfault ***
# address 0x18, cause 'memory not mapped'

Output from sessionInfo()

R version 2.12.0 (2010-10-15)
Platform: x86_64-apple-darwin9.8.0/x86_64 (64-bit)

locale:
[1] en_US.UTF-8/en_US.UTF-8/C/C/en_US.UTF-8/en_US.UTF-8

attached base packages:
[1] stats     graphics  utils     datasets  grDevices methods   base     

other attached packages:
[1] devtools_0.1
@hadley
Copy link
Member Author

hadley commented Mar 7, 2011

Here's the stack trace from gdb:

#0  0x00007fff8624111c in objc_msgSend ()
#1  0x00007fff87f0a1e6 in _CFAutoreleasePoolPop ()
#2  0x00007fff8380104b in -[NSAutoreleasePool release] ()
#3  0x0000000106242b12 in QEventDispatcherMac::processEvents ()
#4  0x000000010782fcf5 in QCoreApplication::processEvents ()
#5  0x00000001030b19ca in R_Qt_eventHandler () at /Users/hadley/Documents/cranvas/qtbase/src/EventLoop.cpp:37
#6  0x00000001030b1a0b in R_Qt_timerInputHandler (data=0x0) at /Users/hadley/Documents/cranvas/qtbase/src/EventLoop.cpp:47
#7  0x00000001001854ad in R_runHandlers (handlers=0x0, readMask=0x1002f4980) at ../../../../R-2.12.0/src/unix/sys-std.c:380
#8  0x0000000100186f1c in Rstd_ReadConsole (prompt=<value temporarily unavailable, due to optimizations>, buf=0x7fff5fbfe20c "plot(1:10)\n", len=4096, addtohistory=<value temporarily unavailable, due to optimizations>) at ../../../../R-2.12.0/src/unix/sys-std.c:911
#9  0x00000001000d6561 in Rf_ReplIteration (rho=0x100889150, savestack=0, browselevel=0, state=0x7fff5fbfe200) at ../../../../R-2.12.0/src/main/main.c:210
#10 0x00000001000d66a1 in R_ReplConsole (rho=0x100889150, savestack=0, browselevel=0) at ../../../../R-2.12.0/src/main/main.c:311
#11 0x00000001000d6bb0 in run_Rmainloop () at ../../../../R-2.12.0/src/main/main.c:995
#12 0x0000000100000eeb in main ()

1 similar comment
@hadley
Copy link
Member Author

hadley commented Mar 7, 2011

Here's the stack trace from gdb:

#0  0x00007fff8624111c in objc_msgSend ()
#1  0x00007fff87f0a1e6 in _CFAutoreleasePoolPop ()
#2  0x00007fff8380104b in -[NSAutoreleasePool release] ()
#3  0x0000000106242b12 in QEventDispatcherMac::processEvents ()
#4  0x000000010782fcf5 in QCoreApplication::processEvents ()
#5  0x00000001030b19ca in R_Qt_eventHandler () at /Users/hadley/Documents/cranvas/qtbase/src/EventLoop.cpp:37
#6  0x00000001030b1a0b in R_Qt_timerInputHandler (data=0x0) at /Users/hadley/Documents/cranvas/qtbase/src/EventLoop.cpp:47
#7  0x00000001001854ad in R_runHandlers (handlers=0x0, readMask=0x1002f4980) at ../../../../R-2.12.0/src/unix/sys-std.c:380
#8  0x0000000100186f1c in Rstd_ReadConsole (prompt=<value temporarily unavailable, due to optimizations>, buf=0x7fff5fbfe20c "plot(1:10)\n", len=4096, addtohistory=<value temporarily unavailable, due to optimizations>) at ../../../../R-2.12.0/src/unix/sys-std.c:911
#9  0x00000001000d6561 in Rf_ReplIteration (rho=0x100889150, savestack=0, browselevel=0, state=0x7fff5fbfe200) at ../../../../R-2.12.0/src/main/main.c:210
#10 0x00000001000d66a1 in R_ReplConsole (rho=0x100889150, savestack=0, browselevel=0) at ../../../../R-2.12.0/src/main/main.c:311
#11 0x00000001000d6bb0 in run_Rmainloop () at ../../../../R-2.12.0/src/main/main.c:995
#12 0x0000000100000eeb in main ()

@lawremi
Copy link
Member

lawremi commented Mar 7, 2011

Simon may have to be involved with this one. It looks like the qtbase event loop is driving the Quartz event loop, which tries to release memory at the wrong time. There is a related issue btw with Windows where Qt (or something) aborts when R is closed, which is likely related to the killing of the Windows event loop.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants