Infralution Support Forum Index Infralution Support
Support groups for Infralution products
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Globalizer 4.1 hard crash

 
Post new topic   Reply to topic    Infralution Support Forum Index -> Globalizer Support
View previous topic :: View next topic  
Author Message
BenNTX



Joined: 26 Nov 2018
Posts: 1

PostPosted: Mon Nov 26, 2018 4:13 pm    Post subject: Globalizer 4.1 hard crash Reply with quote

Hi,

I'm using an evaluation version of the developer edition of Globalizer 4.1 to process a few 4MB .gxl files (they contain more than 1000 items each). After navigating the different resources being translated, the Globalizer crashes suddenly with the following message in the Event Viewer:

Code:
Application: Globalizer.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.InvalidOperationException
   at System.Windows.Forms.Control.MarshaledInvoke(System.Windows.Forms.Control, System.Delegate, System.Object[], Boolean)
   at System.Windows.Forms.Control.BeginInvoke(System.Delegate, System.Object[])
   at Infralution.Globalizer.FormPreviewControl.TypeLoadThread()
   at System.Threading.ThreadHelper.ThreadStart_Context(System.Object)
   at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
   at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
   at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object)
   at System.Threading.ThreadHelper.ThreadStart()



Code:
Faulting application name: Globalizer.exe, version: 4.1.0.0, time stamp: 0x5bef5456
Faulting module name: KERNELBASE.dll, version: 10.0.17134.407, time stamp: 0xade8d4fe
Exception code: 0xe0434352
Fault offset: 0x00111812
Faulting process id: 0x1420
Faulting application start time: 0x01d485a0caaa4dca
Faulting application path: C:\Program Files (x86)\Infralution\Globalizer 4\Globalizer.exe
Faulting module path: C:\WINDOWS\System32\KERNELBASE.dll
Report Id: bf97063e-9e02-4bf5-92b3-b230f442afd7
Faulting package full name:
Faulting package-relative application ID:


Can anybody help? Thanks
Back to top
View user's profile Send private message
Infralution



Joined: 28 Feb 2005
Posts: 5027

PostPosted: Wed Nov 28, 2018 6:15 am    Post subject: Reply with quote

Looks like this is a problem while previewing a form or control. Can you repeat the problem?
_________________
Infralution Support
Back to top
View user's profile Send private message Visit poster's website
manlyboy



Joined: 24 Apr 2012
Posts: 30

PostPosted: Mon Aug 19, 2019 4:43 am    Post subject: Reply with quote

Infralution wrote:
Can you repeat the problem?


Yes - similar circumstances to original poster and it does seem to happen whenever you preview the form AND there is an item that cannot be resolved except at runtime. For example, setting a textbox text directly from a value obtained from a database field.
Back to top
View user's profile Send private message
Infralution



Joined: 28 Feb 2005
Posts: 5027

PostPosted: Mon Aug 19, 2019 6:40 am    Post subject: Reply with quote

See the extract from the help about coding guidelines for previewing forms and controls:

Quote:
Previewing Forms and Controls

Unlike many other localization tools, the Form preview displayed by Globalizer is not a simulation of your form layout based on the resx file. Instead Globalizer leverages the power of .NET Reflection to run your actual application code to display the form or control. This means that Globalizer is able to display previews of complex Forms that use custom controls which typically can not be handled by other tools. Because Globalizer runs the actual code for the form you need to follow a few simple guidelines when developing forms and controls which you want Globalizer to preview:

The Form/Control must have a default parameterless constructor in order for Globalizer to be able to create it
The default constructor (and OnLoad method) should not invoke code that depends on external initialization (since this may cause an exception when Globalizer attempts to create the form/control without the initialization having occurred)
Event handlers for the control/form should not invoke code that depends on external initialization unless they have checked that the initialization has occurred. This prevents the user seeing errors when they click on buttons or controls within the form being previewed.
One simple coding technique to achieve the above conditions, for forms/controls that do need to access externally initialized data, is to provide a second constructor that takes the data object as a parameter. The form/control saves this in a member variable and each event handler that needs to access the data simply returns if the member variable is uninitialized (ie Null/Nothing).

If your Form constructor or event handlers do happen to invoke code that depends on external initializations, and this causes an exception to occur, then the Developer Edition of Globalizer will catch the exception and display full details about the exception including stack trace and description. This enables you to insert the appropriate checks in your code to avoid the problem. The Translators Edition of Globalizer also catches exceptions if they occur - but displays a less verbose (and less scary) message indicating that the preview for the Form or Control can not be displayed.


If you have code in you constructor or event handlers that can only be resolved at runtime then it may be possibly that it could cause a hard crash during preview that Globalizer's exception handlers are unable to catch.
_________________
Infralution Support
Back to top
View user's profile Send private message Visit poster's website
Infralution



Joined: 28 Feb 2005
Posts: 5027

PostPosted: Sat Oct 10, 2020 10:22 am    Post subject: Reply with quote

Another customer recently reported a similar issue which is also likely the source of this problem. We have released a fix in version 4.1.3 which should address this.
_________________
Infralution Support
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Infralution Support Forum Index -> Globalizer Support All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group