Jump to content
Excelsior Forums

MaiSofTXP

Members
  • Content count

    0
  • Joined

  • Last visited

    Never

Everything posted by MaiSofTXP

  1. Can't load library

    I have this error running xFunction code in TomCat 5.5 / Ubuntu environment, even if I place the .so file everywhere in the file system ? Can anyone help me ?? MaiSofTXP
  2. Linux examples

    Hi! Can you publish some Linux sample ? I'm getting in trouble calling a libEngine.so module, I get a "Can't load library libEngine" error. If my xFunction code is runing under a tomcat web services, where I have to place the libEngine.so module ? In Windows I have to place it under the tomcat "bin" folder ... thanks. Luca Maistrello
  3. Pointer to struct arrays ....

    Someone can tell me how is the mapping for a stGeo** parameter where the c function is something like this void myfunc(stGeo**); and stGeo is struct stGeo { char[10] a; char[20] b; } and the function returns a pointer to an array of stGeo I try with something like this: xFunction f=new xFunction("myDll","void _myfunc@28(stGeo*)"); stGeo[][] paramStGeo = new stGeo[][]{{new stGeo(), new stGeo()}}; Pointer arg = Argument.create("stGeo*"); f.invoke(arg); stGeo[][] output = (stGeo[][])arg.createArray(new int[]{1,2}; and in output[0] I could have my output but it doesn't works What is wrong
  4. Pointer to struct arrays ....

    I forgot to tell that OutputNorm is a struct containing other structs ... but NO pointers to struct...
  5. Pointer to struct arrays ....

    I try also with: JAVA CODE: xFunction f=new xFunction("geoengine", "int myfunc(OutputNorm**)"); Pointer arg= Pointer.create("OutputNorm**"); result=((Integer)(f.invoke(arg))).intValue(); OutputNorm[][] outEff=(OutputNorm[][])((Pointer)arg).createArray(new int[]{1,22}); and OutputNorm[] outEff=(OutputNorm[])((Pointer)arg).createArray(new int[]{22}); and Pointer outEff=(Pointer)((Pointer)arg).deref(); OutputNorm[][] outEff2=(OutputNorm[][])((Pointer)outEff).createArray(new int[]{1,22}); but I obtain always all blank fields !!!!!!! HELP ME PLEASE !!!!!!!!!
  6. Stack overflow ???

    Hi. I'm now easily calling the NormExtEx2 function on my own dll. This function works fine for 2 seconds (it loads a lot of data in memory) and then I get a "stack overflow exception outside the vm". The same function called in a win application works fine, so I can't understand where's the problem. I already tried to increase the jvm stack size by using the -Xss option of java.exe. Anyone can help me in this annoying debugging question? Thanks!
  7. Stack overflow ???

    The only thing you need is a dll function which need 1MB of stack to run. If you try to run this function in JDK 1.4.2, even assigning 1MB stack to the java.exe file you get a stack overflow error If you try to run the same function in JDK 1.5 or in a webapps running under tomcat 5.5 you get no error. It's really hard to make a sample ...
  8. And now ...

    ... why my input structure like this class inputS { public int X; public int Y; public String s; } // C struct // struct inputS { // long X; // long Y; // unsigned char * s; // } with this code: xFunction f = new xFunction("mydll","void myFunction(inputS*)") // C function void myFunction(inputS*) inputS inArg = new inputS(); inArg.X=1; inArg.Y=2; inArg.s="hello!"; Pointer arg= Pointer.createPointerTo((Structure)inArg); f.invoke(arg); resulting in: inputS.X = 1 --> OK! inputS.Y = 2 --> OK! inputS.s = "%$?&" etc. ?????
  9. And now ...

    ---FIXED --- I used thw wrong type, I have to use char[] ... sorry!
  10. And now ...

    // in inputS.java public String defineLayout() { return "int X, int Y, CSTRING s";} Help!
  11. And now ...

    sorry: Pointer arg= Pointer.createPointerTo((Structure)inputS);
  12. Stack overflow ???

    --- fixed ---- Don't ask me why but I fixed this by: - compiling my java code with jdk 1.4.2 - assigning 1mb of stack to java.exe (JDK 1.5.0 Version!!!) with editbin /STACK:1048576 java.eve - running my 1.4.2 class on 1.5.0 java.exe :o :o Trying to do editbin /STACK:1048576 on java.exe 1.4.2 version IS NOT WORKING ???
  13. Hi! I already post in xFunction forum but I hope posting here to be more lucky. I got a stack overflow exception calling a function which, when normally called in win application, works fine. It not depends on input parameters bacause the stack overflow happens during initialization and loading of data in memory ... Can anyone help me? I already tried to increase the stack size in jvm by -Xss option...
  14. xFunction and stack overflow exception

    Sorry I didn't understand this is NOT the right forum for xFunction ...
  15. Help a newbie please ...

    Hi! I'm new about xFunction and I'm trying to invoke a function defined in this way: int WINAPI NormExtEx2(long, LPGEOINPUT, STGEOOUTPUT **); where -LPGEOINPUT is a STGEOINPUT* and STGEOINPUT is a struct -STGEOOUTPUT is a struct and the function returns an array STGEOOUTPUT[20] xFunction tells me that argument 2 is incompaticle with this call: Pointer arg1= Pointer.create("int*"); Pointer arg2= Pointer.createPointerTo((Structure)input); Output[][] out = new Output[][]{{new Output(),new Output(),new Output(),new Output(),new Output(),new Output(),new Output(),new Output(),new Output(),new Output(),new Output(),new Output(),new Output(),new Output(),new Output(),new Output(),new Output(),new Output(),new Output(),new Output()}}; Pointer arg3=(Pointer)Argument.create("OutputNorm**",out); Pointer[] args = new Pointer[]{arg1,arg2,arg3}; int result=((Integer)(f.invoke(args))).intValue(); what was wrong ?? Thanks!
  16. Help a newbie please ...

    ---- ok fixed ---
×