Problem with soundfonts (Vien

Hi.
I recently got a Sound Blaster Li've! 24-bit external and installed it on my portable, but I try lo use Vienna (or aLi've), and I get problems such as "No soundfont compatible device detected." or "Could not load audition soundfont, please check your device and audition bank settings."
Please, is very important to me to have this fixed, I spent some money on it and all for having my soundfonts working.
Thanks for your help.

Up!
Need desperately to solve this!

Similar Messages

  • Problem with soundfonts

    cubase does not export my soundfonts
    I try to export a finished song to wav. It does all audio and also
    my midi drums (battery) , but it does not export my midi
    soundfonts ?

    >cubase does not export my soundfonts
    Try a cubase forum - this is an Audition forum, after all...

  • Vienna sound font problem with audigy

    HiI have "audigy LS" installed, but it is not compatable with the "vienna sound font".Which Sound Blaster sound card would I need, and would it be an improvement over my existing card. Thanks

    I suppose that, all other models but Audigy LS and Value are SoundFont capable ... just check the Creative web resouces (product pages) or user's guides (support - produc documentation) for those cards you're interested in ... there'll you see a list of bundled software ... if you see soundfont bank manager software listed there then the card is (normally) SF capable but, if you also need a MIDI I/O for external MIDI keyboard Cntroller then, those systems w/ external I/O Dri've/Console are the only choices (from Creative brand) for you.
    EDIT:
    If you have installed the Kontakt Player which comes w/ Sibelius software, you'll get better results w/ that compared to SoundFonts which ones comes w/ Soundblaster cards. To get some noticeable improvements into Sibelius sound quality, you need to buy some quality soundfont banks. Also, for Kontakt, you can buy some extra soundlibraries as like the GPO Garritan Orchestra Sibelius Edition and Pop & Rock Collection, which both adds plenty of quality instruments to choose from.
    - http://www.sibelius.com/products/gpo_sibelius/index.html
    - http://www.sibelius.com/products/rock_and_pop/index.html
    jutapaMessage Edited by jutapa on 02-6-200708:0 PM

  • Some problems with 3 counters on PCI 6601

    Good afternoon,
    after a lot of time i'm here yet.
    The problem with the PCI 6601 aren't finished in sense that i have tried a lot of solution but my sistem crashed after some acquisition.
    The code that  had write on Visual Basic 6 are :
    'Inizializzo la scheda PCI-6601
    Public Sub init_6601(NumSens As Integer)
    Dim edge As DAQmxEdge1
    On Error GoTo ErrorHandler
        MyChannel(NumSens) = "My Channel" & NumSens            'Definisce il nome per il canale (optional)
        'Creo i tre task che servono per il funzionamento del programma
        DAQmxErrChk DAQmxCreateTask("", taskHandle(NumSens))
        'Questa funzione serve a creare il canale dalla quale poi viene effettuata la misura
        If (NumSens = 0) Then
            DAQmxErrChk DAQmxCreateCIPulseWidthChan(taskHandle(NumSens), "Dev1/ctr1", MyChannel(NumSens), 0.00001, _
            0.0009, DAQmx_Val_TimeUnits3_Seconds, DAQmx_Val_Edge1_Rising, "") ' DAQmx_Val_TimeUnits3_Ticks, DAQmx_Val_Edge1_Rising, "")
        ElseIf (NumSens = 1) Then
            DAQmxErrChk DAQmxCreateCIPulseWidthChan(taskHandle(NumSens), "Dev1/ctr2", MyChannel(NumSens), 0.00001, _
            0.0009, DAQmx_Val_TimeUnits3_Ticks, DAQmx_Val_Edge1_Rising, "") 'DAQmx_Val_TimeUnits3_Seconds, DAQmx_Val_Edge1_Rising, "")
        Else
            DAQmxErrChk DAQmxCreateCIPulseWidthChan(taskHandle(NumSens), "Dev1/ctr3", MyChannel(NumSens), 0.00001, _
            0.0009, DAQmx_Val_TimeUnits3_Seconds, DAQmx_Val_Edge1_Rising, "")
        End If
        DAQmxErrChk DAQmxSetReadReadAllAvailSamp(taskHandle(NumSens), False)
        'Con questa funzione si sincronizza il timebase della scheda con il segnale da leggere
        DAQmxErrChk DAQmxSetCIPulseWidthDigSyncEnable(taskHandle(NumSens), MyChannel(NumSens), True)
        'DAQmxErrChk DAQmxSetReadOverWrite(taskHandle(NumSens), DAQmx_Val_OverwriteMode1_OverwriteUnreadSamps)
        'DAQmxErrChk DAQmxCfgSampClkTiming(taskHandle(NumSens), "", 100000, DAQmx_Val_Rising, DAQmx_Val_AcquisitionType_ContSamps, 10000)
        'provare queste due funzioni per aspettare che il campione sia realmente disponibile.
        'La seconda èdovrebbe essere quella che da il migliore compromesso tra uso CPU e velocità.
        'DAQmxErrChk DAQmxSetReadWaitMode(taskHandle(NumSens), DAQmx_Val_WaitMode_WaitForInterrupt)
        'DAQmxErrChk DAQmxSetReadWaitMode(taskHandle(NumSens), DAQmx_Val_WaitMode_Yield)
        'Setta il numero di campioni da acquisire ogni volta che va in lettura e
        'il modo di lettura. Si è impostato "contsamps" per avere la lettura continua
        'La dimensione del buffer è determinata da quel 10000 che va messo così secondo le specifiche del daqmx
        DAQmxErrChk DAQmxCfgImplicitTiming(taskHandle(NumSens), DAQmx_Val_AcquisitionType_ContSamps, 10000) 'DAQmx_Val_AcquisitionType_ContSamps
        'La scheda NI PCI 6601 ha soltanto un canale per il DMA (Direct Memory Access) quindi non riesco a leggere
        'contemporaneamente tre task per volta. Quindi devo attivare un meccanismo diverso per la lettura
        'basato sugli interrupt, ogni volta che ho una lettura automaticamente leggo il dato
        DAQmxErrChk DAQmxSetCIDataXferMech(taskHandle(NumSens), MyChannel(NumSens), DAQmx_Val_DataTransferMechanism_Interrupts)
        'La funzione di seguito serve semplicemente per leggere il campione più recente generato
        DAQmxErrChk DAQmxSetReadRelativeTo(taskHandle(NumSens), DAQmx_Val_ReadRelativeTo_MostRecentSamp)
        'La seguente funzione è complementare ad una utilizzata nell'inizializzazione e serve per impostare la lettura
        'sull'ultimo campione generato
        DAQmxErrChk DAQmxSetReadOffset(taskHandle(NumSens), -1)
        DAQmxStartTask taskHandle(NumSens)
        taskIsRunning(NumSens) = True
    Exit Sub
    ErrorHandler:
        For i = 0 To 2
            If taskIsRunning(i) = True Then
                DAQmxStopTask taskHandle(i)
                DAQmxClearTask taskHandle(i)
                taskIsRunning(i) = False
            End If
        Next i
        MsgBox "Error: " & Err.number & " " & Err.Description, , "Error"
    End Sub
    For the reading i use :
            DAQmxErrChk DAQmxReadCounterF64(taskHandle(NumSens), -1, 0.5, temp(NumSens, 0), 10000, ReadSamp(NumSens), ByVal &O0)
    Well, my problem are very simple, I want an continuos acquisition on three channel and the input signal's frequency that i have to measure is 1 kHz .
    when i try to keep 2 channel after some cycles appears the error -200141 (buffer overwriting). Why?
    The read function is called some times every ms and evry time keep out an different value, even if that are impossible because the input signal is at 1 kHz, and why the buffer fill up? What is wrong in my code?
    Thanks in advance for your help
    Have a nice day!!
    Igor Piero Prato

    HI Igor84,
    Error 200141 occurs when the data acquisition device acquires data faster than the computer can read it from the FIFO (first-in-first-out) input buffer.
    You can see this document:
    Error 200141 Occurs When Doing Buffered Event Counting
    http://digital.ni.com/public.nsf/allkb/83656593DCF​1FB0F862570B6004D7222?OpenDocument
    and this forum :
    Buffer Overflow -200141
    http://forums.ni.com/t5/Measurement-Studio-for-VC/​Buffer-Overflow-200141/m-p/607234
    I hope that these links can help you.
    Regards

  • Problems with SB Live 5.1 - Soundfo

    Hello,
    I got problems with my Soundblaster 5.. Since some weeks it doesn`t work. if i play any sound, i `didn`t hear it. When i use the Onboardsound, all works correctly! then i install the SB, deactivate onboard sound on the BIOS and install the newest drivers, it doesn`t work... I try the "Diagnostics" and the tool say, that the Soundfonts not ok, but what can I do to repair it's?
    Greetings, Sebastian
    btw: Sry for the bad english
    edit: I try to correct the error (the button on the diagnostics tool), then it says that any files are incorrect..
    Message Edited by blueColt on 03-9-2008 09:57 AMMessage Edited by blueColt on 03-9-2008 09:57 AM

    I have the same problem with the SB li've 5. surround card. My computer installs the SB li've game port but not the multimedia - audiocontroller.
    It's a oem card can anyone help me what to do because no I don't have any sound at all .
    Greetings Chrizzzzz

  • Who has no problem with Audigy2Zs Platinum Card what configuration are you usi

    Since upgrading to Audigy2Zs Platinum,I've had a host of problem not experience on my previous Audigy's which were simply set-it and forget-it. SO, I'm interested in YOUR configurations, speakers, creative apps, and dvd player since I mostly use my rig to view DVD's. my config is;
    PowerDvD 6 Deluxe with all audio paks, set to Spdif
    THX console: 5., analog, 96 Khz, speaker above monitor, Volume Balance Adj ALL 6.0"
    EAX Console: preset Garage.
    Surround Mixer: Volume, Bass, Treble 75%(-7.5db). Wave, Speakers Volume controls 00%.
    Speakers Klipsch Promedia 5. THX.
    Rig: ALienware 2002 Area-5, P4 2.5 with Intel MBO.
    HOw 'bout it!
    regards,
    AL

    ASUS P4P800 Deluxe (Intel SATA RAID controller, VIA IDE RAID controller)
    Intel 3 GHz P4 HT (Socket 478)
    SB Audigy 2 ZS Platinum
    GB Corsair DDR 3200 RAM
    ATI Radeon x800 XT All-In-Wonder 256MB AGP 8x
    Sony 8x DVD Recorder (all formats up to +DL)
    Sony 52x32x52 CD-RW/6x DVD-ROM Dri've
    (2) 20 GB Maxtor SATA HDD (RAID 0)
    (2) 80 GB Maxtor ATA HDD (2MB Cache, RAID 0)
    80 GB Maxtor ATA HDD (Standard config on VIA controller)
    Antec Soho Server tower running an Antec 480W NEOPower power supply
    After my last reconfig, I tried to load the drivers for the sound card. I kept getting a problem with the computer restarting in mid-install. After finishing the install in Safe Mode, I went to load a midi file and my computer restarted without warning. After trying to upgrade to the new beta drivers, my computer restarted once more (stopping at the soundfont driver). Apparently, the SoundFont drivers no longer work in my setup. I'm currently using the MS GS Wavetable Synth for MIDI.

  • Problems with LP9 and VSL

    I've been having some problems with Vienna Symphonic Library (Special Edition) and LP9. I'm trying to create an orchestral template using some of the settings from the Special Edition Demo provided on the VSL site. About half the time I've tried to import the tracks (using the media browser) Logic has stalled/crashed. I have been able to get all the files imported, but now I have two more problems. Logic has crashed most of the times I've tried to reopen this template. Also, when I am able to open the file I'm getting a huge spike in the meter for one of my cores while using the VSL instruments. Playing notes with any of the instruments selected causes a noticeable spike, but each time I select a new instrument and play it adds to the spike, such that after playing notes in several instruments the meter is maxed out (as shown in pic). Pressing play and then stop temporarily corrects the spike, but it returns over an over.
    I know that having a software instrument selected is more strenuous on the system, but it shouldn't cause a cumulative build-up as I have described, right? My system specs are as in my signature, and both the activity monitor and VSLs instrument plugins show that I have 2GB+ RAM available. My buffer is set to 256. This may not be a VSL specific issue, as I have seen unusually high spikes using other sampler instruments, but not to the same extent. The spike always appears in the last core.
    Any thoughts/trouble shooting tips? Thanks.

    I'm still wondering why it happens now at this moment in time...
    PC does seem to be a bit odd & inconsistent, the few times I've tested with it, at least so far as we content filtering goes; and if I remember rightly, you're not the first to report previously ok settings suddenly preventing some or all internet until pc is switched off altogether.
    It may work when re-enabled

  • Problems with Audigy ZS & AudioHQ

    Hello friends, my name is Rafael, I am from Brazil! I have a Problem with my new sound card Audigy 2 Platinum ZS. She is already installed and working, but in AUDIOHQ she is not appearing the icon of SoundFonts as appeared when I had a Creative Li've. The correct would be to appear equal to this LINK: http://www.digit-life.com/articles/audigyplatinumex/audiohq.gif but in mine sound card only appears DEVICE CONTROLS and EAX CONTROL PANEL. What do I make to appear SOUNDFONTS there? I need that urgently, thanks to all! :smileytongue:

    Hello Jason! Again I come to thank you and pass the address of the site of my band, in the section HOME at the end of the page you will find my gratitude for your attendance, thank you!
    http://bandaincoma.com.br
    See yaa!

  • Audio latency problem with VST, SONAR and Audigy 4 PRO

    Hello all,
    I have a slight problem with audio performance on my computer and I can't isolate what is wrong. I am using Cakewalk SONAR 4 studio edition, and a recently purchased Audigy 4 Pro soundcard. ( I know it's not quite professional grade, but it works well for me) I recently bought some string instruments from the Vienna Symphonic Library. So far, I love the sound of these "virtual instruments" if you will. The problem comes when I try to record them. I get stuttering and dropouts when I try to record the track in Sonar. I've tried the WDM drivers in 16 and 24 bit modes and the ASIO drivers (which apparently only support 16 bit!?) I know Creative has mentioned that these cards can record easily at 24/96 which is what I'd like if possible. Vienna instruments come in a 24 bit format. Is there something I'm doing wrong or do I need to seriously consider a different soundcard? I use Sonar to bring in the Vienna instruments as a VST. I also apply a reverb on it. When I just play this stuff on my MIDI keyboard, it all sounds great and keeps up. The moment I go to record though, I get dropouts after about 15 seconds or so. Also, is there no way to get ASIO 24 bit support for creative's consumer level cards? I'd be happy with the WDM's personally if those would work. I've looked into the KX project as well but haven't had a chance to try their drivers yet. On a different note, what are the significant differences between ASIO and WDM if any at all? (aside from supported bit rates) My current computer setup is quite powerful and I don't use much CPU power at all so I don't think it's my setup. Intel E6700 (2.67Ghz) Core 2 Duo, 2GB DDR2-800, 320GB Seagate SATA in RAID 1, Nvidia 7600GT, and Creative Audigy 4 Pro. Any help, or insight would be greatly appreciated!
    Matthew

    Audigy 4 Pro should support 24-bit/96 kHz w/ ASIO --> have you selected those I/O drivers in Sonar audio settings (Options-Audio-Drivers -tab). ! You need to unselect all I/O drivers first to get those 24/96 drivers selectable)?
    Dropouts comes from various sources. Have you checked if the read/write caching is set properly (Sonar, try different settings)?
    Stuttering may come from shared IRQ/resources and PCI Latency settings.
    If your graphics card is not PCIe then, make this registry tweak
    Run regedit and search the key named as DisableProgPCILatency
    - set all 'DisableProgPCILatency' key values to 1 (HEX or DEC) (1 = disabled, 0 = enabled)
    - boot to BIOS settings and find the "PCI latency timer" option --> set its value to 32 or 64 (this is global PCI latency setting)
    - reboot
    and check the IRQ situation. If there are IRQ shares between Audigy and other devices/controllers, try to get those fixed by disabling unneeded controllers/devices or by moving the Audigy into another PCI slot (PCI slots #3 and #4 are normally not shared).
    Couple meaninful differences between WDM/KS and ASIO are;
    - you can't get latency lower than 10 ms w/ WDM/KS (well, you can in Sonar by manually editing those buffer values but, the result is not good when you go under 10 ms buffer values (buffersize / samplerate * 1000 = latency in ms --> 512/96000*1000=5.33ms)
    and
    - you can record from one stereo (you can split this to two mono) source at a time w/ WDM (recording source is set in CT Surround Mixer (or windows recording controls))
    - ASIO supports (Audigy serie) locked 'resolutions' only - 16/48 or 24/96
    Also, tweak your system for music - http://www.musicxp.net/
    Some information on CT ASIO -
    http://forums.creative.com/creativel...essage.id=1726
    jutapa
    Message Edited by jutapa on 12-17-200606:01 PM

  • Strange problems with memory dimms(Banks) in imac 27in mid2010

    Hello dear Apple community. I had a really strange problem with memory dimms(modules anyway)
    I have one really good imac 27in with i7 but as you know after some years the lcd screen became yellowish and cloudy
    So i decided to clean it as i have some knowledge and i did that to others lcd screens with success.
    OK so after successfully cleaning and working like new ( i mean not the external screen with magnets but the lcd internally)i started it.
    Before dismantling my memory was 16gb ( 4x4 dimms)
    After starting it a strange problem arise without any reason! Memory reduced TO 8 GB!!!! memory banks on the right as we seeing it didnt worked at all
    and it was not from dimms because i swapped them..!!!
    So after a lot of thinking and asking tech guys to take a second opinion all the saying (including me that logic board failed for some strange reason.
    Some days before i installed CCleaner and also Onyx because after a lot of installations and uninstallations my mac became a little sluggish..
    I thought that some serious preferences files removed or some hardware settings deleted with Onyx ( is very good and powerful program that can fix the pc and also destroy it in a second) so i removed and reset all preferences. But nothing changed.. So i put a new hard drive and reinstall OXS to see if something can change.
    After formating HD to appleHFS+ saw system profiler that still couldn't see all banks(16gb). I remove logic board and i put another processor i7 that i have as a back up and still nothing( some saying that only these 2 things must be faulty if memory banks not working , processor an logic board and sometimes reinsatlling OS can fix it as i mentioned before. But still nothing...
    So from my nerves and after so much testings and no sleeping for 2 days as it was working i pulled off the memory modules from the right bank i put them again ( off course nothing changed) and i close it. After i restarted it like a miracle finally i saw that i have again 16gb in system profiler!!
    Tech guys here please give me an explanation to this because i gooing crazy! What happened and after i pulled off the dimms while it was working the problem fixed?? It is not recomended at all this action. I forgot to mention that i did Apple hardware test and nothing found..
    Sorry for long post.

    Okay great news...  My memory problems are solved and my Mac Mini is now running at 8 gigs of Ram. I tried the suggested DD3 1333 which  the computer wouldn't even recognize.
    So after visiting the Apple Store in the Fair Oaks VA shopping mall; they suggested that I try DDR3 8500 ram.    I visited Micro Center in Vienna VA, and I purchased BGreg's Suggested Crucial Brand Ram.  10 minutes after I got home the Mac Mini booted on the 1st try with 8 gigs of Ram.
    Some venting that Apple hopefully will read and mention to their resellers....
    The people in the Apple section of MicroCenter in Vienna at first argued that the Mac Mini only supports 4 gigs. EVEN AFTER I SHOWED THEM THE SPECS on the Apple website.  The clerk (who I am calling a clerk because by no means was he a "specialist") even suggested that the Apple site was wrong.  On a later visit to MicroCenter to purchase the DDR3 8500, that the people at Apple recomended; Microcenter even suggested and argued that I needed DDR3 1333 and NOT DD3 8500.  THIS WAS AFTER I TOLD THEM THAT Mac Mini WOULD NOT RECOGNIZE the DD3 1333 Dimms.   Working in retail myself I don't go along with the concept that the customer is always right, however in this instance clearly I was.
    I should point out that some of the staff in Microcenter really do try hard, however like with any business it only takes a few "know it all" bad examples to turn customers off.
    Curious post thought; I wasted about $75 in gas driving to and from Microcenter because of their bad advice. 

  • A problem with threads

    I am trying to implement some kind of a server listening for requests. The listener part of the app, is a daemon thread that listens for connections and instantiates a handling daemon thread once it gets some. However, my problem is that i must be able to kill the listening thread at the user's will (say via a sto button). I have done this via the Sun's proposed way, by testing a boolean flag in the loop, which is set to false when i wish to kill the thread. The problem with this thing is the following...
    Once the thread starts excecuting, it will test the flag, find it true and enter the loop. At some point it will LOCK on the server socket waiting for connection. Unless some client actually connects, it will keep on listening indefinatelly whithought ever bothering to check for the flag again (no matter how many times you set the damn thing to false).
    My question is this: Is there any real, non-theoretical, applied way to stop thread in java safely?
    Thank you in advance,
    Lefty

    This was one solution from the socket programming forum, have you tried this??
    public Thread MyThread extends Thread{
         boolean active = true;          
         public void run(){
              ss.setSoTimeout(90);               
              while (active){                   
                   try{                       
                        serverSocket = ss.accept();
                   catch (SocketTimeoutException ste){
                   // do nothing                   
         // interrupt thread           
         public void deactivate(){               
              active = false;
              // you gotta sleep for a time longer than the               
              // accept() timeout to make sure that timeout is finished.               
              try{
                   sleep(91);               
              }catch (InterruptedException ie){            
              interrupt();
    }

  • Problem with Threads and a static variable

    I have a problem with the code below. I am yet to make sure that I understand the problem. Correct me if I am wrong please.
    Code functionality:
    A timer calls SetState every second. It sets the state and sets boolean variable "changed" to true. Then notifies a main process thread to check if the state changed to send a message.
    The problem as far I understand is:
    Assume the timer Thread calls SetState twice before the main process Thread runs. As a result, "changed" is set to true twice. However, since the main process is blocked twice during the two calls to SetState, when it runs it would have the two SetState timer threads blocked on its synchronized body. It will pass the first one, send the message and set "changed" to false since it was true. Now, it will pass the second thread, but here is the problem, "changed" is already set to false. As a result, it won't send the message even though it is supposed to.
    Would you please let me know if my understanding is correct? If so, what would you propose to resolve the problem? Should I call wait some other or should I notify in a different way?
    Thanks,
    B.D.
    Code:
    private static volatile boolean bChanged = false;
    private static Thread objMainProcess;
       protected static void Init(){
            objMainProcess = new Thread() {
                public void run() {
                    while( objMainProcess == Thread.currentThread() ) {
                       GetState();
            objMainProcess.setDaemon( true );
            objMainProcess.start();
        public static void initStatusTimer(){
            if(objTimer == null)
                 objTimer = new javax.swing.Timer( 1000, new java.awt.event.ActionListener(){
                    public void actionPerformed( java.awt.event.ActionEvent evt){
                              SetState();
        private static void SetState(){
            if( objMainProcess == null ) return;
            synchronized( objMainProcess ) {
                bChanged = true;
                try{
                    objMainProcess.notify();
                }catch( IllegalMonitorStateException e ) {}
        private static boolean GetState() {
            if( objMainProcess == null ) return false;
            synchronized( objMainProcess ) {
                if( bChanged) {
                    SendMessage();
                    bChanged = false;
                    return true;
                try {
                    objMainProcess.wait();
                }catch( InterruptedException e ) {}
                return false;
        }

    Thanks DrClap for your reply. Everything you said is right. It is not easy to make them alternate since SetState() could be called from different places where the state could be anything else but a status message. Like a GREETING message for example. It is a handshaking message but not a status message.
    Again as you said, There is a reason I can't call sendMessage() inside setState().
    The only way I was able to do it is by having a counter of the number of notifies that have been called. Every time notify() is called a counter is incremented. Now instead of just checking if "changed" flag is true, I also check if notify counter is greater than zero. If both true, I send the message. If "changed" flag is false, I check again if the notify counter is greater than zero, I send the message. This way it works, but it is kind of a patch than a good design fix. I am yet to find a good solution.
    Thanks,
    B.D.

  • Problem with threads running javaw

    Hi,
    Having a problem with multi thread programming using client server sockets. The program works find when starting the the application in a console using java muti.java , but when using javaw multi.java the program doesnt die and have to kill it in the task manager. The program doesnt display any of my gui error messages either when the server disconnect the client. all works find in a console. any advice on this as I havent been able to understand why this is happening? any comment would be appreciated.
    troy.

    troy,
    Try and post a minimum code sample of your app which
    does not work.
    When using javaw, make sure you redirect the standard
    error and standard output streams to file.
    Graeme.Hi Graeme,
    I dont understand what you mean by redirection to file? some of my code below.
    The code works fine under a console, code is supposed to exit when the client (the other server )disconnects. the problem is that but the clientworker side of the code still works. which under console it doesnt.
    public class Server{
    ServerSocket aServerSocket;
    Socket dianosticsSocket;
    Socket nPortExpress;
    ClientListener aClientListener;
    LinkedList queue = new LinkedList();
    int port = 0;
    int clientPort = 0;
    String clientName = null;
    boolean serverAlive = true;
    * Server constructor generates a server
    * Socket and then starts a client threads.
    * @param aPort      socket port of local machine.
    public Server(int aPort, String aClientName, int aClientPort){
    port = aPort;
    clientName = aClientName;
    clientPort = aClientPort;
    try{
    // create a new thread
    aServerSocket = new ServerSocket(port) ;
    // connect to the nPortExpress
    aClientListener = new ClientListener(InetAddress.getByName(clientName), clientPort, queue,this);
    // aClientListener.setDaemon(true);
    aClientListener.start();
    // start a dianostic port
    DiagnosticsServer aDiagnosticsServer = new DiagnosticsServer(port,queue,aClientListener);
    // System.out.println("Server is running on port " + port + "...");
    // System.out.println("Connect to nPort");
    catch(Exception e)
    // System.out.println("ERROR: Server port " + port + " not available");
    JOptionPane.showMessageDialog(null, (e.toString()),"ERROR: Server port " + port + " not available", JOptionPane.ERROR_MESSAGE);
    serverAlive = false;
    System.exit(1);
    while(serverAlive&&aClientListener.hostSocket.isConnected()){
    try{
    // connect the client
    Socket aClient = aServerSocket.accept();
    //System.out.println("open client connection");
    //System.out.println("client local: "+ aClient.getLocalAddress().toString());
    // System.out.println("client localport: "+ aClient.getLocalPort());
    // System.out.println("client : "+ aClient.getInetAddress().toString());
    // System.out.println("client port: "+ aClient.getLocalPort());
    // make a new client thread
    ClientWorker clientThread = new ClientWorker(aClient, queue, aClientListener, false);
    // start thread
    clientThread.start();
    catch(Exception e)
    //System.out.println("ERROR: Client connection failure");
    JOptionPane.showMessageDialog(null, (e.toString()),"ERROR: Client connection failure", JOptionPane.ERROR_MESSAGE);
    }// end while
    } // end constructor Server
    void serverExit(){
         JOptionPane.showMessageDialog(null, "Server ","ERROR: nPort Failure", JOptionPane.ERROR_MESSAGE);
         System.exit(1);
    }// end class Server
    *** connect to another server
    public class ClientListener extends Thread{
    InetAddress hostName;
    int hostPort;
    Socket hostSocket;
    BufferedReader in;
    PrintWriter out;
    boolean loggedIn;
    LinkedList queue;      // reference to Server queue
    Server serverRef; // reference to main server
    * ClientListener connects to the host server.
    * @param aHostName is the name of the host eg server name or IP address.
    * @param aHostPort is a port number of the host.
    * @param aLoginName is the users login name.
    public ClientListener(InetAddress aHostName, int aHostPort,LinkedList aQueue,Server aServer)      // reference to Server queue)
    hostName = aHostName;
    hostPort = aHostPort;
    queue = aQueue;
    serverRef = aServer;      
    // connect to the server
    try{
    hostSocket = new Socket(hostName, hostPort);
    catch(IOException e){
    //System.out.println("ERROR: Connection Host Failed");
    JOptionPane.showMessageDialog(null, (e.toString()),"ERROR: Connection to nPort Failed", JOptionPane.ERROR_MESSAGE);     
    System.exit(0);
    } // end constructor ClientListener
    ** multi client connection server
    ClientWorker(Socket aSocket,LinkedList aQueue, ClientListener aClientListener, boolean diagnostics){
    queue = aQueue;
    addToQueue(this);
    client = aSocket;
    clientRef = aClientListener;
    aDiagnostic = diagnostics;
    } // end constructor ClientWorker
    * run method is the main loop of the server program
    * in change of handle new client connection as well
    * as handle all messages and errors.
    public void run(){
    boolean alive = true;
    String aSubString = "";
    in = null;
    out = null;
    loginName = "";
    loggedIn = false;
    while (alive && client.isConnected()&& clientRef.hostSocket.isConnected()){
    try{
    in = new BufferedReader(new InputStreamReader(client.getInputStream()));
    out = new PrintWriter(new OutputStreamWriter(client.getOutputStream()));
    if(aDiagnostic){
    out.println("WELCOME to diagnostics");
    broadCastDia("Connect : diagnostics "+client.getInetAddress().toString());
    out.flush();
    else {       
    out.println("WELCOME to Troy's Server");
    broadCastDia("Connect : client "+client.getInetAddress().toString());
         out.flush();
    String line;
    while(((line = in.readLine())!= null)){
    StringTokenizer aStringToken = new StringTokenizer(line, " ");
    if(!aDiagnostic){
    broadCastDia(line);
    clientRef.sendMessage(line); // send mesage out to netExpress
    out.println(line);
    out.flush();
    else{
    if(line.equals("GETIPS"))
    getIPs();
    else{
    clientRef.sendMessage(line); // send mesage out to netExpress
    out.println(line);
    out.flush();
    } // end while
    catch(Exception e){
    // System.out.println("ERROR:Client Connection reset");
                             JOptionPane.showMessageDialog(null, (e.toString()),"ERROR:Client Connection reset", JOptionPane.ERROR_MESSAGE);     
    try{
    if(aDiagnostic){
    broadCastDia("Disconnect : diagnostics "+client.getInetAddress().toString());
    out.flush();
    else {       
    broadCastDia("Disconnect : client "+client.getInetAddress().toString());
         out.flush();
    // close the buffers and connection;
    in.close();
    out.close();
    client.close();
    // System.out.println("out");
    // remove from list
    removeThreadQueue(this);
    alive = false;
    catch(Exception e){
    // System.out.println("ERROR: Client Connection reset failure");
    JOptionPane.showMessageDialog(null, (e.toString()),"ERROR: Client Connection reset failure", JOptionPane.ERROR_MESSAGE);     
    }// end while
    } // end method run
    * method run - Generates io stream for communicating with the server and
    * starts the client gui. Run also parses the input commands from the server.
    public void run(){
    boolean alive = true;
    try{
    // begin to life the gui
    // aGuiClient = new ClientGui(hostName.getHostName(), hostPort, loginName, this);
    // aGuiClient.show();
    in = new BufferedReader(new InputStreamReader(hostSocket.getInputStream()));
    out = new PrintWriter(new OutputStreamWriter(hostSocket.getOutputStream()));
    while (alive && hostSocket.isConnected()){
    String line;
    while(((line = in.readLine())!= null)){
    System.out.println(line);
    broadCast(line);
    } // end while
    } // end while
    catch(Exception e){
    //     System.out.println("ERRORa Connection to host reset");
    JOptionPane.showMessageDialog(null, (e.toString()),"ERROR: Connection to nPort reset", JOptionPane.ERROR_MESSAGE);
    try{
    hostSocket.close();
         }catch(Exception a){
         JOptionPane.showMessageDialog(null, (a.toString()),"ERROR: Exception", JOptionPane.ERROR_MESSAGE);
    alive = false;
    System.exit(1);
    } // end method run

  • Problem with threads and camera.

    Hi everybody!
    I've a problem with taking snapshot.
    I would like to display a loading screen after it take snapshot ( sometimes i
    have to wait few seconds after i took snapshot. Propably photo is being taken in time where i have to wait).
    I was trying to use threads but i didn't succeed.
    I made this code:
    display.setCurrent(perform);               
            new Thread(new Runnable(){
                public void run() {               
                    while((!performing.isShown()) && (backgroundCamera.isShown())){
                        Thread.yield();
                    notifyAll();
            }).start();
            new Thread(new Runnable(){
                public void run() {
                    try {
                        this.wait();                   
                    } catch(Exception e) {
                        exceptionHandler(e);
                    photo = camera.snapshot();                               
                    display.setCurrent(displayPhoto);
            }).start();This code is sometimes showing performing screen but sometimes no.
    I don't know why. In my opinion performing.isShown() method isn't working correctly.
    Does anyone have some idea how to use threads here?

    Hi,
    I've finally managed to work this fine.
    The code:
           Object o = new Object();
           display.setCurrent(perform);               
            new Thread(new Runnable(){
                public void run() {               
                    while(!performing.isShown()){
                        Thread.yield();
                   synchronized(o) {
                      o.notify();
            }).start();
            new Thread(new Runnable(){
                public void run() {
                    try {
                        synchronized(o) {
                           o.wait(1);
                    } catch(Exception e) {
                        exceptionHandler(e);
                    photo = camera.snapshot();                               
                    display.setCurrent(displayPhoto);
            }).start();

  • Problem with threads hanging

    We have a problem where our application stops responding after a few days of usage. Things will for fine for a day or two, and then pretty quickly threads will start getting hung up, usually in places where they are allocating memory
    We are running WebLogic 8.1 SP2 on Sun JDK 1.4.2_04 on Solaris 8 using the alternate threading model and the -server hotspot vm. We are running pretty much the same code that we had no problems with under WebLogic 6.1 SP4 and Sun JDK 1.3.1.
    A thread dump usually shows that some or all of our execute threads are in the state "waiting for monitor entry" even though they are not currently waiting on any java locks. Here is a sample thread from the thread dump (we have ~120 threads so I don't want to post the full dump).
    =============================================================================================
    "ExecuteThread: '8' for queue: 'itgCrmWarExecutionQueue'" daemon prio=5 tid=0x005941d0 nid=0x2c waiting for monitor entry [c807f000..c807fc28]
    at java.lang.String.substring(String.java:1446)
    at java.lang.String.substring(String.java:1411)
    at weblogic.servlet.internal.ServletRequestImpl.getRelativeUri(ServletRequestImpl.java:1872)
    at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3492)
    at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2585)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)
    =============================================================================================
    String.java line 1446 for this jdk allocates a new String object, and all the other threads in this state also are creating new objects or arrays, etc.
    We've done a pstack on this process when it's in this state, and the threads that are in the "waiting for monitor entry" that look like they're allocating memory are all waiting on the same lwp_mutex_lock with some allocation method that's calling into the native TwoGenerationCollectorPolicy.mem_allocate_work (see pstack output below for the same thread as in the thread dump above)
    =============================================================================================
    ----------------- lwp# 44 / thread# 44 --------------------
    ff31f364 lwp_mutex_lock (e3d70)
    fee92384 __1cNObjectMonitorGenter26MpnGThread__v_ (5000, 525c, 5000, 50dc, 4800, 4af0) + 2d8
    fee324d4 __1cSObjectSynchronizerKfast_enter6FnGHandle_pnJBasicLock_pnGThread__v_ (c807f65c, c807f7d4, 5941d0, 0, 35d654, fee328ec) + 68
    fee32954 __1cQinstanceRefKlassZacquire_pending_list_lock6FpnJBasicLock__v_ (c807f7d4, ff170000, d4680000, 4491d4, fee1bc2c,
    0) + 78
    fee3167c __1cPVM_GC_OperationNdoit_prologue6M_i_ (c807f7bc, 4400, ff170000, 2d2b8, 4a6268, c807fa18) + 38
    fee2e0b0 __1cIVMThreadHexecute6FpnMVM_Operation__v_ (c807f7bc, 963a8, 0, 0, 1, 0) + 90
    fed2c2a4 __1cbCTwoGenerationCollectorPolicyRmem_allocate_work6MIii_pnIHeapWord__ (962c0, ff1c29ec, ff1c297c, ff131a26, 4800, 4998) + 160
    fed22940 __1cNinstanceKlassRallocate_instance6MpnGThread__pnPinstanceOopDesc__ (ee009020, 5941d0, 15ca581, 3647f0, 4a6268, c807f8c8) + 180
    fed34928 __1cLOptoRuntimeFnew_C6FpnMklassOopDesc_pnKJavaThread__v_ (ee009018, 5941d0, 0, 0, 0, 0) + 28
    fa435a58 ???????? (ee009018, e86de, 15ca4de, 50dc, 5941d0, c807f9c8)
    fb36f9a4 ???????? (0, d412ccd8, ee046c28, ff170000, 0, 0)
    fad8b278 ???????? (ee046c28, d6000c90, ee046530, 8, db8e8450, c807f9e8)
    fad62abc ???????? (d412ccd8, ee046530, d6000c90, ee3bfa38, 8, c807fa18)
    fa4b3c38 ???????? (c807fb9c, 0, f2134700, fa415e50, 8, c807faa8)
    fa40010c ???????? (c807fc28, c807fe90, a, ee9e1e20, 4, c807fb40)
    fed5d48c __1cJJavaCallsLcall_helper6FpnJJavaValue_pnMmethodHandle_pnRJavaCallArguments_pnGThread__v_ (c807fe88, c807fcf0, c807fda8, 5941d0, 5941d0, c807fd00) + 27c
    fee4b784 __1cJJavaCallsMcall_virtual6FpnJJavaValue_nLKlassHandle_nMsymbolHandle_4pnRJavaCallArguments_pnGThread__v_ (ff170000, 594778, c807fd9c, c807fd98, c807fda8, 5941d0) + 164
    fee5e8dc __1cJJavaCallsMcall_virtual6FpnJJavaValue_nGHandle_nLKlassHandle_nMsymbolHandle_5pnGThread__v_ (c807fe88, c807fe84, c807fe7c, c807fe74, c807fe6c, 5941d0) + 6c
    fee6fc74 __1cMthread_entry6FpnKJavaThread_pnGThread__v_ (5941d0, 5941d0, 838588, 594778, 306d10, fee69254) + 128
    fee6927c __1cKJavaThreadDrun6M_v_ (5941d0, 2c, 40, 0, 40, 0) + 284
    fee6575c _start   (5941d0, fa1a1600, 0, 0, 0, 0) + 134
    ff3758c0 lwpstart (0, 0, 0, 0, 0, 0)
    =============================================================================================
    Also when it's having this problem, the "VM Thread" is always using a lot of processor time. We did a couple of pstacks today while it was having this problem, and this thread was stuck in the ONMethodSweeper.sweep for over 15 minutes when we finally killed the server.
    From the thread dump:
    "VM Thread" prio=5 tid=0x000e2d20 nid=0x2 runnable
    From the first pstack:
    =============================================================================================
    ----------------- lwp# 2 / thread# 2 --------------------
    fed40c04 __1cXvirtual_call_RelocationIparse_ic6FrpnICodeBlob_rpC5rppnHoopDesc_pi_nNRelocIterator__ (42a2f4, fa5fa46d, ffffffff, fc4ffcb8, 42a2f4, 42a324) + 124
    fed46318 __1cKCompiledIC2t5B6MpnKRelocation__v_ (42a2f0, fc4ffd24, fc4ffd4c, e802, 0, 6) + 38
    fed90c38 __1cHnmethodVcleanup_inline_caches6M_v_ (fa5f7f88, fa608940, 1, 0, fa400000, 6) + 1ac
    fede18b4 __1cONMethodSweeperFsweep6F_v_ (2cf38, 0, ffffffff, ff1cf1fc, ff1c66e8, fede1d44) + 1b0
    fede1e6c __1cUSafepointSynchronizeFbegin6F_v_ (2cf38, ff1ba138, 5000, 50dc, 5000, 525c) + 248
    feef1fd4 __1cIVMThreadEloop6M_v_ (4400, 4000, 4324, 4000, 42b0, 3800) + 3d4
    feef1ae4 __1cIVMThreadDrun6M_v_ (e2d20, 2, 40, 0, 40, 0) + 8c
    fee6575c _start   (e2d20, ff270200, 0, 0, 0, 0) + 134
    ff3758c0 lwpstart (0, 0, 0, 0, 0, 0)
    =============================================================================================
    Second pstack
    =============================================================================================
    ----------------- lwp# 2 / thread# 2 --------------------
    fed41180 __1cXvirtual_call_RelocationIparse_ic6FrpnICodeBlob_rpC5rppnHoopDesc_pi_nNRelocIterator__ (0, ff1b9664, ffffffff, fc4ffcb8, a6f2cc, fc4ffbd0) + 6a0
    fed46318 __1cKCompiledIC2t5B6MpnKRelocation__v_ (a6f2c8, fc4ffd24, fc4ffd4c, e802, 0, 6) + 38
    fed90c38 __1cHnmethodVcleanup_inline_caches6M_v_ (faded4c8, fadf2c80, 1, 0, fa400000, 6) + 1ac
    fede18b4 __1cONMethodSweeperFsweep6F_v_ (2cf38, 0, ffffffff, ff1cf1fc, ff1c66e8, fede1d44) + 1b0
    fede1e6c __1cUSafepointSynchronizeFbegin6F_v_ (2cf38, ff1ba138, 5000, 50dc, 5000, 525c) + 248
    feef1fd4 __1cIVMThreadEloop6M_v_ (4400, 4000, 4324, 4000, 42b0, 3800) + 3d4
    feef1ae4 __1cIVMThreadDrun6M_v_ (e2d20, 2, 40, 0, 40, 0) + 8c
    fee6575c _start   (e2d20, ff270200, 0, 0, 0, 0) + 134
    ff3758c0 lwpstart (0, 0, 0, 0, 0, 0)
    =============================================================================================
    Has anyone ever seen anything like this? I'm trying to figure out if this is caused by something we're doing, or something relating to our environment and jvm options. Any ideas?

    Thanks for the reply - I'm testing our app with the +UseConcMarkSweepGC now in our test environment to make sure it doesn't cause any problems there.  Unfortunately the only place we've had this problem is on the production server, so it's extra difficult debugging this. 
    We're using the following memory options:
    -ms512m -mx512m -XX:NewSize=128m -XX:PermSize=192m -XX:MaxNewSize=128m -XX:MaxPermSize=192m -XX:SurvivorRatio=8and the following debugging options, as we've also been seeing OutOfMemoryErrors ( see http://forum.java.sun.com/thread.jsp?forum=37&thread=522354&tstart=45&trange=15 )
    -verbosegc -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+PrintHeapAtGCBTW, which c++filt version and options are you using? Our Solaris boxes only seem to have the GNU version installed. I was trying to run that on some of the other stack traces and wasn't getting anywhere, and didn't know if because it was GNU version wouldn't work on something compiled with the Sun compiler.
    Thanks!
    --Andy                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

Maybe you are looking for