studio 4.0.1 doesnt load after installation

Bug reports.
rnevo
Posts: 5
Joined: Wed Dec 26, 2012 2:15 pm

studio 4.0.1 doesnt load after installation

Post by rnevo » Wed Dec 26, 2012 2:18 pm

hi all,

after installation, when i try to load the studio for the first time i get an unhandeled exception -

Ranorex Studio Version : 4.0.1.21107
.NET Version : 4.0.30319.17929
OS Version : Microsoft Windows NT 6.1.7601 Service Pack 1
Current culture : Hebrew (Israel) (he-IL)
Running under WOW6432, processor architecture: AMD64
Working Set Memory : 21832kb
GC Heap Memory : 636kb

Unhandled exception terminated RanorexStudio
Exception thrown:
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.TypeInitializationException: The type initializer for 'Ranorex.Core.ElementEngine' threw an exception. ---> System.Configuration.ConfigurationErrorsException: Configuration system failed to initialize ---> System.Configuration.ConfigurationErrorsException: Section or group name 'log4net' is already defined. Updates to this may only occur at the configuration level where it is defined. (C:\Program Files (x86)\Ranorex 4.0\RanorexStudio\bin\RanorexStudio.exe.Config line 3)
at System.Configuration.ConfigurationSchemaErrors.ThrowIfErrors(Boolean ignoreLocal)
at System.Configuration.BaseConfigurationRecord.ThrowIfParseErrors(ConfigurationSchemaErrors schemaErrors)
at System.Configuration.BaseConfigurationRecord.ThrowIfInitErrors()
at System.Configuration.ClientConfigurationSystem.EnsureInit(String configKey)
--- End of inner exception stack trace ---
at System.Configuration.ClientConfigurationSystem.EnsureInit(String configKey)
at System.Configuration.ClientConfigurationSystem.PrepareClientConfigSystem(String sectionName)
at System.Configuration.ClientConfigurationSystem.System.Configuration.Internal.IInternalConfigSystem.GetSection(String sectionName)
at System.Configuration.ConfigurationManager.GetSection(String sectionName)
at NLog.Config.XmlLoggingConfiguration.get_AppConfig()
at NLog.LogFactory.get_Configuration()
at NLog.LogFactory.GetLogger(LoggerCacheKey cacheKey)
at NLog.LogFactory.GetLogger(String name)
at NLog.LogManager.GetCurrentClassLogger()
at Ranorex.Core.ElementEngine..cctor()
--- End of inner exception stack trace ---
at Ranorex.Core.ElementEngine.set_SepChar(Char value)
--- End of inner exception stack trace ---
at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at System.Reflection.RuntimePropertyInfo.SetValue(Object obj, Object value, BindingFlags invokeAttr, Binder binder, Object[] index, CultureInfo culture)
at System.Reflection.RuntimePropertyInfo.SetValue(Object obj, Object value, Object[] index)
at ICSharpCode.SharpDevelop.SplashScreenForm..ctor()
at ICSharpCode.SharpDevelop.SplashScreenForm.ShowSplashScreen()
at ICSharpCode.SharpDevelop.SharpDevelopMain.Run(String[] args)
at ICSharpCode.SharpDevelop.SharpDevelopMain.Main(String[] args)

---- Recent log messages:
Failed to append recent log messages.
System.InvalidOperationException: Sequence contains no elements
at System.Linq.Enumerable.Single[TSource](IEnumerable`1 source)
at ICSharpCode.SharpDevelop.Sda.LogMessageRecorder.AppendRecentLogMessages(StringBuilder sb, ILog log)
at ICSharpCode.SharpDevelop.Sda.ExceptionBox.getClipboardString()

---- Post-error application state information:
spy seems to be working fine and recognizing all objects.

please advise.

Roy

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: studio 4.0.1 doesnt load after installation

Post by Support Team » Fri Dec 28, 2012 11:47 am

Hi,

It looks like that the "RanorexStudio.exe.config" file is broken, could it be that you changed something in this config file?
Could you please post us your config file? We would like to analyze which XML code leads to this crash.

Attached is the original config file, you can use this one (just delete the txt ending before you use it) or you can repair the Ranorex installation in order to fix this issue.

Regards,
Markus
Attachments
RanorexStudio.exe.config.txt
(4.76 KiB) Downloaded 192 times
.
Image

rnevo
Posts: 5
Joined: Wed Dec 26, 2012 2:15 pm

Re: studio 4.0.1 doesnt load after installation

Post by rnevo » Sun Dec 30, 2012 8:05 am

Hey Markus,

thanks for the reply, I have tried to repair and reinstall ranorex a few times.
and it did not help.

i did not change any setings during installing nor after it.

also i have tried replacing the config file, and it did not help.

Thanks,

Roy
Attachments
ranorexstudio.exe.txt
original config file
(4.76 KiB) Downloaded 177 times

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: studio 4.0.1 doesnt load after installation

Post by Support Team » Mon Dec 31, 2012 3:38 pm

Hello Roy,

Thank you for your config file. I looks still equal to the original file.
Would you please try to uninstall Ranorex completely from your computer. After that please check if all files from the Ranorex installation were removed.
After that, please uninstall all Microsoft Visual C++ Redistributables from your computer, restart your computer and try to install Ranorex again.
Please make sure that you use the Ranorex-4.0.1.exe or the setup.exe to install Ranorex.

Regards,
Bernhard
.
Image

rnevo
Posts: 5
Joined: Wed Dec 26, 2012 2:15 pm

Re: studio 4.0.1 doesnt load after installation

Post by rnevo » Tue Jan 01, 2013 9:22 am

Hey Bernard,

Tried that, exactly as you asked,

Still getting the same exception.


Roy

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: studio 4.0.1 doesnt load after installation

Post by Support Team » Wed Jan 02, 2013 11:05 am

Hi,

That's weird!
Which .Net version is installed on your machine?
Do you have sufficient user privileges to run/install Ranorex on your machine?
Was Ranorex started from a local drive or from a network drive?
Could you please try if it works with Ranorex 3.3.5?
Please use the setup.exe for the installation.

Thanks,
Markus
.
Image

rnevo
Posts: 5
Joined: Wed Dec 26, 2012 2:15 pm

Re: studio 4.0.1 doesnt load after installation

Post by rnevo » Wed Jan 02, 2013 1:23 pm

Hey Markus,

.net framework 4.5,

i have adminstrator rights on the machine,

installed from a local file,

tried the 3.3.5 (using setup file),

here is the error -

Ranorex Studio Version : 3.3.5.20956
.NET Version : 4.0.30319.17929
OS Version : Microsoft Windows NT 6.1.7601 Service Pack 1
Current culture : Hebrew (Israel) (he-IL)
Running under WOW6432, processor architecture: AMD64
Working Set Memory : 54768kb
GC Heap Memory : 3412kb

Unhandled exception terminated RanorexStudio
Exception thrown:
System.Configuration.ConfigurationErrorsException: Configuration system failed to initialize ---> System.Configuration.ConfigurationErrorsException: Section or group name 'log4net' is already defined. Updates to this may only occur at the configuration level where it is defined. (C:\Program Files (x86)\Ranorex 3.3\RanorexStudio\bin\RanorexStudio.exe.Config line 3)
at System.Configuration.ConfigurationSchemaErrors.ThrowIfErrors(Boolean ignoreLocal)
at System.Configuration.BaseConfigurationRecord.ThrowIfParseErrors(ConfigurationSchemaErrors schemaErrors)
at System.Configuration.BaseConfigurationRecord.ThrowIfInitErrors()
at System.Configuration.ClientConfigurationSystem.EnsureInit(String configKey)
--- End of inner exception stack trace ---
at System.Configuration.ConfigurationManager.PrepareConfigSystem()
at System.Configuration.ConfigurationManager.get_AppSettings()
at ICSharpCode.SharpDevelop.SharpDevelopMain.RunApplication()
at ICSharpCode.SharpDevelop.SharpDevelopMain.Run(String[] args)
at ICSharpCode.SharpDevelop.SharpDevelopMain.Main(String[] args)

---- Recent log messages:
Failed to append recent log messages.
System.InvalidOperationException: Sequence contains no elements
at System.Linq.Enumerable.Single[TSource](IEnumerable`1 source)
at ICSharpCode.SharpDevelop.Sda.LogMessageRecorder.AppendRecentLogMessages(StringBuilder sb, ILog log)
at ICSharpCode.SharpDevelop.Sda.ExceptionBox.getClipboardString()

---- Post-error application state information:

Thanks,

Roy

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: studio 4.0.1 doesnt load after installation

Post by Support Team » Wed Jan 02, 2013 3:08 pm

Hi Roy,

Thanks that you tried this!
This is a really weird issue, we haven't heard about such an issue before but we guess this could have something to do with some of your local .Net configurations.
What you could try is to comment out the sections about the log4net in the Studio config file.
Comment out this line "<section name="log4net" type="System.Configuration.IgnoreSectionHandler" />" and the full section about log4net: <log4net> ... </log4net>.
Are you able to start Studio after you edited it?

Regards,
Markus
.
Image

rnevo
Posts: 5
Joined: Wed Dec 26, 2012 2:15 pm

Re: studio 4.0.1 doesnt load after installation

Post by rnevo » Wed Jan 02, 2013 3:22 pm

Hey Markus,

comment it out.... and it worked.

wierd...

Thanks for the help

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: studio 4.0.1 doesnt load after installation

Post by Support Team » Wed Jan 02, 2013 4:31 pm

Hey Roy,

As we supposed it seems that the mentioned log4net configuration code already exists in one of the global .Net specific configuration files. This means that it is already defined and you therefore got the exception.
An easy fix is to just comment out the mentioned lines.

Regards,
Markus
.
Image