Re: [R-SIG-Mac] CONFIRMED - R.app crashes at startup on MacOS Sierra

2016-12-08 Thread Simon Urbanek
Brandon,

AFAICS your report is entirely unrelated to the problem reported by Karl - it's 
an entirely different location and cause. I may be able to look into it, we 
just should make sure we're not mixing unrelated reports.

Thanks,
Simon



> On Dec 8, 2016, at 11:30 AM, Brandon Hurr  wrote:
> 
> Simon,
> 
> I have been experiencing this error for quite some time. If I load a r
> script by double clicking it, it happens nearly 100% of the time. If I
> load R itself first then it doesn't happen. If I clear the "recent"
> files area it doesn't happen until I fill it again. The file opened
> seems irrelevant, as does the location of the file (admittedly, all in
> user space or external drives).
> 
> Despite the dire warning, if I hit escape I can continue working
> nearly indefinitely without issue (my script save rate increases to
> compensate for risk).
> 
> This was reported by CW on Nov 4th (perhaps others before), email
> entitled: "[R-SIG-Mac] R segfault at startup, causing R crash". I
> worked a little bit with Kevin Ushey offline to get to the bottom of
> it further and I thought he pinned it down or at least got closer to
> the cause.
> 
> "
> After playing around with R.app for a bit, I was able to get myself
> into a state where R.app was either dying or hanging on startup. I did
> the following:
> 
>   1. Open R.app,
>   2. Open a new R document (using the icon in the top menu bar --
> 'Create a new, empty document in the editor' ),
>   3. Write and execute some code -- in my case, 'x <- 1; print(x)',
> executed with Cmd + Enter,
>   4. (optionally) Repeat steps 2 and 3, creating new documents and
> executing more code,
>   5. Focus a different application,
>   6. Attempt to open an R document (using the menu bar again --
> 'Source script or load data in R',
>   7. Observe that R.app is now hanging.
> 
> Note that if you run these repro steps, you may see R segfault / die
> on startup (although in some cases all was fine). Note that step 5 is
> necessary (IIUC) to force R.app to attempt to save the application
> state.
> 
> It looks like R.app stores session state in the folder
> 
>~/Library/Saved Application State/org.R-project.R.savedState
> 
> My hypothesis at this point is that this saved state is somehow
> getting corrupted. Removing that folder seems to resolve any startup
> crashes I see.
> 
> As for the 'Open File' dialog hang, here's what I believe are the
> relevant bits of an lldb stack trace I see:
> 
> * frame #0: 0x7fffce2a7cba libsystem_kernel.dylib`__psynch_mutexwait + 10
>frame #1: 0x7fffce390f6a
> libsystem_pthread.dylib`_pthread_mutex_lock_wait + 100
>frame #2: 0x7fffc573faee
> FinderKit`+[FI_TFloatingInputWindowController singleton] + 34
>frame #3: 0x7fffc57edd5b FinderKit`-[FI_TBrowserTableView
> inputContext] + 29
>frame #4: 0x7fffb6d397dc AppKit`+[NSTextInputContext
> currentInputContext] + 145
>frame #5: 0x7fffb6e7a272 AppKit`+[_NSAutomaticFocusRing
> setActiveFirstResponderChanged] + 37
>frame #6: 0x7fffb6e7a1d9
> AppKit`___NSPostActiveFirstResponderChanged_block_invoke + 29
>frame #7: 0x7fffb90cdec7
> CoreFoundation`__CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__
> + 23
>frame #8: 0x7fffb90cde37 CoreFoundation`__CFRunLoopDoObservers + 391
>frame #9: 0x7fffb90aead9 CoreFoundation`__CFRunLoopRun + 873
>frame #10: 0x7fffb90ae514 CoreFoundation`CFRunLoopRunSpecific + 420
>frame #11: 0x7fffbaaabcb2 Foundation`-[NSRunLoop(NSRunLoop)
> runMode:beforeDate:] + 277
>frame #12: 0x00010b21f43e R`-[RDocumentWinCtrl
> setStatusLineText:](self=0x6180001e7c00,
> _cmd="setStatusLineText:", text=@"print(x, ...)") + 910 at
> RDocumentWinCtrl.m:465
>frame #13: 0x00010b21f03d R`-[RDocumentWinCtrl
> RDocumentDidResize:](self=0x6180001e7c00,_cmd="RDocumentDidResize:",
> notification=@"NSWindowDidResizeNotification") + 77 at
> RDocumentWinCtrl.m:431
> 
> with context from frame 12:
> 
> frame #12: 0x00010b21f43e R`-[RDocumentWinCtrl
> setStatusLineText:](self=0x6180001e7c00,
> _cmd="setStatusLineText:", text=@"print(x, ...)") + 910 at
> RDocumentWinCtrl.m:465
>   462  [statusLine setStringValue:text];
>   463  [statusLine setNeedsDisplay:YES];
>   464  // Run NSDefaultRunLoopMode to allow to update status line
> -> 465  [[NSRunLoop currentRunLoop] runMode:NSDefaultRunLoopMode
>   466
> beforeDate:[NSDate distantPast]];
>   467
>   468  }
> 
> Hopefully this helps...
> 
> Best,
> Kevin
> "
> 
> B
> 
> On Thu, Dec 8, 2016 at 6:28 AM, Simon Urbanek
>  wrote:
>> Karl,
>> 
>> unfortunately I cannot reproduce it on 10.12.1. How exactly can you trigger 
>> it? I have tried dragging a file on the R icon and open -a 
>> /Applications/R.app test.R and neither crashed on me. Does it depend on the 
>> R file opened or its location?
>> 
>> Rainer,
>> it seems that your build is 

[R-SIG-Mac] R crashes using Command + D shortcut

2016-12-08 Thread C W
Dear R list,

I finally can't stand this anymore.  I generally use Command + D to change
directory.

A scenario would be:

1) I start R, change directory to deskopt (no problem)

2) Type a few lines of code...

3) try to change directory again, CRASH!

I just don't get it, why?  If it is something like memory allocation, I can
understand, but it's a keyboard shortcut.  This has been happening for the
past year.  So, it is not a specific OS X update, or specific R update.

> sessionInfo()
R version 3.3.2 (2016-10-31)
Platform: x86_64-apple-darwin13.4.0 (64-bit)
Running under: macOS Sierra 10.12.1

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

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

Thanks!

[[alternative HTML version deleted]]

___
R-SIG-Mac mailing list
R-SIG-Mac@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-mac


Re: [R-SIG-Mac] CONFIRMED - R.app crashes at startup on MacOS Sierra

2016-12-08 Thread Brandon Hurr
Simon,

I have been experiencing this error for quite some time. If I load a r
script by double clicking it, it happens nearly 100% of the time. If I
load R itself first then it doesn't happen. If I clear the "recent"
files area it doesn't happen until I fill it again. The file opened
seems irrelevant, as does the location of the file (admittedly, all in
user space or external drives).

Despite the dire warning, if I hit escape I can continue working
nearly indefinitely without issue (my script save rate increases to
compensate for risk).

This was reported by CW on Nov 4th (perhaps others before), email
entitled: "[R-SIG-Mac] R segfault at startup, causing R crash". I
worked a little bit with Kevin Ushey offline to get to the bottom of
it further and I thought he pinned it down or at least got closer to
the cause.

"
After playing around with R.app for a bit, I was able to get myself
into a state where R.app was either dying or hanging on startup. I did
the following:

   1. Open R.app,
   2. Open a new R document (using the icon in the top menu bar --
'Create a new, empty document in the editor' ),
   3. Write and execute some code -- in my case, 'x <- 1; print(x)',
executed with Cmd + Enter,
   4. (optionally) Repeat steps 2 and 3, creating new documents and
executing more code,
   5. Focus a different application,
   6. Attempt to open an R document (using the menu bar again --
'Source script or load data in R',
   7. Observe that R.app is now hanging.

Note that if you run these repro steps, you may see R segfault / die
on startup (although in some cases all was fine). Note that step 5 is
necessary (IIUC) to force R.app to attempt to save the application
state.

It looks like R.app stores session state in the folder

~/Library/Saved Application State/org.R-project.R.savedState

My hypothesis at this point is that this saved state is somehow
getting corrupted. Removing that folder seems to resolve any startup
crashes I see.

As for the 'Open File' dialog hang, here's what I believe are the
relevant bits of an lldb stack trace I see:

 * frame #0: 0x7fffce2a7cba libsystem_kernel.dylib`__psynch_mutexwait + 10
frame #1: 0x7fffce390f6a
libsystem_pthread.dylib`_pthread_mutex_lock_wait + 100
frame #2: 0x7fffc573faee
FinderKit`+[FI_TFloatingInputWindowController singleton] + 34
frame #3: 0x7fffc57edd5b FinderKit`-[FI_TBrowserTableView
inputContext] + 29
frame #4: 0x7fffb6d397dc AppKit`+[NSTextInputContext
currentInputContext] + 145
frame #5: 0x7fffb6e7a272 AppKit`+[_NSAutomaticFocusRing
setActiveFirstResponderChanged] + 37
frame #6: 0x7fffb6e7a1d9
AppKit`___NSPostActiveFirstResponderChanged_block_invoke + 29
frame #7: 0x7fffb90cdec7
CoreFoundation`__CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__
+ 23
frame #8: 0x7fffb90cde37 CoreFoundation`__CFRunLoopDoObservers + 391
frame #9: 0x7fffb90aead9 CoreFoundation`__CFRunLoopRun + 873
frame #10: 0x7fffb90ae514 CoreFoundation`CFRunLoopRunSpecific + 420
frame #11: 0x7fffbaaabcb2 Foundation`-[NSRunLoop(NSRunLoop)
runMode:beforeDate:] + 277
frame #12: 0x00010b21f43e R`-[RDocumentWinCtrl
setStatusLineText:](self=0x6180001e7c00,
_cmd="setStatusLineText:", text=@"print(x, ...)") + 910 at
RDocumentWinCtrl.m:465
frame #13: 0x00010b21f03d R`-[RDocumentWinCtrl
RDocumentDidResize:](self=0x6180001e7c00,_cmd="RDocumentDidResize:",
notification=@"NSWindowDidResizeNotification") + 77 at
RDocumentWinCtrl.m:431

with context from frame 12:

frame #12: 0x00010b21f43e R`-[RDocumentWinCtrl
setStatusLineText:](self=0x6180001e7c00,
_cmd="setStatusLineText:", text=@"print(x, ...)") + 910 at
RDocumentWinCtrl.m:465
   462  [statusLine setStringValue:text];
   463  [statusLine setNeedsDisplay:YES];
   464  // Run NSDefaultRunLoopMode to allow to update status line
-> 465  [[NSRunLoop currentRunLoop] runMode:NSDefaultRunLoopMode
   466
beforeDate:[NSDate distantPast]];
   467
   468  }

Hopefully this helps...

Best,
Kevin
"

B

On Thu, Dec 8, 2016 at 6:28 AM, Simon Urbanek
 wrote:
> Karl,
>
> unfortunately I cannot reproduce it on 10.12.1. How exactly can you trigger 
> it? I have tried dragging a file on the R icon and open -a 
> /Applications/R.app test.R and neither crashed on me. Does it depend on the R 
> file opened or its location?
>
> Rainer,
> it seems that your build is broken - I have seen crashes on error in builds 
> that don't compile longjmp correctly so errors blow up the event loop - which 
> seems to be the case in your build. How did you build it?
>
> Cheers,
> Simon
>
>
>
>> On Dec 8, 2016, at 5:45 AM, Rainer M Krug  wrote:
>>
>> Karl Thomaseth  writes:
>>
>>> Hello all,
>>>
>>> I regret to bother you, but since I upgraded to MacOS Sierra more than a 
>>> month ago, I am experiencing
>>> that whenever I open any “file.R”, which 

Re: [R-SIG-Mac] Problems with lzma headers file compiling R 3.3.1 under mac os x 10.7.5

2016-12-08 Thread Mick Jordan

On 12/8/16 6:06 AM, Simon Urbanek wrote:

I strongly recommend using the supported library binaries from 
http://r.research.att.com/libs/ (see the R-admin manual C.3 section) since macports are 
notoriously problematic when mixing with "native" applications.
We had similar problems building GNU R on a variety of machines (outside 
our control, i.e. no root access) that were using Brew and/or Macports 
for installing third party libraries, (and similar problems on some 
Linux systems actually). The way we solve it is to add  the location 
where the package manager installs headers to CFLAGS/CPPFLAGS/CXXFLAGS 
and the library location to LDFLAGS. E,g for Macports:


PKG_INCLUDE_FLAGS_OVERRIDE=-I/opt/local/include
PKG_LDFLAGS_OVERRIDE=-L/opt/local/lib
./configure CFLAGS=$PKG_INCLUDE_FLAGS_OVERRIDE etc.

Mick

___
R-SIG-Mac mailing list
R-SIG-Mac@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-mac


Re: [R-SIG-Mac] Problem running TOBIT for R 3.2 at SPSS 24 Interface MAC Sierra 10.12.1

2016-12-08 Thread Peter Dalgaard
It really should be SPSS's responsibility to track these issues. They are 
sponging off our work, precariously close to overstepping the license 
conditions, creating new problems, then expecting us to come and fix them.

As for the concrete issue, you seem to be bitten by what was a major annoyance 
in the 3.2 series: pbkrtest requiring R >= 3.2.3 and hence all packages 
depending on it (like car) doing so as well. 

If SPSS hardcodes the R version, you are up the proverbial creek... You might 
get away with hacking the DESCRIPTION file for pbkrtest to make it install (not 
work, but you likely won't use it anyway) under 3.2.0. Of course, if it breaks 
you can keep both pieces.

I'd probably be more inclined to save out the data set, fire up an appropriate 
version of R (or RStudio), do

library(foreign)
d <- read.spss("myfile.sav", to.data.frame=TRUE)
library(AER)


and so forth.

You may need to study the R syntax a little. Achim and Christian wrote an 
inexpensive book called "Applied Econometrics with R"

-pd

> On 8 Dec 2016, at 10:34 , Andreas Schröder  
> wrote:
> 
> Dear R-SIG-Mac members, 
> 
> This is my first post and I would like to thank you first of all for helping 
> out fellow users of R!
> 
> I am currently doing my master thesis and struggle with making the TOBIT 
> regression run on my SPSS 24, operated with Mac (OS Sierra 10.12.1). 
> 
> I use SPSS 24 and have the installer plugin-in for R successfully  installed. 
> I installed the correct R version 3.2 and also XQuartz but if I try to 
> execute the TOBIT regression (I can choose it in my SPSS menu now) I get 
> constantly dialogues showing that certain packages would be missing (CAR, AED 
> etc.). (Pic 1). Apparently, those packages have been added later to R (higher 
> r version than the one mandated by my spss 24 version). I downloaded the 
> versions R 3.2.5 that is referred to in the first picture but once I try 
> installing it, I get displayed another error message by SPSS that the version 
> of R was incorrect. Also manually installing the AER package on R 3.2. did 
> not work for me because I do not know where to find and executable file 
> within the AER package. (Pic 3)
> 
> 
> I already spent yesterday and partly the day before to find my mistake but I 
> couldn’t resolve the issue.
> I am glad to receive any kind of input!
> 
> Best, 
> 
> Andreas
> 
> 
> ___
> R-SIG-Mac mailing list
> R-SIG-Mac@r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-mac

___
R-SIG-Mac mailing list
R-SIG-Mac@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-mac

Re: [R-SIG-Mac] Problems with lzma headers file compiling R 3.3.1 under mac os x 10.7.5

2016-12-08 Thread Simon Urbanek
I strongly recommend using the supported library binaries from 
http://r.research.att.com/libs/ (see the R-admin manual C.3 section) since 
macports are notoriously problematic when mixing with "native" applications.

Cheers,
Simon


> On Nov 17, 2016, at 7:40 AM, saransh sawhney  
> wrote:
> 
> Hey Vittorio how did you solve lama library issue?
> 
> On Sunday, August 28, 2016 at 10:17:11 PM UTC+5:30, Vittorio De Martino wrote:
> I'm trying for the first time to compile R 3.3.1 on my old macbook with 
> 10.7.5. 
> Among other things I have already successfully installed the xz port (which 
> includes lzma) from the macports collection (xz-devel is now included in xz). 
> When as root user I launch  './configure'  the configure process stops with 
> the following error: 
> 
> $ ./configure 
> ... 
> ... 
> checking if bzip2 version >= 1.0.6... yes 
> checking whether bzip2 support suffices... no 
> checking for lzma_version_number in -llzma... no 
> configure: error: "liblzma library and headers are required" 
> 
> I'm getting stuck here. Please help 
> Ciao 
> Vittorio 
> 
> ___ 
> R-SIG-Mac mailing list 
> r-si...@r-project.org 
> https://stat.ethz.ch/mailman/listinfo/r-sig-mac 
> ___
> R-SIG-Mac mailing list
> R-SIG-Mac@r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-mac

___
R-SIG-Mac mailing list
R-SIG-Mac@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-mac


[R-SIG-Mac] FYI: "trying to draw a very large combo box" app warning

2016-12-08 Thread Tim Bates
Just got this warning from mac os

2016-12-08 13:43:40.610 R[36622:21934550] This application is trying to draw a 
very large combo box, 43 points tall.  Vertically resizable combo boxes are not 
supported, but it happens that 10.4 and previous drew something that looked 
kind of sort of okay.  The art in 10.5 does not break up in a way that supports 
that drawing.  This application should be revised to stop using large combo 
boxes.  This warning will appear once per app launch.


R version: R version 3.3.2 (2016-10-31)
Platform: x86_64-apple-darwin13.4.0 
MacOS: 10.12.1

___
R-SIG-Mac mailing list
R-SIG-Mac@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-mac


Re: [R-SIG-Mac] Problems with lzma headers file compiling R 3.3.1 under mac os x 10.7.5

2016-12-08 Thread saransh sawhney
Hey Vittorio how did you solve lama library issue?

On Sunday, August 28, 2016 at 10:17:11 PM UTC+5:30, Vittorio De Martino 
wrote:
>
> I'm trying for the first time to compile R 3.3.1 on my old macbook with 
> 10.7.5. 
> Among other things I have already successfully installed the xz port 
> (which includes lzma) from the macports collection (xz-devel is now 
> included in xz). 
> When as root user I launch  './configure'  the configure process stops 
> with the following error: 
>
> $ ./configure 
> ... 
> ... 
> checking if bzip2 version >= 1.0.6... yes 
> checking whether bzip2 support suffices... no 
> checking for lzma_version_number in -llzma... no 
> configure: error: "liblzma library and headers are required" 
>
> I'm getting stuck here. Please help 
> Ciao 
> Vittorio 
>
> ___ 
> R-SIG-Mac mailing list 
> r-si...@r-project.org  
> https://stat.ethz.ch/mailman/listinfo/r-sig-mac 
>
___
R-SIG-Mac mailing list
R-SIG-Mac@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-mac

[R-SIG-Mac] Problem running TOBIT for R 3.2 at SPSS 24 Interface MAC Sierra 10.12.1

2016-12-08 Thread Andreas Schröder
Dear R-SIG-Mac members, 

This is my first post and I would like to thank you first of all for helping 
out fellow users of R!

I am currently doing my master thesis and struggle with making the TOBIT 
regression run on my SPSS 24, operated with Mac (OS Sierra 10.12.1). 

I use SPSS 24 and have the installer plugin-in for R successfully  installed. I 
installed the correct R version 3.2 and also XQuartz but if I try to execute 
the TOBIT regression (I can choose it in my SPSS menu now) I get constantly 
dialogues showing that certain packages would be missing (CAR, AED etc.). (Pic 
1). Apparently, those packages have been added later to R (higher r version 
than the one mandated by my spss 24 version). I downloaded the versions R 3.2.5 
that is referred to in the first picture but once I try installing it, I get 
displayed another error message by SPSS that the version of R was incorrect. 
Also manually installing the AER package on R 3.2. did not work for me because 
I do not know where to find and executable file within the AER package. (Pic 3)


I already spent yesterday and partly the day before to find my mistake but I 
couldn’t resolve the issue.
I am glad to receive any kind of input!

Best, 

Andreas

___
R-SIG-Mac mailing list
R-SIG-Mac@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-mac