When, exactly, is the get_permalink() call *executed*? If you're actually executing it too early, then all the functions may not have loaded yet.
Remember that plugins execute very early in the process. Generally, you don't actually execute any code in plugins, you just define functions that get executed at various other points during the page creation process, using hooks or direct calls from the theme.
In particular, get_permalink() makes a reference to get_userdata(), which is in pluggable-functions.php. Pluggable functions doesn't load until *after* plugins load, so at the very minimum, you'd need to delay that call until the 'plugins_loaded' action hook.
The other problem is that you're trying to call get_permalink for the current page. This relies on the database having been initialized and the relevant posts loaded, which means that you should probably wait at least until the 'init' action hook before attempting to use get_permalink in any significant way.
So wrap the code you want to run into a function, then add_action('init','your_function'); It'll run a bit later and might eliminate your issues. If you still have trouble with it, follow it through and find a later action hook that suits your needs. Ideally, you want to delay execution of any code as long as possible, until the moment you need the output from that code. But sometimes it's helpful to generate it in advance and use it later. Not often though.