Skip to content

Implemented Hunspell suggest feature - #5

Merged
jjallaire merged 2 commits into
rstudio:masterfrom
jeffreyhorner:master
Feb 1, 2012
Merged

jjallaire merged 2 commits into
rstudio:masterfrom
jeffreyhorner:master

Conversation

@jeffreyhorner

Copy link
Copy Markdown
Contributor

First foray into C++ in quite some years, so I'm sure I'll make some rookie mistakes. SpellChecker::suggestionList returns an int defining the number of suggestions but this is obviously built into the string vector argument pSug which it populates. Also was unsure of the camel hump name suggestionList.

Jeff

@jcheng5

jcheng5 commented Feb 1, 2012

Copy link
Copy Markdown
Member

Looks like a clean commit to me. (Hi, Jeff!)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We also need checkSpellingMethodDef.numArgs = 1 here.

@jeffreyhorner

Copy link
Copy Markdown
Contributor Author

Didn't know if you got a notification earlier when I added a new commit. Adding this comment to push along...

@jjallaire

Copy link
Copy Markdown
Member

No I didn't get a notification, thanks for pinging me. I'll pull right now!

J

On Wed, Feb 1, 2012 at 3:43 PM, jeffreyhorner <
[email protected]

wrote:

Didn't know if you got a notification earlier when I added a new commit.
Adding this comment to push along...


Reply to this email directly or view it on GitHub:
#5 (comment)

jjallaire added a commit that referenced this pull request Feb 1, 2012
Implemented Hunspell suggest feature
@jjallaire
jjallaire merged commit a94359f into rstudio:master Feb 1, 2012
@alaimos alaimos mentioned this pull request Apr 24, 2020
4 tasks done
gtritchie added a commit that referenced this pull request Aug 6, 2020
On Centos7 (Desktop), unit tests were failing because global static initialization was causing access to an uninitialized string.

Fix by wrapping the static strings in functions.

The trigger is here: https://github.com/rstudio/rstudio/blob/e6fd9fd85f9088c13e8b2c5b78176111b4f2b485/src/cpp/core/LogOptions.cpp#L61

The crash stack was:
```
#0  0x000055ed09fbbdbe in std::string::size (this=0x55ed0b7d5188 <rstudio::core::(anonymous namespace)::s_homePathLeafAlias>)
    at /opt/rh/devtoolset-7/root/usr/include/c++/7/bits/basic_string.h:3817
#1  0x000055ed09fdc60c in std::operator==<char> (__lhs="~/.local/share", __rhs=<error reading variable: Cannot access memory at address 0xffffffffffffffe8>)
    at /opt/rh/devtoolset-7/root/usr/include/c++/7/bits/basic_string.h:6007
#2  0x000055ed0a97ce4c in rstudio::core::FilePath::resolveAliasedPath (in_aliasedPath="~/.local/share", in_userHomePath=...) at /src/src/cpp/shared_core/FilePath.cpp:476
#3  0x000055ed0a832e7f in rstudio::core::system::xdg::(anonymous namespace)::resolveXdgDir (envVar="XDG_DATA_HOME", defaultDir="~/.local/share", user=..., homeDir=...)
    at /src/src/cpp/core/system/Xdg.cpp:97
#4  0x000055ed0a833213 in rstudio::core::system::xdg::userDataDir (user=..., homeDir=...) at /src/src/cpp/core/system/Xdg.cpp:135
#5  0x000055ed0a8972ea in __static_initialization_and_destruction_0 (__initialize_p=1, __priority=65535) at /src/src/cpp/core/LogOptions.cpp:61
#6  0x000055ed0a89740c in _GLOBAL__sub_I_LogOptions.cpp(void) () at /src/src/cpp/core/LogOptions.cpp:347
#7  0x000055ed0aa9580d in __libc_csu_init ()
#8  0x00007f948396c4e5 in __libc_start_main () from /lib64/libc.so.6
#9  0x000055ed09fb44f5 in _start ()
```
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

Successfully merging this pull request may close these issues.

3 participants