mIRC Homepage
Posted By: Darwick Visual C++ Runtime Error R6034 - 07/07/19 11:27 AM
After updating mirc to the latest (7.56) I get the following error when I star mirc:

Code
Mircosoft Visual C++ Runtime Library 

Runtime Error!

Program: C:\Program Files (x86)\mIRC\mirc.exe

R6034
An application has made an attempt to load the C runtime library incorrectly.
Please contact the application's support team for more information.


After I click OK, mirc will start and works correctly, but this error seems annoying in every start of mirc.
I have Microsoft Visual C++ 2012, 2013, 2017 Redist installs (because of the games)
Posted By: Fischkopp Re: Visual C++ Runtime Error R6034 - 07/07/19 12:00 PM
Hi! Same issue here...

Just after updating to the latest 7.56, mIRC starts with a C++ error - see screenshot. It works afterwards, but on every start, the error keeps popping up.
OS: Win10 x64

[Linked Image from i.ibb.co]
Posted By: Khaled Re: Visual C++ Runtime Error R6034 - 07/07/19 02:37 PM
Thanks for your bug report.

This appears to be quite a common Windows error.

I have not been able to reproduce it yet and the best explanation I have found on stackexchange is somewhat convoluted.

The problem seems to be due to multiple, conflicting versions of the C runtime msvcr*.dll files installed in the wrong folders by different applications and added to the Windows PATH environment variable.

That said, I cannot see why v7.55 would not show the same issue. The only major change in this version was updating to OpenSSL to v1.1.1b, which required some changes to make it work under XP. I am going to create a beta with OpenSSL that compiles without support for Windows XP and will upload it later today to see if that resolves your issue.
Posted By: Raccoon Re: Visual C++ Runtime Error R6034 - 07/07/19 02:58 PM
Which compiler suite are you using again? I can't identify a difference either.
Posted By: Wims Re: Visual C++ Runtime Error R6034 - 07/07/19 03:20 PM
I cannot reproduce the problem here, 7.56 running fine so far on win7 64bits and I have both x86 and x64 install of the 2010 version as well as a x64 install of 2015

Your stackexchange link is actually about an issue with a specific program, rather than a general issue with runtime but someone actually has an answer that is extremely well documented about the general issue.
Basically a program made to install a 32 bit dll into an hardcoded path, thinking it's a 32 bits folder, when it's 64bits, overwritting the 64 bits dll, it is said that even if you can run the executable, it may crash later on.

If both users are on 64bits system, I recommend reinstalling the microsoft runtime c++ package 64 bits, hoping it re-overwrite the dll.
Posted By: Khaled Re: Visual C++ Runtime Error R6034 - 07/07/19 03:42 PM
Quote
If both users are on 64bits system, I recommend reinstalling the microsoft runtime c++ package 64 bits, hoping it re-overwrite the dll.

I would prefer if this was not done. I would like to find out why this issue is happening with v7.56 and not with v7.55.
Posted By: Wims Re: Visual C++ Runtime Error R6034 - 07/07/19 03:47 PM
Fair point, I would too.

Note however that if the above is right, they would also get it on 7.55 unless it's not loading that dll, which is unlikely.
But It's not so clear to me that they can't reproduce on 7.55.
Posted By: Khaled Re: Visual C++ Runtime Error R6034 - 07/07/19 04:59 PM
I have just released a new beta.

If you download this beta and test it out, do you see the same issue?
Posted By: Darwick Re: Visual C++ Runtime Error R6034 - 07/07/19 05:19 PM
Okey, I give more background about my install. I have Windows 10 64bit and before I posted th bug I made a try to reinstall all (32 and 64 bit) redistributables. First I did a try to repair them, then I reinstalled them, but nothing changed. Based on error code, I searched over the internet for solution, so I already made: sfc /scannow but it didn't helped.
I will try the new beta tomorrow, because I'm out of home right now. smile
Posted By: Fischkopp Re: Visual C++ Runtime Error R6034 - 07/07/19 06:51 PM
I'll test the beta later on. As a note I've tested 7.56 on another Win10/x64 - there it works. So it might have to do with SSL libs or compiling an installed libs on the device, yes... I'll let you know as soon as I've tested the beta.
Posted By: Raccoon Re: Visual C++ Runtime Error R6034 - 07/07/19 07:00 PM
Just FYI, the 64bit runtimes don't affect 32bit software, at all. I'm thinking that since both of these are Win10 64, there may be a change with the current compile that would make them need the 2015 x86 runtime dist for some oddball reason.
Posted By: Fischkopp Re: Visual C++ Runtime Error R6034 - 07/07/19 07:13 PM
Khaled: No, the beta does not fix it. Is there any debugging flag that I can enable to help you on this?
Posted By: Khaled Re: Visual C++ Runtime Error R6034 - 07/07/19 08:39 PM
Quote
No, the beta does not fix it. Is there any debugging flag that I can enable to help you on this?

Thanks for testing it out.

Until I know what the cause is, there isn't really anything you can do on your side.

I am going to create several betas, at different stages of development from 7.55 onwards, to see if we can narrow down at which point it starts to produce this error. I will let you know when I upload the betas.

Question: on the off chance that this may be related, are you using anti-virus software? Anti-virus software can occasionally treat new versions of mIRC differently until the anti-virus developer updates their detection files. If you disable your anti-virus software completely and test mIRC, does it show the same error?
Posted By: Khaled Re: Visual C++ Runtime Error R6034 - 09/07/19 09:18 AM
Thanks to the posters reporting this issue.

We managed to track down the issue to mIRC checking if there is an external OpenSSL library and loading it to see if it is a newer version than the internal OpenSSL library. In the past, this has never been an issue, however it appears that, in this case, the external OpenSSL DLLs found in the system PATH are compiled in a way that is causing an MSVCRT conflict. If the user sets mirc.ini [ssl] load=2, this prevents mIRC from checking for newer external OpenSSL libraries and resolves the issue.

The next version of mIRC will be changed so that, by default, it will not check for newer external OpenSSL libraries.
Posted By: BenderUnit Re: Visual C++ Runtime Error R6034 - 26/09/19 02:39 AM
Originally Posted by Khaled
If the user sets mirc.ini [ssl] load=2, this prevents mIRC from checking for newer external OpenSSL libraries and resolves the issue.

The next version of mIRC will be changed so that, by default, it will not check for newer external OpenSSL libraries.

Could you please tell us what exactly does load=0 and load=1 do? I tested this and both values seem to load the external OpenSSL libraries, but I'm unsure which one to use, 0 or 1, to be able to keep using external OpenSSL libraries.
Posted By: KindOne Re: Visual C++ Runtime Error R6034 - 26/09/19 03:43 AM
Quote

04/08/2014 - mIRC v7.35
...
11.Updated SSL routines to allow both static and dynamic linking of
OpenSLL with mIRC. mIRC now comes with OpenSSL 1.0.1h linked
statically, so SSL is available without needing external DLLS.
However, if mIRC finds a newer version of OpenSSL on your system,
it will load that automatically.
12.Added SSL option that allows you to control whether the internal
or external version of OpenSSL is loaded, by adding "load=N" to the
[ssl] section in mirc.ini, where N = 0 means "use internal, external
if newer", N = 1 means "use external always", and N = 2 means "use
internal always". The default is 0. If no external is available, or
there is an error loading external, internal is used.

Posted By: BenderUnit Re: Visual C++ Runtime Error R6034 - 26/09/19 01:07 PM
Oh. I looked in versions.txt, but apparently I didn't look well enough. blush

Thank you.
© mIRC Discussion Forums