SiComponents Home Page SiComponents Forums
Here you will be able to get help and share your experience
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

App Hang on Windows 7 x64

 
Post new topic   Reply to topic    SiComponents Forums Forum Index -> TsiLang Components Suite
View previous topic :: View next topic  
Author Message
Ian Hall



Joined: 22 Apr 2010
Posts: 7

PostPosted: Wed Dec 05, 2012 4:19 pm    Post subject: App Hang on Windows 7 x64 Reply with quote

Hi,

I have a program created using D2010 which has ran for many years on XP, which now needs to run on Win7. I am testing using Win7 x64.


When I try to open the TFileOpen or TFileSave dialog in my program, the app hangs. I saw that v6.5.3 introduced a fix for some problem with Windows dialogues, so have just upgraded to v6.5.5, yet the problem still exists.

One form I have can be used in my main project, which uses the Tsilang translation components, and also in a stripped-down utility program (non-translated). The call to (T)FileOpen.Execute causes the app to hang, but only when made in the main (translated) app. The form itself has no translated text or si components.

I see the problem with TFileOpen + TFileSave dialogs (and also the si wrapper components), and also with the Vista Dialog components. Other dialogs such as TOpenTextFile operate normally (though the dialog text items do not change when I change my selected language). Do you treat TFileOpen and TOpenTextFile differently?

The problem does not occur when I add the standard dialogs to your sample programs.

Are you somehow hooking the TFileOpen component / windows standard dialog for an application? Is there a simple way to disable the TsiLang system / switch off any hooks, to make sure that the problem I am seeing is caused by the translation system? I do not want to manually remove the translation components as this would affect over 50 forms, plus many support units.

The call stack for the hung thread shows that it is in ntdll.NtWaitForSingleObject.

Any suggestions would be greatly appreciated. If we can show that the si components (or the way we are using them) are causing the issue then we would be happy to pay for the premium support to make progress.


TIA

Ian
Back to top
View user's profile Send private message
isiticov
Site Admin


Joined: 21 Nov 2002
Posts: 2097

PostPosted: Wed Dec 12, 2012 8:25 am    Post subject: Reply with quote

Hi,

Do you mean that you're unable to reproduce the problem when you place TsiDialogs on any sample project with TsiLang and open any of such dialog under Win7 64?
Do you mean that when you even open the standard TOpenDialog the application hangs? Did you open any TsiLang dialogs before opening the standard one? Or just the very first call to TOpenDialog.Execute hangs the application?
Back to top
View user's profile Send private message
Ian Hall



Joined: 22 Apr 2010
Posts: 7

PostPosted: Wed Dec 12, 2012 8:51 am    Post subject: Reply with quote

Hi Igor,

The hang happens on the very first call to TOpenDialog.Execute or TsiOpenDialog.Execute.

I tried using TOpenDialog in a simple test project (D10, Win 7 x64), and it worked as expected.

I added a TOpenDialog to some of your sample projects, and it worked as expected.

I tried using a TsiOpenDialog instead of TOpenDialog in my main app, and the app hangs on first execute.

TOpenTextFileDialog works fine.

Please let me know if you need further info or want me to run a specific test.

TIA

Ian
Back to top
View user's profile Send private message
isiticov
Site Admin


Joined: 21 Nov 2002
Posts: 2097

PostPosted: Wed Dec 19, 2012 12:09 pm    Post subject: Reply with quote

Hi Ian,

We've tried several combinations and all worked just fine Sad May be you can try to reproduce this on some simple project and send it to us? Because it looks like there is "something" in your main project that might cause such.
Back to top
View user's profile Send private message
Ian Hall



Joined: 22 Apr 2010
Posts: 7

PostPosted: Wed Dec 19, 2012 12:25 pm    Post subject: Reply with quote

Hi Igor,

Thanks for trying. Unfortunately reducing my main app to it's main blocks is going to be a big job. That is why I originally asked if there was a simple way to completely deactivate the language components without manually removing them - just to confirm where the problem lies.

Is there anything I can do to just stop your code from working / hooking dialog calls?

Cheers

Ian
Back to top
View user's profile Send private message
isiticov
Site Admin


Joined: 21 Nov 2002
Posts: 2097

PostPosted: Thu Dec 20, 2012 9:44 am    Post subject: Reply with quote

If you clear TsiLang property of TsiXXDialog components they will work as usual dialogs and there won't be executed any code that deals with system dialogs. TsiLang components themselves don't perform anything related to dialogs. TsiXXDialog components get info from TsiLang and translate UI controls of dialogs upon showing.
Back to top
View user's profile Send private message
Ian Hall



Joined: 22 Apr 2010
Posts: 7

PostPosted: Thu Dec 20, 2012 11:01 am    Post subject: Reply with quote

Hi Igor,

Unfortunately this has not helped. However, I have a question about how your code operates.

I have only ever used the standard dialogs, not the TsiXXDialog components (apart from trying to fix this problem).

When I run my app on XP, and use the standard TOpenDialog, this dialog is reacting to the language change in my app (presumably using the DlgsCaptions property of my TsiLang component).

How are you doing this?

Does this mean that you are hooking the standard dialog buttons somehow, or wrapping calls to TFileOpen.Execute?

If I clear the dispatcher + container properties of the TsiLangLinked component on one of my forms, then the buttons on the standard TOpenDialog no longer react to language changes (on XP).

However, on Win7 the hang still occurs using the standard TOpenDialog:
- on forms that use a TsiLangLinked to connect to my main form
- on forms with the TsiLangLinked dispatcher + container fields cleared
- on forms with no TsiLangLinked at all.

Do you run some sort of initialisation code that installs a hook / wrapper on the standard dialogs? If so, is there a way to prevent this, for testing purposes?

Does your code not apply the same hook/wrapper to TOpen(Save)TextFileDialog? These dialogs work correctly on XP and Win7 - and never react to language changes, which is why I suspect the language components are causing the hang.

Thanks for your help.

Regards

Ian
Back to top
View user's profile Send private message
isiticov
Site Admin


Joined: 21 Nov 2002
Posts: 2097

PostPosted: Wed Dec 26, 2012 7:52 am    Post subject: Reply with quote

Quote:
When I run my app on XP, and use the standard TOpenDialog, this dialog is reacting to the language change in my app (presumably using the DlgsCaptions property of my TsiLang component).

I'm sorry, but I can't believe this. Smile TsiLang doesn't react anyhow with standard dialogs at all. These dialogs always show captions in OS UI language. So if you have German OS installed these dialogs will be in German and so on.
Quote:
If I clear the dispatcher + container properties of the TsiLangLinked component on one of my forms, then the buttons on the standard TOpenDialog no longer react to language changes (on XP).

This is possible ONLY if you use TsiXXDialogs. I can't imagine how this could happen if you use standard dialogs.
Back to top
View user's profile Send private message
Ian Hall



Joined: 22 Apr 2010
Posts: 7

PostPosted: Wed Jan 02, 2013 1:37 pm    Post subject: Reply with quote

Hi Igor,

Happy New Year!

You are (of course) quite right. My testing was mistaken, and I was actually using a single TsiOpenDialog in the version under test on XP; I am sorry for the mix-up, as it started me believing that you were wrapping the standard dialog somehow.

Unfortunately I now do not know where to look next, as my app can use TOpenDialog on XP, but hangs on Win7, while TOpenTextFileDialog is fine on both platforms.

Since simple test apps can use a TOpenDialog without problems, it looks like I have to completely strip my application down to the point where it works as expected, and then add chunks back in until it stops. This is going to be a very long job Sad


Once again, thanks for your help (and for your excellent component set), and apologies for my mistake.

Regards

Ian
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    SiComponents Forums Forum Index -> TsiLang Components Suite 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 p h p B B  © 2001, 2005 p h p B B  Group