JDB shows inconsistent behaviour with JNI Based Programs.

package com.RJCBEmulator;
public class Testing
     public static void main(String[] args) {
System.out.println("Start");
          NativeObject myClass = new NativeObject();
     System.out.println("Second line main" );
          myClass.printInfo();
public class NativeObject {
     static
          System.loadLibrary("RJCBEmulator");
     public NativeObject()
          nativeHandle = InitializeNative(1);
     public native long InitializeNative(int nClassId);
public void printInfo()
System.out.println( "Successful" );
     public long nativeHandle;
JNIEXPORT jlong JNICALL Java_com_RJCBEmulator_NativeObject_InitializeNative(JNIEnv *env, jobject obj, jint jnIID)
printf( "Inside InitializeNative\n");
jlong retVal;
switch( jnIID )
     case 1 :
     // do something
     break;
     case 2 :
     // do something
     break;
return 999;
when executed this program with java, I get this trace.
Start
Inside InitializeNative
Second line main
Successful
and when running the same program in jdb, I get the following trace
Start
Second line main
Successful
Inside InitializeNative
I am using jre1.4.1, I tried it with 1.3.1 and it works. Looks like JNI code is getting executed on a separate thread in JDB based on jre1.4.1.
Is there anybody who is facing this problem? Is there a workaround?

Start by testing your application using J2SE 1.4.1
(or the latest release available to you) and adding
"-Xcheck:jni" to the command line. This will perform
extra run-time checking on all JNI calls.
I don't
just want to see what native code parts that is
entered, I also want to be able to set breakpoints in
the native code (C code).There are debuggers that can work with both Java Language
and native code, but they need native support (in addition
to the Java Platform Debugger Architecture [JPDA]) to do it.
One example (on Solaris) is the latest release of dbx.
For more information, take a look at:
http://wwws.sun.com/software/sundev/suncc/documentation/mr/READMEs/dbx.html#new

Similar Messages

  • Point4D.Multiply inconsistent behaviour with NaN values

    I've noticed some peculiar behaviour with System.Windows.Media.Media3D.Point4d.Mutiply when used with NaN values.
    The following assumes that I expect that 0 * NaN should result in 0. There is an argument against that logic, but that is not the point here.
    I have a 4x4 matrix defined, in the case that it is an Identity matrix and there is a NaN component in the vector, I would like to get some defined vector output where it is possible to calculate the component.
    E.g. (1,2,NaN,4) * (Identity Matrix) = (1,2,NaN,4).
    I was caught out for a while:
    By stepping through using the debugger gives the output I want (1,2,NaN,4).
    But allowing the debug code to run through uninterrupted gives the result (NaN, NaN, Nan, Nan).
    There is a slightly surprising workaround: - using Matrix.IsIdentity seems to trigger the result I want
    If I use the default Matrix constructor instead of a manually created one (normally created elsewhere in code), there is no problem.
    Can anyone explain this inconsistency?
    Simple C# console demo:
    using System;
    using System.Windows.Media.Media3D;
    namespace TestNan
    class Program
    static void Main(string[] args)
    Point4D testPoint = new Point4D(1.0, 2.0, Double.NaN, 4.0);
    Matrix3D testMatrix = new Matrix3D(1.0, 0.0, 0.0, 0.0,
    0.0, 1.0, 0.0, 0.0,
    0.0, 0.0, 1.0, 0.0,
    0.0, 0.0, 0.0, 1.0);
    var testResult1 = Point4D.Multiply(testPoint, testMatrix);
    Console.WriteLine(testResult1.ToString());// NaN,NaN,NaN,NaN
    var b = testMatrix.IsIdentity;
    var testResult2 = Point4D.Multiply(testPoint, testMatrix);
    Console.WriteLine(testResult2.ToString());// 1, 2, NaN, 4
    Console.ReadKey();

    >>Can anyone explain this inconsistency?
    The Matrix3D class has an internal boolean flag that it uses to determine if the matrix is actually an identity matrix and this flag is not set when you create a Matrix3D object using the constructor that takes the 16 double values despite the fact that
    you are actually creating an identity matrix (the flag is then eventually set when you access the IsIdentity property).
    If you use the Matrix3D.Identity static property, the flag will get set to the correct value immediately and the results will be the expected:
    static void Main(string[] args)
    Point4D testPoint = new Point4D(1.0, 2.0, Double.NaN, 4.0);
    Matrix3D testMatrix = Matrix3D.Identity;
    var testResult1 = Point4D.Multiply(testPoint, testMatrix);
    Console.WriteLine(testResult1.ToString());
    var b = testMatrix.IsIdentity;
    var testResult2 = Point4D.Multiply(testPoint, testMatrix);
    Console.WriteLine(testResult2.ToString());// 1, 2, NaN, 4
    Console.ReadKey();
    Hope that helps.
    Please remember to close your threads by marking helpful posts as answer and then start a new thread if you have a new question. Please don't post several questions in the same thread.

  • FF 4 (mac) doesn't display handcursor in all Flash websites. Also all html websites show strange behaviour with cursor. (blinking cursor in nearby div after clicking a button)

    I'm running Mac OS 10.6
    FF4 doesn't display the hand cursor or type cursor in '''all''' flash websites on links/textfieldss when it should. Highly annoying and disgracing all flashcontent.
    Also with html websites I experienced strange cursor behaviour with FF4. Although it's hard to reproduce the problem. It's very inconsistent.
    I have the feeling in general FF4 should look into it's cursor behaviour on all possible platforms. Mainly Flash.

    I replicated the typing cursor problem on the popular FB. Just click e.g. "x people like this", you'll see you get a blinking type cursor in the "close" button.

  • Trying to make Macs compatible with windows-based programs.

    We have a Mac shop and are trying to set it up to run windows-based programs. I think I'm supposed to use Terminal Services for this but I don't know much about Terminal Server. Could anyone point me in the right direction for setting up our Mac machines to run windows software?

    Windows software cannot run natively on a Mac OS X.
    If you have a Windows server running Terminal Services, then on the Mac side you'll need the Microsoft Remote Desktop Connection client.
    This will allow you to open up a Windows Terminal Services session on your Mac.
    If you are not running a Terminal Server of some sort, and you wish to run Windows apps directly on the Mac... then you'll need Microsoft VirtualPC installed and configured on each Mac.

  • After the recent update I am having issues with Flash based games freezing and not responding.

    After the recent update I am having issues with flash based programs not running or loading correctly.  The programs will not load or take an extremely long time to load compared to jsut a few days ago.  This happens across the board on anything flash based.  Also, once they do load they will freeze, stop responding or need to be constantly refreshed to come back alive which is short lived at best.  I went thru the help and did all the file deleting, cache clearing, disabling hardware acceleration, removing then reinstalling flash, and even removing and reinstalling my browsers.  None of this has helped at all.  I am using Chrome and it is up to date and I checked my Flash player and it is up to date.  I am running windows 7 64bit.

    Here's what you're up against guys,
    Adobe writes the base code for Flash Player, and then hands it off to Google, who adapt it to a PPAPI plug-in (it's NPAPI when Adobe writes it). It's then "PepperFlash" and Google embeds it in their Chrome browser. While Google is pushing a "webwide" move to PPAPI Flash Content, a reinvention of the wheel so to speak, not everyone "got the memo", and Google is slowly making it so that PepperFlash will block NPAPI Flash content from running properly, and you have to disable PepperFlash to force the NPAPI plug-in to work, which sometimes fixes it, sometimes not. I have a feeling this is only going to get worse. HTML5 will eventually resolve the video end but game developers need to come up with something that won't require a plug-in.
    And to the first post:  Since PepperFlash is embedded in Chrome by Google, you can uninstall and reinstall Flash Player from here until your hard drive literally seizes up.... guess what? It has NO EFFECT at all on the PepperFlash plug-in in Chrome because it's a separate file in a separate folder and the uninstaller & installers don't have anything to do with it.

  • Trouble hiding / showing element with DA based on results of query

    Hi all,
    I have a field that I would like to valid either on keypress or lose focus. What I need to do is query a table with the value entered to determine if it exists. If it does, I want to show a little green checkmark, if not a red 'x'. I figure that I can use getElementById() to hide or show the image, but I can't seem to figure out how to do that based on the result of the query.
    I've tried this so far:
    DA
    event: lose focus
    type: item
    item: P3_PO_REF_NUMBER
    condition: not null
    true action: execute pl/sql code
    code:
    BEGIN
    declare
    l_exists number;
    begin
      select count(*) into l_exists
      from PO_LINE
      where BUSINESS_UNIT = 'METRO' and
        (PO_ID = to_char(:P3_PO_REF_NUMBER,'FM000000000') or PO_ID = 'S'||:P3_PO_REF_NUMBER);
      if l_exists > 0 then
        apex_util.set_session_state('P3_VALID', 'VALID');
      else
        apex_util.set_session_state('P3_VALID', 'NOT_VALUE');
      end if;
    end;
    END;page items to submit: P3_PO_REF_NUMBER
    page items to return: P3_VALID
    Eventually I thought that I'd create another hide/show DA based on the value of P3_VALID, but before I went much further, I wanted to check to see how this worked. It didn't. Error: exception thrown and not caught.
    Any thoughts as to what I'm missing, or am I doing this completely wrong?
    Thanks,
    Joe

    Ok, just for closure. I did get this working.
    I ended up deleting the original P3_PO_REF_NUMBER item and recreated it, and everything began to work. As I was doing this, I noticed that it seemed like things would begin to go awry when I changed the item's name, even if I changed it back again. It was almost as if there was an associated between the DA that became corrupted once the item name was changed. If I took the item out of the page items to submit field, no error. Of course the DA wouldn't fire correctly then either because it wasn't getting any value changes, but when I added the item back into the page items to submit field, I go an error.
    So:
    When I created the second PO_REF_NUMBER item, I did not delete the original first, so the new one of course had to be named differently. Then I modified the DA to use the new item name (PO_REF_NUM). It worked! Cool. So, no wanting to get rid of the original yet, I rename it, and then renamed the second one to what the original was (I have other code using that item name). Then I changed the DA again...but now it failed - unless I blanked out the page items to submit field...
    3rd time is a charm. So, this time, I made sure that no items were named "PO_REF_NUMBER", then I created the PO_REF_NUMBER again, naming it exactly as I needed it to be so I wouldn't have to change it later. Then I set out to tweak the field (size, etc), but did not touch the name. Now my DA is working nicely! It sets a hidden field's value, then another DA shows or hides an icon based on that hidden field's.
    Hopefully someone will find this useful,
    Joe

  • Jdeveloper Version for MSCA development with MWA server based programming

    Any one Please provide the Oracle Jdeveloper version for Mobile Supply Chain Applications with MWA server based programming. This application basically runs on Whse mgmt responsibility. Any body who is developing this type application, please provide the Oracle Jdeveloper VERSION using for programming.
    Thanks,
    Deepak

    my issue is resolved. i'm getting this problem when i add just java class file to the project. but when i also add the business componets and page component and generate controller class to the project , i can see that import is recognized by the java class file. So i guess i have to delete all the unwanted business components that i have created at the end.
    Thanks
    Sunny
    Edited by: user13369509 on Mar 16, 2011 12:44 PM

  • Our software vendor tells to use FF 3.5.1. because of some printer issues with their web based program. How safe is it to work with FF 3.5.1 in 2012?

    Our software vendor tells to use FF 3.5.1. because of some printer issues with their web based program. How safe is it to work with FF 3.5.1 in 2012?

    Thanks for the reply. I'll have a look at your solution.

  • Using Mac email program with Web-based email

    I'm wondering if there is a way to use the Mac email program with Web-based email (like Gmail, etc).
    If this is possible then how can I set up my system.
    Thanks much.

    Yes you can use gmail using Mail software.
    Following is prosidure:
    1)-Login to ur gmail A/s
    - Go to settings click Forward POP Settings the click Enable POP and click Save.
    2) open mail-POP settings
    -Type your Email address, Password,
    Incoming server:pop.gmail.com
    SMTP server: smtp.gmail.com
    Type and give the Bolded server in specified path
    and follow the instruction.

  • I installed firefox 10 - it was offered on startup. I absolutely does not work with a cloud based program I use (corecon) and I want to GO BACK TO FIREFOX 9. how do i do this?

    firefox 10 ABSOLUTELY does not work with a cloud based program, Corecon. I want to UNINSTALL firefox 10 and GO BACK TO FIREFOX 9 . How do I do this? This is a subscription service, you may not be able to try it. v9 works fine.

    http://support.mozilla.com/en-US/kb/Installing+a+previous+version+of+Firefox
    http://www.mozilla.com/en-US/firefox/

  • So I've changed my hard drive for an ssd and now I've been told to enable trim now I've got the apple cover will they show me how to enable it with out some program of the internet ?

    so I've changed my hard drive for an ssd and now I've been told to enable trim  ?  now I've got the apple cover will they show me how to enable it with out some program of the internet ?

    Use an app called chameleon ssd optimizer.
    I enabled trim with it after almost a year of having installed a Samsung 840 pro SSD and my read/write speeds almost quadrupled.
    I would definite;y advise using it even though Samsung SSD's come with there own garbage disposal.
    Hope that helps.

  • HT1557 where do i find Universal Binary Component compatible with Intel-based Macintosh that allows quicktime to show video?

    where do i find the link to the Universal Binary Component compatible with Intel-based Macintosh that allows quicktime to show video?

    I think your question is too vague to get an answer.
    You're asking for a 'Universal Binary component' for your 'Intel-based Macintosh'. Why universal binary?
    universal binaries are designed to work on both PowerPC and Intel machines. If you're using an Intel machine why do you need PowerPC support?
    Also, you want something that 'allows QuickTime to show video'. Well, not to be glib, but QuickTIme does video - that's it's raison d'etre. Therefore I think your question is more about how to get QuickTime to show a specific (non-standard?) video format. Without knowing what that format is, it's impossible to answer your question directly.
    That said, maybe the place to start is Apple's QuickTime Components index.

  • Strange behaviour of view based on several tables join with union all

    Dear fellows we r facing a strange problem we have a view based on several tables joined by union all ,when we issue an ordered query on date,rows returned are unusually different than they should be .
    Is oracle has some special behaviour for view based on union all ?
    I m using oracle 8.1.6 on windows 2000
    Kashif Sohail

    Did you ever solve this problem? I have two select statements based on 4 tables and 3 views using about 5 more tables. When I execute each select individually I get exactly what is expected. When I UNION ALL both selects together, I get "no rows returned", however when I UNION them I get exactly what is expected. I should get the same answer for both UNION ALL and UNION. The two select statements are identical, except for one column where I changed the constant to be different. Any thoughts?

  • ECC 6.0 VERSION UPGRADE - INCONSISTENCY BEHAVIOUR -MM - Reg

    Hai,
    We are in the process of ECC 6.O upgrade from ECC 5.0,
    we started the CT1/ CT2 testing and found the following error.
    While inwarding Material against Subcontracting purchase order / S.L.Agreement ,
    The system shows the error message of CHALLEN MATERIAL IS DIFFRENT FROM MATERIAL DOCUMENT , during GR
    note :- for the same material , same p.o , some times systems allows for GR & some times gives above error message.
    if i try with some other login , the behaviourseems to be same as my login
    Can anyone tell this why this inconsistency behaviour of system during GR for sub contracting item..
    Regards,
    Suresh.P

    go to SE38,  here type the program RM07CUFA,
    click on execute... type ur mov type 541... here make the purchase order field from display to optional..
               this will effected for new subcontracting scenerio....

  • Possibility of query showing deviated behaviour

    I have a strange problem which I am facing, I would explain that after giving the background. I have a front-end application web application with Oracle 11g as the database, in one of the screen of our GUI we have filters based on different criteria. I would simulate the problem faced with a simple example, say we have a GUI screen showing details of employee table and we put a search for a particular employee Id, the problem here is that details of all the employees are shown sometimes but rarely and not always. Is it possible that the "where" clause running in the background could be causing this deviated behaviour in a random fashion but not always. Could it be dependent on that some browsers do not support some things?
    I hope my query is clear that the web-based front-end application with Oracle database as the back-end is showing erratic behaviour on rare occasions of showing all results in a search condition whereas it should show a filtered set of records.
    Please revert with the reply to my query.
    Regards

    You haven't given us much to work on but I will go out on a limb and guess that your GUI front end is constructing the SQL dynamically and under some conditions are causing the variance in results. Did you instrument your application? Can you see the SQL query that is being passed to the backend database to verify that it is correct?

Maybe you are looking for