Skip to content
This repository was archived by the owner on Jan 10, 2021. It is now read-only.
This repository was archived by the owner on Jan 10, 2021. It is now read-only.

Access violation when creating session #48

@eloekset

Description

@eloekset

Every call to Spotify.CreateSession throws an exception and the application crashes with the output 'Access violation'. I've found two closed issues that are similar to this one, but the difference here is that it happens every time I start the WpfTest, WinFormsTest or TestClient projects.

I've tried to turn on "Use Managed Compability Mode" to debug it, but I'm not able to see anything when debugging. I'm just thrown out of the application after the C++ Task::Factory->StartNew(...) has returned.

The output of the console app is:

Enter username and password (a line for each)

Unhandled Exception: System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
   at sp_session_create(sp_session_config* , sp_session** )
   at SpotiFire.Session..ctor(Byte[] applicationKey, String cacheLocation, String settingsLocation, String userAgent) in d:\github\spotifire\spotifire.libspotify\session.cpp:line 230
   at $session$create.run() in d:\github\spotifire\spotifire.libspotify\session.cpp:line 275
   at System.Threading.Tasks.Task`1.InnerInvoke()
   at System.Threading.Tasks.Task.Execute()
   at System.Threading.Tasks.Task.ExecutionContextCallback(Object obj)
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot)
   at System.Threading.Tasks.Task.ExecuteEntry(Boolean bPreventDoubleExecution)
   at System.Threading.Tasks.Task.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()
   at System.Threading.ThreadPoolWorkQueue.Dispatch()
   at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback()

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions