JNI for C and computer freezes

I have C code that uses JNI to create a JavaVM and calls my GUI class that creates a Java Swing GUI. This is the code that I use to invoke the JVM:
JNIEnv *env;
JavaVM *jvm;
JavaVMInitArgs vm_args;
JavaVMOption options[1];
int nbOptions;
jint res;
jclass myJavaClass;
jmethodID javaGUI, libraryID;
jmethodID constructorID, guiID;
vm_args.version = JNI_VERSION_1_2;
vm_args.nOptions = 1;
options[0].optionString = "-Djava.class.path=/root/pV3/FinalpV3";
vm_args.options = options;
vm_args.ignoreUnrecognized = JNI_FALSE;
res = JNI_CreateJavaVM(&jvm, (void **)&env, &vm_args);
if (res < 0) printf("can't create Java VM\n");
myJavaClass = (*env)->FindClass(env, "Starter");
if(myJavaClass == 0) printf("can't find Java Class\n");
guiID = (*env)->GetStaticMethodID(env, myJavaClass, "start", "()V");
if(guiID == 0) printf("can't find start() ID\n");
(*env)->CallStaticVoidMethod(env, myJavaClass, guiID);
However, when I run the C code and (in turn) it creates the Java Swing GUI, if I mess around with the GUI my entire linux machine stalls. Just from experimenting, however, if I don't touch the GUI (i.e. click the buttons and stuff) the program will not freeze my machine. I am not sure the cause of this. I noticed that there is code to destroy the JVM, but do I need to call this?
Does anyone know what's going on?

JNI is to call C.
JNI can call functions written in C++ if the functions are specified as having C linkage.
Any other language can be called if you can write a C "wrapper" which in turn calls into the other language.

Similar Messages

  • Can calendar entries from an iPhone be pushed up to the cloud for iPad and computer updating? My phone only seems to be receiving updates from the cloud, but not able to send them.

    Can calendar entries from an iPhone be pushed up to the cloud for iPad and computer updating? My phone only seems to be receiving updates from the cloud, but not able to send them.

    Under Settings->Mail, Contacts, Calendars, What do you have set for the Default Calendar? Personal?
    If you don't have it set to a Cloud Calendar it will only create the entry locally.   You would need to select the iCloud Calendar specifically when creating the Calendar entry to have it sync.
    Otherwise set your default calendar to be the iCloud Calendar so all entries are created there by default. And as such get synced to other devices.

  • ITunes and Computer freezes when ipod is connected

    When I connect my video ipod to my computer (dell desktop) the system freezes, as in it will not respond to mouse clicks and keyboard (but can still get to task manager). When I unplug the ipod it comes back to life. Programs always freeze, but sometimes I am able to navigate within windows without it freezing, but as soon as a program is brought up, my computer falls to its knees.
    I have the latest version of iTunes, and updater v. 1.1, (but I have not been able to update the firmware yet from v 1.0).
    The odd thing is last night I was able to download several gigs worth of music to it without incident. I then tried to load movies (they were in the wrong format, but I didn't know it at the time), and so in an effort to correct that I uninstalled itunes, the ipod drivers, and the ipod updater programs several times.
    I cannot update the ipod firmware because the computer freezes when the ipod is plugged in, so the program freezes as well. Kind of a catch 22 situation.
    I have been over the forums and help archives for about an hour and a half now and I have come up dry.
    Windows XP does recognize the ipod when the cable is connected, and the ipod flashes, "Do not disconnect", which it is supposed to do.
    I suspect this is drivers/software, but I have no idea where to go from here.
    Help?

    Hey!
    That EXACT thing happened to me! 2 nights ago I'm downloading like crazy, all is well. I got on LimeWire and downloaded some videos and tried to put them on my iPod. Imported them into iTunes then tried to put em on my iPod and it completely wiped out all my songs! So I get back on, put the songs back in, and about half way through the update the thing freezes. I've re-installed everything, and have reset my iPod. Did you figure out what to do? Maybe your fix will fix my problem, too.
    Thank you!

  • Video and computer freeze.

    My computer was working great for the longest time. Then all of a sudden, my video freezes (you tube and sites that use flash are really bad for freezing) and the sound repeats very fast (like a CD skipping but faster). I have done all the updates, tried firefox, chrome, and IE7, 8, 9 and 10. I removed my Radeon HD 6850 card from my tower and still freezes with on board video. Any help is appreciated. Windows 7 proffesional 64 bit IE 10. Intel Core I7, 12 gigs RAM.

    I believe that error code does indeed imply a fan motor issue.  That's what the "4MOT" means.  I don't know how to decode the rest but that info may indicate which fan is failing.  Not knowing how to decode that means you will have to try to inspect the fans yourself to see if they are all spinning.  I think the only fix may be to replace the failing fan.  And if that fan still fails you may have a logic board problem.  Either way, not good news.  Sorry.
    Obviously I suggest you only try to inspect the fans when your machine starts behaving strangely again.   Don't forget to check the fan in the video card too.
    I'm assuming that when you say your machine freezes it hasn't had a thermal shutdown.  In a thermal shutdown all the fans except a single exhaust fan will indeed stop.  I'm basing this on my personal experience where my 5870 video card's fan wouldn't always spin up because it couldn't overcome its starting friction.  The card would overheat, and the machine would shut down due to the thermal cutoff, all except a single exhaust fan.  A new 5870 fixed my problem.  But I'm mention this because it obviously doesn't make any sense to check the fans when the machine has this kind of cutoff.  So I hope all your fans are still running when your machine freezes -- except the errant one of course.

  • Explorer and Computer freezes after installation of Creative Cloud

    First I had a hard time installing the programs, because the downloads always froze and I had to do it over and over. From the first start of the adobe application manager my computer were stopping, froze in and did not shut down anymore. And I have trouble using the internet, because my explorer is freezing all the time, too. Than I have to restart the whole system, until it freezes again. And the Computer as always been resetted the hard way, what brings up the Windows "the computer did not shut down..." screen and is really anoying.
    System HP with 10 Gigs Memory, Intel I7 quad processor, 3600 mhz, Windows 7, NVIDIA 620

    No issus with Win 7 before, no error messages.  The computer starts normal, stays normal, as long as I do not use one of the Adobe products. I can start all programs, work with the programs, go into the internet, shut it down normal. As soon as I work with a application from adobe, I can use the programs, work with them , but as soon, as I try to go to the internet, i get no connection. Shutting down does not work, the computer freezes on the "shutting down" screen. Disconect power, start again, I can find no other reason than the Adobe Application manager, but creative cloud needs this thing on to work. As long as this thing is not in use, every thing is normal. I was trying ti re-install , but it did not change. The manager also keeps to "forget" my Adobe ID and is asking for it over and over.

  • Slow boot up and computer freezes...???

    hey all. This problem just started this week. I think it might be due to the 10.4.10 update. anyway, i noticed that the boot up time is considerably slow now. during startup w/ the gray screen and the apple logo in darker gray, that little clock face with it blinking clockwise shows up below the apple logo. this normally happens when i upgrade the software... but its happening everytime i boot up the computer.
    also, the computer freezes up... once when i was watching a movie on quicktime and i moved the mouse to see how much time left in the movie. the other time, when i was listening to music andi moved the mouse. the screen gets darker, but not totally black, like the computer is saving power and a message saying that i have to hold the power button down for at least 5 seconds to turn off the computer. the message is in two other languages. this happened in a period of two days....
    any idea on what could be the problem and how i go about solving it??
    thanks!

    Hello,
    First thing that comes to mind is... how much free hard drive space do you have? To view this information, open a Finder window. The information is the bottom of the window. Never allow the drive to have less than 15% free hard drive space because that will slow down your Mac faster then anything else.
    Ok... it's freezing up on you. Grab your system restore disk(s). Make sure your Mac is turned off. Now, press the power button, hold down the C key and insert the restore disk all at the same time. Let go off the C key when you see the Apple logo on your screen. Now, by default the Installer window will open. Quit the Installer from the Menu and instead click Utilities/Disk Utility. When DU opens, select MacintoshHD in the panel on the left. Then click Verify. If DU reports errors on the drive, click Repair. Now, while you have DU open, also, Repair Disk Permissions.
    Get Onyx. It's a great disk FREE utility and can fix a myriad of problems. You can download it right from the Apple site here:
    http://www.apple.com/downloads/macosx/systemdiskutilities/onyx.html
    The message you are seeing is called a "kernel panic" and you can find information for that here: http://docs.info.apple.com/article.html?artnum=25392
    Hopefully something has helped!
    Carolyn Happy 4th! Fireworks are going off here all across the bay as I type

  • Iphoto causes half my screen to be reversed (screen split with the right side half now on the left side) and computer freezes. Any suggestions about a fix?

    iphoto causes half my screen to be reversed (screen split with the right side half now on the left side and the left hand side on the right.) and screen gets multiple blurry copies. Also the computer freezes. Any suggestions about a fix? Can I delete iphoto and reinstall? If so, will I lose my photos?

    Please post a screenshot that shows what you mean. Be careful not to include any private information.
    Start a reply to this message. Click the camera icon in the toolbar of the editing window and select the image file to upload it. You can also include text in the reply.

  • Spinning Beach Ball and computer freeze

    Tonight I continually receive the spinning beach ball. The computer freezes and I need to do a hard shutdown. I have run repair permissions several times. I do receive the modified and no repaire messages. I have traced message lines on the forum and it does not appear to be a serious issue. However, it does not change the fact I repeatedly get the spinning beach ball and after some period of time need to do a hard shutdown. At first this took place in Aperture only, but it did he same thing in other applications as well.
    Any thoughts? What do I need to do to resolve the issue?
    Thanks

    Start with http://www.thexlab.com/faqs/sbbod.html

  • My macbook pro suddenly freezes; screen turns off and computer freezes.  Have to hard restart.  Error message appears upon restart, saying something about kernel, etc.  Can anyone please help on this issue?

    For the past month or more I've encountered what I consider to be quite a serios problem with my Macbook pro.  The laptop suddenly freezes without warning, the screen turns black, while the hard drive apparently stals and the system no longer responds.  The only way to resolve this issues is to restart the computer via a hard reset.  After restarting, an error message box shows up asking me to report the error, which I've already done on numerous occassions.  The problem occurs at a frequency of 1 every 2-3 days, sometimes more often than that.  The error message that comes up is very complicated but contains some key words amongst which includes "kernel."  This makes me believe that it's an issue with the video card, and was wondering how I can remediate this problem so as to get the normal function of my laptop back.  If anyone can be of any help, I would greatly appreciate it.
    Andrei

    For the past month or more I've encountered what I consider to be quite a serios problem with my Macbook pro.  The laptop suddenly freezes without warning, the screen turns black, while the hard drive apparently stals and the system no longer responds.  The only way to resolve this issues is to restart the computer via a hard reset.  After restarting, an error message box shows up asking me to report the error, which I've already done on numerous occassions.  The problem occurs at a frequency of 1 every 2-3 days, sometimes more often than that.  The error message that comes up is very complicated but contains some key words amongst which includes "kernel."  This makes me believe that it's an issue with the video card, and was wondering how I can remediate this problem so as to get the normal function of my laptop back.  If anyone can be of any help, I would greatly appreciate it.
    Andrei

  • My screen goes black and computer freezes.  I know this is a software based problem.  Any suggestions?

    About a month ago I installed an Intego software package on my computer.  After it was installed my computer began to randomly freeze.  The freezing would start with the screen going black and then fans spinning up.  Closing the screen didn't help.  Only rebooting did.  I took my Macbook to a repair service and they said that the hardware was perfectly fine.  They recommended a full wipe and reinstall.  I have since uninstalled Intego and for about a week my computer seemed fine.  Since then, however it has started acting up again.  I'm thinking about doing the wipe and reinstall of ML but am hesistant.  Any suggestions what I can do to avoid that?

    Hello nattygrimm,
    I was looking into the issue you are describing and found a great resource to try and fix the issue without having to re install the OS. It is an article called Mac OS X: How to troubleshoot a software issue found here: http://support.apple.com/kb/HT1199.
    I recommend starting here:
    The first and easiest test to try is to see if the issue affects a different user account on your Mac. Each user account has customized preferences and other items stored in its home directory. You'll first need to create an additional user if one does not already exist (follow steps a-h below). Then, log out of the current user and test the issue in the new user account.
    If this resolves the issue, there may be an issue with a file in the home directory of the original user account.
    From the Apple menu, choose System Preferences.
    From the View menu, choose Accounts (or choose Users if using Mac OS X v10.2 or earlier).
    Click "+" (or click New User if using Mac OS X v10.2 or earlier).
    Give the new user a name and short name.
    Mac OS X v10.3 or earlier only: Click the Password tab, and give the user a password.
    Mac OS X v10.3 or earlier only: Click Security.
    Select the checkbox for "Allow user to administer this computer". This makes the user account an administrator.
    Click OK, or quit System Preferences.
    Work your way down the article as needed.
    All the best,
    Sterling

  • ITunes crashes and computer freezes

    Over the past month or so when working on my computer iTunes has suddenly stopped playing and I'm confronted with the spinning beachball of death.  Every other application freezes and I can't even force quit.  The only option I have is to switch off and restart.  Is anyone else having the same problem ?  Are there problems with the latest version of iTunes ?  Is there some syncing problem with iCloud causing this ?  Can anyone offer some advice ?
    Thanks
    Colin

    Having found a working library file it may pay to copy it into the standard location and reconnect to it there. See Empty/corrupt iTunes library after upgrade/crash for the steps I would normally have given.
    tt2

  • Color lines on my cinema display and computer freezes.

    I just bought a 2.8 dual quad-core mac pro and a 23 inch cinema display 2 days ago and I've been having small color lines show up on my screen after running the computer for about an hour. It usual happens when im in safari or firefox. and when it does happen the computer totally freezes. Im not able to force quit or do anything except restart from the power button. This happens again after about an hour or 2 and i have to do it all over again. Any idea why this happens before i lug the computer back to the store? thanks...
    I'm running mac os x 10.5.1, ATI Radeon HD 2600, 2 gig of ram

    My new Mac Pro (2.8 2 x Quad) has also frozen a number of times since day one. The details are over on xlr8yourmac.com with others who are experiencing the same issue.
    I usually only get a small spot of screen corruption around the mouse pointer - about the size of a postage stamp - when the freeze happens, but 3 times the screen (30" HC CD) has become totally corrupt with many wavy lines and artifacts running thru it. The mouse pointer stays moveable in all cases, and background processes continue although I cannot force quit or restart in any other way than hitting the power button. Has happened twice in five minutes and then not once for as many as 3 days... seems to have no rhyme or reason.
    I also have one of the freezing Aluminum iMacs with the very similar Radeon 2600 Pro card; the behavior was almost identical. Apple eventually released a firmware update that fixed the issue, and I find it hard to believe they would have brought the faster XT card to market without thorough testing, but... it's beginning to seem that they have.

  • ITunes and Computer freeze when connecting 160GB iPod classic

    160 GB iPod Classic
    Model: MC293LL
    Version: 2.0.4 PC
    iTunes version: 11.1.3
    computers: 1 Win8 desktop,
                     1 Win7 Home Premium, Service Pack 1 Notebook
    since yesterday I started having trouble with my iPod. When connecting it to the Notebook it showed a message: "There's a problem with this device. Scan the drive now and fix it". After clicking on scan and trying to fix the problem the notebook froze, so I connected it to me desktop, and it worked, it said that the problem was fixed. But when trying to open the iTunes it froze and after disconnecting it I realised the music was gone. So I connected it again, the same "There's a problem with this device. Scan the drive now and fix it"-message showed, but at the end the computer said it didn't detect any problem with the drive, so I opened iTunes and restored the iPod, and it worked but after that iTunes froze, then Windows Explorer and then the whole computer. Tried to connect the iPod to the Win7 Notebook and the same thing happened, first iTunes froze and then the computer froze, they both didn't show the blue screen.
    What can I do? The iPod was already restored to the factory settings.

    i had the same problem. all i did was download the newest version of itunes, which i had been putting off for months because it takes so long. after i did this itunes worked fine for me
    hope this helps

  • 13" MBP Screen glitches and computer freezes when I hold it wrong...

    Sorry for the newbie question. I just got my MBP and ordered the Kingston 8gb deal on buy.com last week. After install I noticed if I pick up the computer and hold it on the right hand side almost underneath the option button, the screen glitches and turns into a bunch of colored lines then crashes. I have to hold the power button down to shut it off then restart. I kind of feel a little bit of give at that area...is that a known issue or does it have anything to do with the new 3rd party ram? Please help!

    Hi c,
    You may want to follow this thread: https://discussions.apple.com/thread/3275447?tstart=0
    And look over to the right of this where it says "More Like This" >>>>>

  • ITunes and computer freezes when syncing

    My iPod and iTunes work fine separately, but when I sync my iPod, it'll sync a couple songs/photos/videos and then suddenly freeze which freezes my entire task bar. I use windows vista and itunes 7.6.1 and I haven't had this problem before.. What's the deal?

    I have this exact same problem and cannot figure out a solution to it. It has happened twice to me.
    First time it happened was around Christmas. All of a sudden, I could not sync the iPod any more as my system froze when attempting to do so. iPod and iTunes worked fine apart. I dug through the whole system and could never get it to work. The only thing that I could do was to move everything to a different box. I lost all of my history in doing that, though.
    Now, in the past couple of days, the same issue has started again on the 2nd box. I've reinstalled iTunes, I've started everything with a base config (only required system services running), I've tried old iTunes libraries...nothing works, it still syncs for a bit and then everything freezes. I enabled disk use and then ran a disk check on the iPod. It found some errors and corrected them. I guess I could erase the iPode to factory standards and then try syncing again, but I did this when the issue occurred the first time and it didn't solve the problem.
    Any insight anyone can give into this issue would be greatly appreciated.

Maybe you are looking for