Click here to Skip to main content
16,011,905 members
Home / Discussions / Managed C++/CLI
   

Managed C++/CLI

 
GeneralRe: Bit Copying Pin
Jeffrey Walton16-Dec-07 1:59
Jeffrey Walton16-Dec-07 1:59 
GeneralRe: Bit Copying Pin
Luc Pattyn16-Dec-07 4:26
sitebuilderLuc Pattyn16-Dec-07 4:26 
GeneralUser Controls Pin
mikobi15-Dec-07 0:09
mikobi15-Dec-07 0:09 
GeneralRe: User Controls Pin
Christian Graus15-Dec-07 0:24
protectorChristian Graus15-Dec-07 0:24 
Question[Message Deleted] Pin
(Steven Hicks)n+114-Dec-07 12:39
(Steven Hicks)n+114-Dec-07 12:39 
GeneralRe: Question about redeclaring header files Pin
Christian Graus14-Dec-07 14:48
protectorChristian Graus14-Dec-07 14:48 
QuestionRe: [Message Deleted] Pin
Hamid_RT20-Dec-07 2:23
Hamid_RT20-Dec-07 2:23 
QuestionClass intantiation renders app unresponsive Pin
Dewm Solo14-Dec-07 9:42
Dewm Solo14-Dec-07 9:42 
Good afternoon to all,

I have been having this fight with my code since early this morning and I am running short on ideas....real short.

Lets start with the characteristics of the issue.
-On my development station everything is fine. The app is complete and ready to ship actually, once this is resolved.

-On the client station the app becomes unresponsive.

-Since there is nothing...not even a single exception thrown during debugging, I ended up posting MessageBox messages throughout the application to nail down exactly where the problem happens.

-I nailed it down to this. The application uses a DLL that I built. The DLL holds one class. The class is a CFileTemplate that takes a XML file reads it and returns an array. The xml file being a template file for columnsId, field names, data type, and length .....to read a CVS or Excel file.

-------------------------

Ok...lets describe the behavior now. When the application runs the user clicks a button to open an OpenFileDialog object, which returns the path to the template file. When it does so the application creates an instance of my CFileTemplate class. When I do this on the client station the application becomes unresponsive when I click the button to get the file dialog. If I put the instantiation in another method and call that method instead of the instantiation directly, I will see the dialog and use the Ok...and then the application becomes unresponsive.

Basically the method that holds the instantiation becomes unresponsive. Not executed at all!!!

If I comment out the instantiation of the class the method that holds the instantiation runs fine...and the application keeps working....as long as I don't use anything that requires that template file of course. So I assumed the problem was within my DLL

Still I don't understand why it is the method that holds the creation of my object that becomes unresponsive. It should at least run in the method as far as the instantiation, but no....if there is a compiled instantiation line in the method. The whole method is not executed. The call appears in the call stack, but nothing in the methods is executed.

None the less I looked at my DLL and changed the way the constructor works, by leaving variables initialization in there and use an Init() method to start working....basically read the xml file and assimilate its data. Then I put messageboxes in there to see what would happen. Of course on my development machine I see everything...all the messages....everything is executed and I see no problem.

On the client machine though, if I instantiate the object, the whole method that holds the instantiation is skipped and the app becomes unresponsive. Therefore my ctor is never called....therefore I do not get to see any of my messages.....hence I don't know what is going wrong.


This whole behavior and non stepping in the method is driving me out of my mind. The whole behavior beats me.....Instantiation of a class, even flawed class, wouldn't affect execution of the instructions that come before it. Why would the whole method that holds the instantiation become unresponsive????

Does this kind of behavior means anything to anyone? Is there anything I can do to figure out what is going? If you want snippets, ask and I'll post. I am even ready to send some code if required, because this is mind blowing. I have been thinking about my first article on here for a while. I guess I just found a good idea, once I figure this out.

Edit: Everything .Net 2.0. All stations, dev and clients, are WinXP SP2. The DLL only has .Net dependencies, mainly System, System.Xml, System.Windows.Forms
Dewm Solo - Managed C++ Developer

GeneralRe: Class intantiation renders app unresponsive [modified] Pin
Luc Pattyn14-Dec-07 10:24
sitebuilderLuc Pattyn14-Dec-07 10:24 
GeneralRe: Class intantiation renders app unresponsive Pin
Dewm Solo14-Dec-07 10:36
Dewm Solo14-Dec-07 10:36 
GeneralRe: Class intantiation renders app unresponsive Pin
Dewm Solo14-Dec-07 10:50
Dewm Solo14-Dec-07 10:50 
GeneralRe: Class intantiation renders app unresponsive Pin
Luc Pattyn14-Dec-07 11:14
sitebuilderLuc Pattyn14-Dec-07 11:14 
GeneralRe: Class intantiation renders app unresponsive Pin
Dewm Solo14-Dec-07 11:20
Dewm Solo14-Dec-07 11:20 
GeneralRe: Class intantiation renders app unresponsive Pin
Luc Pattyn14-Dec-07 11:34
sitebuilderLuc Pattyn14-Dec-07 11:34 
GeneralRe: Class intantiation renders app unresponsive Pin
Mark Salsbery14-Dec-07 11:41
Mark Salsbery14-Dec-07 11:41 
GeneralRe: Class intantiation renders app unresponsive Pin
Luc Pattyn14-Dec-07 12:05
sitebuilderLuc Pattyn14-Dec-07 12:05 
GeneralRe: Class intantiation renders app unresponsive Pin
Mark Salsbery14-Dec-07 12:10
Mark Salsbery14-Dec-07 12:10 
GeneralRe: Class intantiation renders app unresponsive Pin
Luc Pattyn14-Dec-07 12:26
sitebuilderLuc Pattyn14-Dec-07 12:26 
GeneralRe: Class intantiation renders app unresponsive Pin
Mark Salsbery14-Dec-07 11:45
Mark Salsbery14-Dec-07 11:45 
GeneralRe: Class intantiation renders app unresponsive Pin
Dewm Solo14-Dec-07 17:54
Dewm Solo14-Dec-07 17:54 
GeneralRe: Class intantiation renders app unresponsive Pin
Jeffrey Walton16-Dec-07 2:28
Jeffrey Walton16-Dec-07 2:28 
GeneralRe: Class intantiation renders app unresponsive Pin
Dewm Solo17-Dec-07 7:41
Dewm Solo17-Dec-07 7:41 
GeneralConfusion Pin
Dewm Solo17-Dec-07 8:25
Dewm Solo17-Dec-07 8:25 
GeneralRe: Confusion Pin
Dewm Solo17-Dec-07 9:21
Dewm Solo17-Dec-07 9:21 
GeneralRe: Confusion Pin
Dewm Solo18-Dec-07 5:26
Dewm Solo18-Dec-07 5:26 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.