Support forum of the software localization tool Sisulizer


.NET, Delphi, ... - Sisulizer Localization Tool Support Home

Get in contact with the makers of Sisulizer.
Our forum is open for all questions around Sisulizer from customers and prospects.
Don't hesitate to register and ask. The Sisulizer team will answer ASAP.

Search     Help Home Sisulizer Website Download
Search by username
Not logged in - Login | Register 

 Moderated by: Renate.Reinartz, Markus.Kreisel, Jaakko.Salmenius, Ilkka.Salmenius Page:  First Page Previous Page  1  2   
New Topic Reply Printer Friendly
Localized exe works, resource DLL does not - Bugs and Quirks in Sisulizer - Technical Support (You need to be registered at the forum to write) - .NET, Delphi, ... - Sisulizer Localization Tool Support
AuthorPost
 Posted: Mon Feb 6th, 2012 11:07 pm
PM Private Upload Quote Reply
YukonPete
Member
 

Joined: Fri Jan 27th, 2012
Location:  
Posts: 30
Status: 
Offline
You are correct. When I set the registry value to empty the program calls ExitProcess and exits gracefully. OuterContext is nil.

So what is the conclusion? Is there something wrong with my application?

Lee

Back To Top PM Private Upload Quote Reply

 Posted: Mon Feb 6th, 2012 11:50 pm
PM Private Upload Quote Reply
Ilkka.Salmenius
Administrator


Joined: Wed Aug 8th, 2007
Location: Tokyo, Japan
Posts: 956
Status: 
Offline
YukonPete wrote: So what is the conclusion? Is there something wrong with my application?

I am afraid so. It seems that OuterContext gets corrupted. Most likely some part of the application uses object/pointer that is not allocated and that corrupts some memory. The odd thing is that it only occurs when VCL tries to find a resource DLL. However in most cases there memory problem occurs in odd places.

Ilkka



____________________
http://www.sisulizer.com - Three simple steps to localize
Back To Top PM Private Upload Quote Reply

 Posted: Tue Feb 7th, 2012 12:50 am
PM Private Upload Quote Reply
YukonPete
Member
 

Joined: Fri Jan 27th, 2012
Location:  
Posts: 30
Status: 
Offline
At this point I am having a hard time believing that. The only auto-created form is my main form.

I removed all code from my main form's OnCreate and OnDestroy
events. No other form is created.

The only thing created is the main form and the components it owns. Which is very few.

Why does the English version work and the Serbian exe file from Sisulizer work?

Back To Top PM Private Upload Quote Reply

 Posted: Tue Feb 7th, 2012 01:08 am
PM Private Upload Quote Reply
Ilkka.Salmenius
Administrator


Joined: Wed Aug 8th, 2007
Location: Tokyo, Japan
Posts: 956
Status: 
Offline
The difference is that when you run original EXE or localized EXE your did not have the registry value set. In that case VCL does not try to load any resource DLLs. When the registy is set but contains a value where is not matching file VCL at least tries to find that file although because file does not exist it fails. This is the difference.

Try to debug the code more and try to find the location where OuterContext gets assigned. That might give some hint.

I also see that you use some 3rd party components: ovc*, LMD*, nxll*, RP*, Rv*, Ab*, etc. I know it is a long shot to find error there but it is possible.

If the error occured only when application has loaded a resource DLL created by Sisulizer but the same error occurs when no DLL is loaded the error can not be in the localized DLL.

Ilkka



____________________
http://www.sisulizer.com - Three simple steps to localize
Back To Top PM Private Upload Quote Reply

 Posted: Tue Feb 7th, 2012 01:36 pm
PM Private Upload Quote Reply
YukonPete
Member
 

Joined: Fri Jan 27th, 2012
Location:  
Posts: 30
Status: 
Offline
Ikka;

I have found where the problem is. This is very weird.

It has everything to do with using a Memory Manger for Delphi applications. I have been using Nexusdb's memory manager. But you can install open source FastMM.

Create a simple project. Add nothing to the main form. In the project source add FastMM4 as the first unit in the uses clause.

Now emulate what I was doing. In the registry add a EN or SR as data to the value of the project exe.

FastMM4 will return memory leaks and you will get a runtime error.

This is weird.

Lee

Back To Top PM Private Upload Quote Reply

 Posted: Tue Feb 7th, 2012 02:15 pm
PM Private Upload Quote Reply
YukonPete
Member
 

Joined: Fri Jan 27th, 2012
Location:  
Posts: 30
Status: 
Offline
NexusDB has now fixed their Memory Manager. However, you should be aware that FastMM4 and likely other Memory Managers are going to create the same error.

What is happening is this.

If there is a Language override, then

var
PreferredLanguagesOverride: PChar = nil;

in system.pas will have been assigned.

The finalization code in system.pas, which runs *after* the finalization code of nxReplacementMemoryManager will then try to execute this code:

if PreferredLanguagesOverride nil then
FreeMem(PreferredLanguagesOverride);

This results in a FreeMem call after the memory manager has already been
finalized and discarded it's internal datastructures.

Lee

Back To Top PM Private Upload Quote Reply

 Posted: Tue Feb 7th, 2012 09:39 pm
PM Private Upload Quote Reply
Ilkka.Salmenius
Administrator


Joined: Wed Aug 8th, 2007
Location: Tokyo, Japan
Posts: 956
Status: 
Offline
YukonPete wrote: Now emulate what I was doing. In the registry add a EN or SR as data to the value of the project exe.

FastMM4 will return memory leaks and you will get a runtime error.
This results in a FreeMem call after the memory manager has already been
finalized and discarded it's internal datastructures.


 

You are right. I got the same error. The memory leak is reported because System.finalization's FreeMen is not yet called and when it is called FastMM raised an error that momory is freed after clean up. It seems that FastMM is not 100% compatible to VCL.  They need to fix this.

Ilkka



____________________
http://www.sisulizer.com - Three simple steps to localize
Back To Top PM Private Upload Quote Reply

 Posted: Tue Feb 7th, 2012 10:52 pm
PM Private Upload Quote Reply
YukonPete
Member
 

Joined: Fri Jan 27th, 2012
Location:  
Posts: 30
Status: 
Offline
I have found something even more weird. Wish I could talk to you rather than write.

Here is what I have found.

Take the same test project with nothing added to the main form.

Add another form to the project with nothing on it.

Now, remove the first form from the project. The new form should now be the only auto-created form.

In the registry, add sr or some country code to the exe value.

Let me know if you get any errors. Sometimes I do, sometimes I don't. It seems that XE2 compiler gets confused. Sometimes it cannot find the resource for the new form and throw an error. If you run the app with no country value, it will always runs fine.

So my conclusion is this. Create 1 auto-create form in your project. Don't ever change it. You could cause huge issues with resource dlls.

Lee

Back To Top PM Private Upload Quote Reply

 Posted: Tue Feb 7th, 2012 11:18 pm
PM Private Upload Quote Reply
Ilkka.Salmenius
Administrator


Joined: Wed Aug 8th, 2007
Location: Tokyo, Japan
Posts: 956
Status: 
Offline
YukonPete wrote: Let me know if you get any errors. Sometimes I do, sometimes I don't. It seems that XE2 compiler gets confused. Sometimes it cannot find the resource for the new form and throw an error. If you run the app with no country value, it will always runs fine.

I get the same error on every time also after I removed the first form.

Ilkka



____________________
http://www.sisulizer.com - Three simple steps to localize
Back To Top PM Private Upload Quote Reply

 Posted: Tue Feb 7th, 2012 11:51 pm
PM Private Upload Quote Reply
YukonPete
Member
 

Joined: Fri Jan 27th, 2012
Location:  
Posts: 30
Status: 
Offline
Is that a XE2 bug?

Lee

Back To Top PM Private Upload Quote Reply

 Posted: Wed Feb 8th, 2012 12:14 am
PM Private Upload Quote Reply
Ilkka.Salmenius
Administrator


Joined: Wed Aug 8th, 2007
Location: Tokyo, Japan
Posts: 956
Status: 
Offline
Fist it seems to be a bug in XE2 but because it works just OK without FastMM. This is why I doubt that Embarcadero guys won't fix it although the same app works perfectly on 2010. I did not test on XE.

Ilkka



____________________
http://www.sisulizer.com - Three simple steps to localize
Back To Top PM Private Upload Quote Reply

 Posted: Wed Feb 8th, 2012 06:56 am
PM Private Upload Quote Reply
Ilkka.Salmenius
Administrator


Joined: Wed Aug 8th, 2007
Location: Tokyo, Japan
Posts: 956
Status: 
Offline
I implemented support for NexusDB. Next Sisulizer build (330) can localize local (or on network drive) NexusDB databases.

Ilkka



____________________
http://www.sisulizer.com - Three simple steps to localize
Back To Top PM Private Upload Quote Reply

 Posted: Wed Feb 8th, 2012 11:27 am
PM Private Upload Quote Reply
YukonPete
Member
 

Joined: Fri Jan 27th, 2012
Location:  
Posts: 30
Status: 
Offline
Thanks.

Back To Top PM Private Upload Quote Reply

Current time is 06:17 pm Page:  First Page Previous Page  1  2     
.NET, Delphi, ... - Sisulizer Localization Tool Support > Technical Support (You need to be registered at the forum to write) > Bugs and Quirks in Sisulizer > Localized exe works, resource DLL does not



WowUltra modified by Sisulizer Copyright © 2007-09 by Jim Hale - Based on WowBB Copyright © 2003-2006 Aycan Gulez

Sisulizer software localization tool - Three simple steps to localize