|
From: Jim R. <jr...@er...> - 2005-02-19 13:13:03
|
There's a good chance that it's not a Wrapper problem but that the Wrapper happens to expose a problem in your existing dll. The first thing is that if you're automating "an office app", there's a good chance that you're using COM. COM is inherently single threaded and if you've got a COM object in there anywhere, then _eventually_ accessing it from multiple threads will cause a crash. It's my experience that it's not consistent and you can get away with moving COM objects from on thread to another sometimes. Check the classpath. One common problem is accessing a class (env->FindClass) from the dll when the class does not exist, is not on the classpath, etc. (There are also some classloader issues that I don't understand here, this isn't a wrapper issue, but if you're creating your own classloaders then you may have a problem). An Java exception thrown in the dll that you don't check for can also cause a JVM crash - changing the environment could easily have introduced such a problem. You can run the entire application within a debugger and set a breakpoint to catch the crash. There's a setting in VC, something about catching exceptions. Which application to run is part of the Debug settings in VC. In GDB you can just start any application. Once you have the crash point you can check the variables and see if you have anything odd in the code, and generally debug what is going on. Jim kri...@st... wrote: > It is a wrapper question. As I wrote in my first sentance I point out that my > application works fine when _not_ running in the wrapper environment. Hence, the > odd behaviour must have something to do with the wrapper. > > Citerar Bashiro <ba...@en...>: > > >>I don't get it. Is this a wrapper question or >>it's a general java question ? >>bashiro >> >> >> >> >>>Hello, >>> >>>First of all it might be worth saying that my application works perfectly >>>fine >>>without the wrapper. I am using a dll that maintains a state depending on >>>various calls (this dll actually automates an office app). >>>Trying to make calls in a one threaded application works, the problem >>>arises >>>when I have multiple threads. One simple test I made is letting one thread >>>run >>>the init method in my dll, then letting the shutdown hook run the exit. >>>When >>>making that call the jvm crashes: >>> >>># Internal Error (0xe06d7363), pid=232, tid=2960 >>># >>># Java VM: Java HotSpot(TM) Client VM (1.5.0_01-b08 mixed mode, sharing) >>># Problematic frame: >>># C [kernel32.dll+0xd756] >>> >>>looking at the stack I can see >>> >>>Stack: [0x031f0000,0x03230000), sp=0x0322f8f4, free space=254k >>>Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native >>>code) >>>C [kernel32.dll+0xd756] >>>C [MYOWN.dll+0x7a2b] >>>... >>>J last java call made >>> >>>current thread is marked as being in native. >>> >>>I am clueless about what to do. Any ideas of what causes this problem when >>>runnin in the wrapper would be very appreciated! >>> >>>Kristian >>> >>> >>>------------------------------------------------------- >>>SF email is sponsored by - The IT Product Guide >>>Read honest & candid reviews on hundreds of IT Products from real users. >>>Discover which products truly live up to the hype. Start reading now. >>>http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click >>>_______________________________________________ >>>Wrapper-user mailing list >>>Wra...@li... >>>https://lists.sourceforge.net/lists/listinfo/wrapper-user >>> >> >> >> >>------------------------------------------------------- >>SF email is sponsored by - The IT Product Guide >>Read honest & candid reviews on hundreds of IT Products from real users. >>Discover which products truly live up to the hype. Start reading now. >>http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click >>_______________________________________________ >>Wrapper-user mailing list >>Wra...@li... >>https://lists.sourceforge.net/lists/listinfo/wrapper-user >> > > > > > > > ------------------------------------------------------- > SF email is sponsored by - The IT Product Guide > Read honest & candid reviews on hundreds of IT Products from real users. > Discover which products truly live up to the hype. Start reading now. > http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click > _______________________________________________ > Wrapper-user mailing list > Wra...@li... > https://lists.sourceforge.net/lists/listinfo/wrapper-user -- Jim Redman (505) 662 5156 x85 http://www.ergotech.com |