-
Notifications
You must be signed in to change notification settings - Fork 32
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
Current version of Libsass-net throw a nullreference exception while runtime compiling on Azure web server #60
Comments
Where are you using this at (http handler, etc). The first thing that stands out is the static variable You need to cache this output somewhere tho and synchronize locking though, if you haven't already done that. Prob don't want to compile the css on each request |
The function is used in an api controller. So your suggestion is to just get rid of the static variable? this didn't solve the problem, unfortunately. yes, this is already handled, the css should be compiled just once then stored, I didn't report the full code for convenience. |
hello, I've changed the code passing the importer directly into the importes array as you suggested and getting rid of the static variable, unfortunately, this seems not to solve the problem. After deployment, the recompiling works fine but after some time of asking the recompiling of the files, I start to get the null-reference exceptions. Do you have more hints on why this might happen? the code now looks like this:
|
Hello, in the web application with which I'm working we are using Libsass-net for compiling some .scss on runtime, substituting some colour variables in the process.
The weird thing is that locally everything seems to work fine (even if sometimes the error occurs), while when publishing on an azure web server, the compiling works just one or two times fine, after that the sassCompiler.Compile() starts to throw nullreferenceexceptions.
the error trace is the sequent:
System.NullReferenceException: at LibSass.Compiler.SassExterns64.sass_compile_file_context (LibSass.NET, Version=4.0.0.0, Culture=neutral, PublicKeyToken=null) at LibSass.Compiler.Context.SassSafeFileContextHandle.CompileInternalContext (LibSass.NET, Version=4.0.0.0, Culture=neutral, PublicKeyToken=null) at LibSass.Compiler.Context.SassSafeContextHandle.CompileContext (LibSass.NET, Version=4.0.0.0, Culture=neutral, PublicKeyToken=null)
while the code and the sobstitution that im using is the sequent:
Is there anyone that had the same problem? any solution out there?
thanks in advance! cheers.
The text was updated successfully, but these errors were encountered: