DllNotFoundException: Unable to load DLL 'librvnpal' when starting RavenDB 4.2 on windows 7 x64. How to correct this? - ravendb

VC redistributable package is installed.
Here is the detail of the exception:
Unhandled Exception: System.TypeInitializationException: The type initializer for 'Sparrow.Server.Platform.Pal' threw an exception. ---> Sparrow.Server.Platform.IncorrectDllException: librvnpal version might be invalid or not usable on current platform. Initialization error could also be caused by missing 'Microsoft Visual C++ 2015 Redistributable Package' (or newer). It can be downloaded from https://support.microsoft.com/en-us/help/2977003/the-latest-supported-visual-c-downloads ---> System.DllNotFoundException: Unable to load DLL 'librvnpal' or one of its dependencies: The specified procedure could not be found. (Exception from HRESULT: 0x8007007F)
at Sparrow.Server.Platform.Pal.rvn_get_pal_ver()
at Sparrow.Server.Platform.Pal..cctor() in C:\Builds\RavenDB-Stable-4.2\42009\src\Sparrow.Server\Platform\Pal.cs:line 66
--- End of inner exception stack trace ---
at Sparrow.Server.Platform.Pal..cctor() in C:\Builds\RavenDB-Stable-4.2\42009\src\Sparrow.Server\Platform\Pal.cs:line 83
--- End of inner exception stack trace ---
at Sparrow.Server.Platform.Pal.rvn_get_current_thread_id()
at Sparrow.Utils.NativeMemory.ThreadStats..ctor() in C:\Builds\RavenDB-Stable-4.2\42009\src\Sparrow\Utils\NativeMemory.cs:line 77
at Sparrow.Utils.NativeMemory.<>c.<.cctor>b__25_1() in C:\Builds\RavenDB-Stable-4.2\42009\src\Sparrow\Utils\NativeMemory.cs:line 18
at System.Threading.ThreadLocal`1.GetValueSlow()
at Sparrow.Utils.NativeMemory.AllocateMemory(Int64 size, ThreadStats& thread) in C:\Builds\RavenDB-Stable-4.2\42009\src\Sparrow\Utils\NativeMemory.cs:line 114
at Sparrow.Json.ArenaMemoryAllocator..ctor(SharedMultipleUseFlag lowMemoryFlag, Int32 initialSize) in C:\Builds\RavenDB-Stable-4.2\42009\src\Sparrow\Json\ArenaMemoryAllocator.cs:line 69
at Sparrow.Json.JsonOperationContext..ctor(Int32 initialSize, Int32 longLivedSize, SharedMultipleUseFlag lowMemoryFlag) in C:\Builds\RavenDB-Stable-4.2\42009\src\Sparrow\Json\JsonOperationContext.cs:line 366
at Sparrow.Json.JsonOperationContext.ShortTermSingleUse() in C:\Builds\RavenDB-Stable-4.2\42009\src\Sparrow\Json\JsonOperationContext.cs:line 306
at Raven.Server.Utils.Cli.RuntimeSettings.TryGetRetainVMSettingValue() in C:\Builds\RavenDB-Stable-4.2\42009\src\Raven.Server\Utils\Cli\RuntimeSettings.cs:line 21
at Raven.Server.Utils.Cli.RuntimeSettings.Describe() in C:\Builds\RavenDB-Stable-4.2\42009\src\Raven.Server\Utils\Cli\RuntimeSettings.cs:line 69
at Raven.Server.Utils.Cli.RavenCli.GetInfoText() in C:\Builds\RavenDB-Stable-4.2\42009\src\Raven.Server\Utils\Cli\RavenCli.cs:line 551
at Raven.Server.Program.Main(String[] args) in C:\Builds\RavenDB-Stable-4.2\42009\src\Raven.Server\Program.cs:line 93

Two issues where found regarding the above error, and are fixed here : https://github.com/ravendb/ravendb/pull/9365
They will be available in the upcoming 4.2.1 release (or later this week in a nightly build after PR is merged).

Related

Having a Redis Timeout/Replica issue

We are currently having a few issues with our program with Redis that happen and occur randomly. We do not understand what is going on.
The code is open source as well if anyone wants to tag in and help on these two repos:
https://github.com/pythonology/BeatTogether.Core
https://github.com/pythonology/BeatTogether.MasterServer/tree/feature/dedicated-servers (using the branch at the moment for dev purposes)
2020-12-10 03:22:17.829 +00:00 [ERR] An error occurred while handling message (MessageType='BroadcastServerStatusRequest').
StackExchange.Redis.RedisServerException: ERR Error running script (call to f_dce2ce9e149bc775618a47cd07eca24d80a33664): #user_script:4: #user_script: 4: -READONLY You can't write against a read only replica.
at BeatTogether.MasterServer.Data.Implementations.Repositories.ServerRepository.AddServer(Server server) in /app/BeatTogether.MasterServer.Data/Implementations/Repositories/ServerRepository.cs:line 80
at BeatTogether.MasterServer.Kernel.Implementations.UserService.BroadcastServerStatus(MasterServerSession session, BroadcastServerStatusRequest request) in /app/BeatTogether.MasterServer.Kernel/Implementations/UserService.cs:line 156
at BeatTogether.Core.Messaging.Implementations.BaseMessageHandler.<>c__DisplayClass6_0`2.<<Register>b__0>d.MoveNext()
--- End of stack trace from previous location --
and
2020-12-10 06:20:23.198 +00:00 [ERR] An error occurred while handling message (MessageType='BroadcastServerStatusRequest').
StackExchange.Redis.RedisConnectionException: No connection is active/available to service this operation: EVAL, mc: 1/1/0, mgr: 10 of 10 available, clientName: master-server, IOCP: (Busy=0,Free=1000,Min=1,Max=1000), WORKER: (Busy=3,Free=32764,Min=1024,Max=32767), v: 2.2.4.27433 at StackExchange.Redis.ConnectionMultiplexer.ThrowFailed[T](TaskCompletionSource`1 source, Exception unthrownException) in /_/src/StackExchange.Redis/ConnectionMultiplexer.cs:line 2760
--- End of stack trace from previous location ---
at BeatTogether.MasterServer.Data.Implementations.Repositories.ServerRepository.AddServer(Server server) in /app/BeatTogether.MasterServer.Data/Implementations/Repositories/ServerRepository.cs:line 80
at BeatTogether.MasterServer.Kernel.Implementations.UserService.BroadcastServerStatus(MasterServerSession session, BroadcastServerStatusRequest request) in /app/BeatTogether.MasterServer.Kernel/Implementations/UserService.cs:line 156
at BeatTogether.Core.Messaging.Implementations.BaseMessageHandler.<>c__DisplayClass6_0`2.<<Register>b__0>d.MoveNext()
--- End of stack trace from previous location ---
at BeatTogether.Core.Messaging.Implementations.BaseMessageSource.<>c__DisplayClass15_0.<<Signal>b__0>d.MoveNext()
Our redis instance doesn't have slaves, only a master and its one instance on the same machine.
Any help is greatly appreciated. Thanks.

Difference in Exception handling py code in Odoo 11

What are differences in exception from the coding point of view in Odoo 11 as compared in Odoo 10? Can't find other differences except
except Exception, e: to except Exception as e:
My code shows error somehow from exception while converting a module from Odoo 10 to Odoo 11.
In Python 2.5 and earlier versions, 'as' isn't supported, so you use except Exception, e:
In Python 2.6+ versions, both can be used.
But from Python 3.x, except Exception as e is required to assign an exception to a variable.

How to get stack trace from System.AccessViolationException?

I have a crash dump (minidump) for an applicaiton which includes managed and unmanaged code. The application crashed with exception System.Reflection.TargetInvocationException during execution of Delegate.DynamicInvoke. The inner exception is System.AccessViolationException but it doesn't include stack trace information (see below).
Is it possible to get this stack trace somehow?
Windbg output for !analyze -v (I've shortened the stack trace to make it more clear):
EXCEPTION_OBJECT: !pe 6c09b28
Exception object: 0000000006c09b28
Exception type: System.Reflection.TargetInvocationException
Message: Exception has been thrown by the target of an invocation.
InnerException: System.AccessViolationException, Use !PrintException 0000000006c09988 to see more.
StackTrace (generated):
SP IP Function
00000000004FB540 0000000000000000 mscorlib_ni!System.RuntimeMethodHandle.InvokeMethod(System.Object, System.Object[], System.Signature, Boolean)+0x1
00000000004FB540 000007FEF761D28C mscorlib_ni!System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(System.Object, System.Object[], System.Object[])+0x4c
00000000004FB5B0 000007FEF754FD3A mscorlib_ni!System.Delegate.DynamicInvokeImpl(System.Object[])+0x6a
00000000004FB610 000007FE99A15010 CCTV_Framework_Utility!CCTV.Framework.Utility.EventsHelper.SafeInvoke(System.Delegate, System.Object[])+0x60
StackTraceString:
HResult: 80131604
EXCEPTION_OBJECT: !pe 6c09988
Exception object: 0000000006c09988
Exception type: System.AccessViolationException
Message: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
InnerException: none
StackTrace (generated): none
StackTraceString: none
HResult: 80004003

Unhandled Exception using DotNetZip

I've been using DotNetZip for a month or so now and i like how it has worked but today my program started having a new issue that I'm clueless on.
During the zipping process it throws this error up and windows displays their "program name has stopped working" box.
Unhandled Exception: System.IO.FileNotFoundException: s:\(file path)\filename.pdf
at Ionic.Zip.SharedUtilities.GetFileLength(string fileName)
at ionic.Zip.ZipEntry.MaybeUnsetCompressionMethodForWriting(int32 cycle)
at Ionic.zip.Zipentry.WriteHeader(Stream s, Int32 cycle)
at Ionic.zip.ZipEntry.Write(Stream s)
at Ionic.zip.zipfile.save()
at ZipAJob_Instant.ConsoleMain.Main() in C:\users\(my name)\Documents\visual studio 2012\projects\zipAjob_Instant\zipAJob_Win32.vb:line 71
Line 71 refers to where i call zip.save()
From your comments, I take that what happened is exactly what happened to me a while ago.
I was getting a list of files to zip and stored into memory. The I would go zipping them one by one until this exception was thrown. The cause was someone removed the file after I got the list, but before I got the opportunity to zip it. This occured on a shared folder, btw.

Regions/Locales and Pulling DateTimes( From Strings) from a Database

I've been having several problems lately with clients that are using a different Windows Region setting than I am. I cannot seem to find a way to fix it. The error is as follows:
The type initializer for 'InventoryDataTable' threw an exception. ---> System.TypeInitializationException: The type initializer for 'InventoryDataTable' threw an exception. ---> System.FormatException: String was not recognized as a valid DateTime.
The error occurs when users load the application and their region settings do not match my own. The application loads up a dataset and attempts to receive a small amount of data before allowing the user to log in. When this is removed, the problem occurs immediately after the user logs in to the app.
I cannot seem to find the proper settings to force the user to use either my Region, or to allow the application to figure it out on it's own...
Exact error:
System.InvalidOperationException: An error occurred creating the form. See Exception.InnerException for details. The error is: The type initializer for 'InventoryDataTable' threw an exception. ---> System.TypeInitializationException: The type initializer for 'InventoryDataTable' threw an exception. ---> System.FormatException: String was not recognized as a valid DateTime.
at System.DateTimeParse.Parse(String s, DateTimeFormatInfo dtfi, DateTimeStyles styles)
at System.DateTime.Parse(String s)
at Invasion_3042_v2.INVDataSet.InventoryDataTable..cctor() in C:\Users\Tdata\Desktop\I2.original\Invasion 3042 v2\INVDataSet.Designer.vb:line 7588
--- End of inner exception stack trace ---
at Invasion_3042_v2.INVDataSet.InventoryDataTable..ctor()
at Invasion_3042_v2.INVDataSet.InitClass() in C:\Users\Tdata\Desktop\I2.original\Invasion 3042 v2\INVDataSet.Designer.vb:line 4296
at Invasion_3042_v2.INVDataSet..ctor() in C:\Users\Tdata\Desktop\I2.original\Invasion 3042 v2\INVDataSet.Designer.vb:line 447
at Invasion_3042_v2.INV3042LOGIN.InitializeComponent() in C:\Users\Tdata\Desktop\I2.original\Invasion 3042 v2\INV3042LOGIN.Designer.vb:line 39
at Invasion_3042_v2.INV3042LOGIN..ctor() in C:\Users\Tdata\Desktop\I2.original\Invasion 3042 v2\INV3042LOGIN.vb:line 100
--- End of inner exception stack trace ---
at Invasion_3042_v2.My.MyProject.MyForms.Create__Instance__[T](T Instance) in 17d14f5c-a337-4978-8281-53493378c1071.vb:line 190
at Invasion_3042_v2.My.MyProject.MyForms.get_INV3042LOGIN()
at Invasion_3042_v2.My.MyApplication.OnCreateMainForm() in C:\Users\Tdata\Desktop\I2.original\Invasion 3042 v2\My Project\Application.Designer.vb:line 35
at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun()
at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.DoApplicationModel()
Posting the actual code causing the issue would have helped, but I can put forth a pretty good guess at what's going on.
Could it be that the date format being stored into your centralized database is always of a given format (maybe US?). If so, what is very likely happening is the following:
A date like 1/14/2012 is returned from a query to your database. The code running on your problem clients are parsing the date using perhaps European date regional settings. (In the EU and most other countries in the world 14-Jan-2012 is expressed as 14/01/2012 aka dd/MM/yyyy, not MM/dd/yyyy.
Try either specifying that you want to always use a known, base regional setting in your config file like this:
<globalization requestEncoding="utf-8" responseEncoding="utf-8" culture="en-US" />
...or parse your dates using a specified culture setting like this to avoid defaulting to the local system setting that does not match your server-side expectations.
DateTime.Parse("1/14/2012", new CultureInfo("en-US")); // or whatever culture your server database expects...