|
|||
|
.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
|
| Moderated by: Renate.Reinartz, Markus.Kreisel, Jaakko.Salmenius, Ilkka.Salmenius | Page: 1 2 |
|
|||||||||||||||
| 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 | |||||||||||||||||
| Author | Post | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|||||||||||||||||
|
YukonPete Member
|
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
|
||||||||||||||||
| |||||||||||||||||
| |||||||||||||||||
|
Ilkka.Salmenius Administrator
|
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 |
||||||||||||||||
| |||||||||||||||||
|
|||||||||||||||||
|
YukonPete Member
|
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?
|
||||||||||||||||
| |||||||||||||||||
| |||||||||||||||||
|
Ilkka.Salmenius Administrator
|
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 |
||||||||||||||||
| |||||||||||||||||
|
|||||||||||||||||
|
YukonPete Member
|
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
|
||||||||||||||||
| |||||||||||||||||
| |||||||||||||||||
|
YukonPete Member
|
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
|
||||||||||||||||
| |||||||||||||||||
|
|||||||||||||||||
|
Ilkka.Salmenius Administrator
|
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. This results in a FreeMem call after the memory manager has already been 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 |
||||||||||||||||
| |||||||||||||||||
| |||||||||||||||||
|
YukonPete Member
|
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
|
||||||||||||||||
| |||||||||||||||||
|
|||||||||||||||||
|
Ilkka.Salmenius Administrator
|
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 |
||||||||||||||||
| |||||||||||||||||
| |||||||||||||||||
|
YukonPete Member
|
Is that a XE2 bug? Lee
|
||||||||||||||||
| |||||||||||||||||
|
|||||||||||||||||
|
Ilkka.Salmenius Administrator
|
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 |
||||||||||||||||
| |||||||||||||||||
| |||||||||||||||||
|
Ilkka.Salmenius Administrator
|
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 |
||||||||||||||||
| |||||||||||||||||
|
|||||||||||||||||
|
YukonPete Member
|
Thanks.
|
||||||||||||||||
| |||||||||||||||||
| Current time is 06:17 pm | 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 | |
Sisulizer software localization tool - Three simple steps to localize