Df and du strange behaviour

Hi folks,
One of my friend asked a question as he faced this problem with his server running Solaris 10.
He says that "the output of du showing only 50% of root file system usage and the output of df showing full 100% disk usage of root file system"
Can anyone help me to analyse the reasons for this

Your friend must have deleted files that were still opened by the kernel. If you delete a file that is in use, it will delete the i-node from the directory structure and will not show up in a du calculation anymore. However, the disk space is still in use and reported as such by the df command.
You have two options to rectify this situation:
1. Find the process that has the open file that was deleted and terminate the process. This will free up the file handle and the space will become free to the kernel
2. Reboot the system.

Similar Messages

  • APEX Listener and EPG - strange behaviour

    Hi
    For some years, I've used EPG for APEX but have struggled with performance particularly as I can have up to 150 student developers using at any one time.
    I do a fair amount of work using ORDImage and have successfully developed APEX applications to upload image files and display full-size and thumbnail images.
    After upgrading to APEX 4.1 (from 4.0), I decided to install APEX Listener standalone.
    Before I did so I checked that my applications still worked in 4.1 and they did.
    However, just installing APEX Listener but not configuring it (yet) has meant that my image display in a report using a procedure based on wpg_docload.download_file( l_ordimage_image.source.localData ) no longer works in EPG - the images are not displayed.
    Configuring APEX Listener and running the same application through that DOES display the images.
    So this part of the application works under APEX Listener but not under EPG.
    My application also allows users to upload images from APEX_APPLICATION_FILES using standard code. Under APEX Listener after uploading, I'm left with a blank page with a wwv_flow.accept URL although the image does indeed upload. Under EPG it works as expected and I get a success confirmation.
    So this part of the application works under EPG but not under APEX Listener.
    Has anyone else come across different behaviour depending on the mode of connection?
    Thanks
    Brian
    [Oracle EE 11gR2, Windows Server 2008R2, APEX 4.1, APEX Listener 1.1.3]

    Hi Brian,
    it sounds like you have both EPG and APEX Listener running on the same machine, so your problem might result from a port conflict. Note that both services use TCP port 8080 as default.
    At least a port conflict would explain the strange behaviour in your case, some things working on one web server and some on the other.
    Some parts of your initial post hint to that direction, e.g.
    However, just installing APEX Listener but not configuring it (yet) has meant that my image display in a report using a procedure based on >wpg_docload.download_file( l_ordimage_image.source.localData ) no longer works in EPG - the images are not displayed.... because the APEX Listener only interfere with the EPG if it is at least running on the same machine as your database and furthermore, if it is unconfigured in terms of ist database connection, a port conflict might be the only way it could cause anything like that.
    However, if you are sure that's not the issue, please check if you see any error in the APEX Listener's log for the following action you performed:
    My application also allows users to upload images from APEX_APPLICATION_FILES using standard code. Under APEX Listener after uploading, I'm left with a blank >page with a wwv_flow.accept URL although the image does indeed uploadIf you actually see just a blank screen, something very bad must have happened and you should see some kind of stack trace there.
    For further investigations, if necessary, it would be helpful to know how you deployed or started your APEX Listener and which JDK version you use.
    For the moment, I still think the port conflict is my best guess.
    You could avoid it by either changing the port for EPG (I'd not recommend that if you have other users still using it) or by changing the port for your APEX Listener.
    -Udo

  • JPublisher and BPEL strange behaviour

    I use code generated by JPublisher for BPEL process with endpoint http://bbm.local.com/orabpel/default/activation/1.0/activation?wsdl to call BPEL process from DB Oracle 10g.
    There are more than one versions of BPEL process (more than one endpoints) on server.
    When I call PL/SQL procedure with correlation parameter for running instance of BPEL process, it receives message even when the instance is running on another endpoint.
    For example there is running 3 instances of process activation
    1. instance with version 1.0 and correlation parameter 1000
    2. instance with version 1.1 and correlation parameter 1001
    3. instance with version 1.2 and correlation parameter 1002
    Default version is 1.2.
    Code was generated with endpoint of version 1.0.
    I call procedure with correlation parameter 1001 and message is normally received by BPEL process.
    Is this normal behaviour? What is the matter of endpoint in generation process?
    Many Thanks.

    I'm experiencing the exact same issue than Corin. I don't know what's making the problem appear, but I usually need to restart to fix the problem. Also when I tried to drag something from iTunes I couldn't use the escape method as Corin mentioned before.
    I already re-installed Mac OS X and after a couple of hours the problem came back again. It doesn't seem like a hardware problem because once I tried to restart my MAC and a program stopped it from doing it... and then I noticed that my mouse was fixed again.
    I don't know what can be the issue, but does this mean I need to make a clean install of Mac OS X?

  • Application freezing and recovering & Strange behaviour in Thread Dump & GC

    Hi All,
    I am facing a problem in my SWINGS application. The application is a real time data streaming application its working in TCP/IP sockets, which is reading and writing data in string format. I noticed that the data streaming getting freeze sometimes and it recovers after a few minutes. To find out why it is behaving like that i took the Thread Dump and Garbage Collection Trace of the application and found some thing strange. Find below the line taken from the Thread Dump, the third line in the log below shows that the time have jumped backwards, I don't know why that happened.
    2009-03-12 17:07:48
    Full thread dump Java HotSpot(TM) Client VM (1.6.0-b105 mixed mode, sharing):
    2009-03-12 17:07:57
    Full thread dump Java HotSpot(TM) Client VM (1.6.0-b105 mixed mode, sharing):
    *2009-03-12 17:04:08*
    Full thread dump Java HotSpot(TM) Client VM (1.6.0-b105 mixed mode, sharing):
    2009-03-12 17:04:15
    Full thread dump Java HotSpot(TM) Client VM (1.6.0-b105 mixed mode, sharing):
    2009-03-12 17:04:28
    Full thread dump Java HotSpot(TM) Client VM (1.6.0-b105 mixed mode, sharing):
    Almost during the same time in Garbage Collector log, normally the garbage collector was running multiple times a second and during that time the frequency of garbage collection reduced. please find the details below
    3682.686: [GC 28265K->25644K(41312K), 0.0009666 secs]
    3682.731: [GC 28268K->25645K(41312K), 0.0009825 secs]
    3682.817: [GC 28269K->25647K(41312K), 0.0010381 secs]
    3682.934: [GC 28271K->25649K(41312K), 0.0009364 secs]
    3682.943: [GC 28273K->25649K(41312K), 0.0008954 secs]
    3682.985: [GC 28273K->25650K(41312K), 0.0008845 secs]
    3683.037: [GC 28274K->25651K(41312K), 0.0008747 secs]
    3683.199: [GC 28275K->25651K(41312K), 0.0010448 secs]
    *3698.250: [GC 28275K->25728K(41312K), 0.0009655 secs]*
    *3720.655: [GC 28352K->25867K(41312K), 0.0010588 secs]*
    *3743.011: [GC 28491K->26000K(41312K), 0.0015047 secs]*
    *3765.935: [GC 28624K->26130K(41312K), 0.0010180 secs]*
    *3788.487: [GC 28754K->26260K(41312K), 0.0011328 secs]*
    *3810.348: [GC 28884K->26402K(41312K), 0.0010091 secs]*
    *3832.596: [GC 29026K->26523K(41312K), 0.0010373 secs]*
    *3855.048: [GC 29147K->26652K(41312K), 0.0010029 secs]*
    *3877.230: [GC 29276K->26795K(41312K), 0.0010387 secs]*
    *3899.420: [GC 29419K->26915K(41312K), 0.0009959 secs]*
    3922.146: [GC 29539K->27042K(41312K), 0.0010088 secs]
    3922.201: [GC 29666K->27043K(41312K), 0.0010297 secs]
    3922.231: [GC 29667K->27046K(41312K), 0.0008521 secs]
    3922.260: [GC 29670K->27048K(41312K), 0.0009208 secs]
    3922.269: [GC 29672K->27048K(41312K), 0.0009831 secs]
    3922.298: [GC 29672K->27049K(41312K), 0.0008867 secs]
    3922.308: [GC 29673K->27050K(41312K), 0.0009264 secs]
    can any one please explain whats happening, I am getting no clue from these
    Thanks in Advance
    Rajin Das
    Edited by: rajindas on Mar 16, 2009 6:40 PM

    Have you used any profilers to analyze the logs? It is very difficult to read it just like that.
    I use IBM Monitoring and Diagnostic Tools for Java™. I think it does support Sun and IBM JVMs. Try out and let me know how it goes.

  • WP8.1 MDM Remote Reset PIN and Lock Strange behaviour

    Hi, I have the following issue when sending LockAndResetPin more than once without unlocking the device inbetween.
    >Issue sequential exec on LockAndResetPIN and get on NewPINValue, phone locks and new PIN is in response OK.
    >Access device with new PIN, works OK.
    >Issue sequential exec on LockAndResetPIN and get on NewPINValue, phone locks and new PIN is in response OK.
    >Issue sequential exec on LockAndResetPIN and get on NewPINValue, this time the LockAndResetPIN returns a 500 error and the NewPIN is null.  Even though LockAndResetPIN failed, the previous PIN returned no longer works and you have to wipe the device.
    It does state in the doc that the generated pin may be offensive and therefore you can execute LockAndResetPIN again - however it seems that this causes some nasty behavior.

    Just to update on this issue - it only appears to happen if there was no passcode set.
    So the following works ok - 
    >Set passcode
    >Reset passcode
    >Reset passcode
    >Enter new pin OK
    >Unset passcode
    >Reset passcode
    >Reset passcode - reset fails and new pin is null
    >Enter pin from first reset and it states incorrect pin and you have to reset
    Thanks
    Scott

  • Move with Repeater:hBox and filterFunction = Strange behaviour

    Hello,
    I fill a hBox with item from a Repeater. Now I have a Button
    that moves the hBox one widht to the right (to the next items).
    To prevent, that the move is going to far I do this:
    [code]
    if (theBox.x > (myDatalist.length*(-208)-(-832))){
    myMove.end();
    myMove.xBy=-832;
    myMove.play();
    [/code]
    This works fine. Now I do a selection with a filterFunction
    and move theBox back to x=0.
    And from now the move is not working anymore. I've made some
    of the stuff to vars to see if there is a math problem, but it is
    not. I have no Idea why this does not work after the
    filterfunction.

    I'm experiencing the exact same issue than Corin. I don't know what's making the problem appear, but I usually need to restart to fix the problem. Also when I tried to drag something from iTunes I couldn't use the escape method as Corin mentioned before.
    I already re-installed Mac OS X and after a couple of hours the problem came back again. It doesn't seem like a hardware problem because once I tried to restart my MAC and a program stopped it from doing it... and then I noticed that my mouse was fixed again.
    I don't know what can be the issue, but does this mean I need to make a clean install of Mac OS X?

  • Uncommanded keypad inputs to iPad, and other strange behaviour.

    I recently downloaded The Planets and The Elements apps on to my iPad. Since then, on occasions the slide to unlock slider will not respond in portrait mode, but will in landscape mode.
    Id addition, intermittantly the ipad starts to respond to phantom keypad inputs. You can see the keys on the virtual keypad responding as if they are being pressed and the random input appearing on the screen. At times sections of tect will highlight and the copy button will flash.
    I have deleted the suspect apps, reset the ipad several times, and have done a full restore, but am still experiencing these intermittant phantom inputs.
    Has anyone else experienced this and how did you fix it?
    this may not be related to the apps mentioned above, but The Elements app was particularly bad, moving between pages at random and uncommanded.

    If you're still getting the same thing after Reset and Restore then, sorry, you've pretty much shot your bolt. Call AppleCare and start the process of swapping your busted piece of gear for a new one.

  • Strange Behaviour after 6.0.2 install

    Hello all,
    This is my first posting to Apple Discussions, so please be kind...
    I recently installed iTunes 6.0.2 via Software Update and noticed strange behaviour while trying to edit a smart playlist. I have a smart playlist set up to select songs between 3 and 5 stars in My Rating, which have not been played in the last four weeks. While trying to edit the star range, I found that I could only select two stars or five stars. If I clicked one star, it changed to two; if I clicked any other number of stars, it changed to five. As a test, I restored the previous iTunes.app from backup and the problem disappeared.
    Anyone have any ideas what might be causing this?
    Thanks,
    Jon

    Hello Web_Diko,
    I'm sorry but I don't know where you can find that package. I take nightly backups of my machine so I just restored the previous version from my backup. Maybe try a search for "iTunes 6.0.1" on Google or on www.apple.com?
    When I mentioned the "privacy thing" I was alluding to the various items about iTunes 6.0.3 "phoning home" with details of what tracks you are playing together with your Apple ID. It doesn't bother me personally, but I think that the complaints are legitimate, because people should be told whenever they install a program that sends information back to the vendor.
    Jon

  • Strange behaviour of same website between 8.0.1 version and 3.6

    I upgraded to 8.1 version today from my previous version 3.6 and found very strange behavior in my own web site. can some one check this issue on real time between the two versions and help me with suggestion? visit http://salesblast.net (in final stages of testing live). create a test drive account and work with cash discounts and this strange behavior can be noticed . in former case the rows will be added to grid and in later case new added row replaces the old row. just a wild guess that the problem in this new version is with session variables. i am using asp.net 3.5

    I still don't know why the resize effect is frozen, but when I unplug my usb mouse, the dock resumes its normal "appear-disappear" behaviour.

  • Strange behaviour when setting client_info and module in v$session

    Hello,
    I've tried to set the CLIENT_INFO field in V$SESSION using DBMS_APPLICATION_INFO.SET_CLIENT_INFO but found a strange behaviour.
    Normally the forms modules seems to set the field MODULE in V$SESSION to its name. If I use DBMS_APPLICATION_INFO.SET_CLIENT_INFO the CLIENT_INFO field is set correctly but the MODULE field is set to 'frmweb.exe' instead of the forms modules name.
    I also tried to set the MODULE using DBMS_APPLICATION_INFO.SET_MODULE but then strangely the MODULE and MODULE_HASH field of the original frmweb.exe (the main applet?) entry and the entry for the forms module were the same (set to the new module name). From now on every newly opened module had 'frmweb.exe' as the module entry until I closed the forms application.
    Example:
    Entries in V$SESSION:
    -- After start of forms application there is only one entry for the process:
    PROCESS           MODULE            MODULE_HASH            CLIENT_INFO
    1596:7204         frmweb.exe        854945150
    -- When a new forms module is opened it looks like this:
    PROCESS           MODULE            MODULE_HASH            CLIENT_INFO
    1596:7204         frmweb.exe        854945150
    1596:7204         my_module         1929284615
    -- When the modified forms module that sets the client_info/module is opened this happens:
    PROCESS           MODULE            MODULE_HASH            CLIENT_INFO
    1596:7204         mod_module        3097977240
    1596:7204         mod_module        3097977240             my client info
    1596:7204         my_module         1929284615As one can see the entry of the forms application seems to be overriden (at least the MODULE and MODULE_HASH fields) but the CLIENT_INFO only changes for one of the entries?
    The following code is responsible for the changes of CLIENT_INFO and MODULE:
        -- get client info
        client_info :=
            webutil_clientinfo.get_ip_address
            || ' (' ||
            webutil_clientinfo.get_user_name
            || ')'
        -- set client info
        DBMS_APPLICATION_INFO.SET_CLIENT_INFO(client_info);
        -- get module (set action to '')
        DBMS_APPLICATION_INFO.SET_MODULE(name_in('system.current_form'),''); I really don't understand, why it does not work properly.
    Any help is appreciated!
    Thanks in advance.

    This was an application module pooling, activation / passivation issue.
    After view objects had been set-up correctly, the problem disappeared.

  • FIM Load Balancing and SPN's - Strange behaviour

    I have a FIM setup in a domain
    I have mycorp.com and a domain in the same forest contractor.mycorp.com (fictional setup)
    I have 2 servers built in the contractors.mycorp.com domain
    Id1
    Id2
    Id1 has the Service and portal on wss3 in SharePoint farm mode, Sp central admin is on this as well
    Id2 has the service and is a load balanced SharePoint farm.
    I have NLB setup and working the service name is identity.mycorp.com pointing at the IP of the NLB
    I have a CNAME identity pointing at identity.mycorp.com
    Identity.mycorp.com is used as the name of the Service and the Portal.
    In the ApplicationHost.config I have
    <system.webServer>
       <security>
          <authentication>
             <windowsAuthentication enabled="true" useKernelMode="true"
    useAppPoolCredentials="true" />
          </authentication>
       </security>
    </system.webServer>
    I have kernel mode enabled, and I have Windows authentication enabled in the IIS console on id1 and id2.
    The app pool credentials are a domain account SPService for SharePoint Service, the app pool is set on both id1 and id2 servers. The root domain account mycorp\SPService us used.
    In
    c:\inetpub\wwwroot\wss\VirtualDirectories
    I have set
    <resourceManagementClient
    requireKerberos="true"
    I have registered the alternate URL mappings for SharePoint as
    Identity
    Identity.myCorp.com
    I have registered SPN's for
    Setspn –S FIMService/identity.myCorp.com myCorp\FIMService
    Setspn –S FIMService/identity  myCorp\FIMService
    Setspn –S HTTP/identity.myCorp.com myCorp\SPService
    Setspn –S HTTP/identity myCorp\SPService
    I have configured delegation for both accounts in ADUC for the identity.mycorp.com
    So all is well and I installed everything fine.
    Now my problem is that if I go to id1 and browse to http://identity/identitymanagement I get redirected , and authenticated with my admin account to
    http://id1/IdentityManagement/default.aspx
    On id1 if I go to http://identity.myCorp.com/identitymanagement I get prompted for credentials, when I enter myCorp\FIMAdmin and my password I get redirected to the portal at
    http://id1/IdentityManagement/default.aspx
    If I try and authenticate to any of the previous URL's from other machines in my domain, including the load balanced box id2 I get "HTTP Error 401. The requested resource requires user authentication."
    Even if I try and browse to
    http://id1/identitymanagement from another machine I am getting 401. Only on
    http://id1 am I getting a result, even if there is a prompt.
    I am sure my SPN's are fine, there are no duplicate SPN's , I checked with the -x switch
    So my load balanced portal and service are not working as I would have thought , I have looked at
    http://blogs.msdn.com/b/webtopics/archive/2009/01/19/service-principal-name-spn-checklist-for-kerberos-authentication-with-iis-7-0.aspx
    http://social.technet.microsoft.com/Forums/en-US/484faae8-4df6-4b81-8b2d-9d75d5258e4f/fim-portal-http-error-401-the-requested-resource-requires-user-authentication?forum=ilm2
    http://social.technet.microsoft.com/wiki/contents/articles/4473.fim-http-error-401-the-requested-resource-requires-user-authentication.aspx
    http://setspn.blogspot.ie/2010/06/kerberos-basic-troubleshooting-tip-3.html
    The only thing that I can think of is that the machine is in the contractors.myCorp.com domain which makes the machine  
    unique from where the SPN's are registered, but if that was the case then browsing to the portal from
    http://id1 would certainly fail.
    Can anyone see anything wrong with my approach ?
    Normally I find SharePoint a pain, but this week it seems to be this.
    When I ran the fim service install I specified identity.myCorp.com as the name of the server
    Rob

    In my Load Balanced setup it helped a lot (on some strange behaviours) when I set up Load Balancer to keep session on one server.
    Borys Majewski, Identity Management Solutions Architect (Blog: IDArchitect.NET)

  • Strange behaviour whit custom JTextField and JToolTip

    Hello everyone. I hope I'm writing in the right section and sorry if I did not search for this issue but I really don't know which keywords I should use.
    I'm using NetBeans 6.1 on WinXP and JDK 1.6.0_07, I have a custom JTextField with regex validation: when you type something that don't mach regex it shows a JToolTip. This JToolTip should disappear when the text typed is finally correct, or when the textfield loses focus (see code below).
    import java.awt.Component;
    import java.awt.Dimension;
    import java.awt.Point;
    import javax.swing.JToolTip;
    import javax.swing.Popup;
    import javax.swing.PopupFactory;
    public class MyJTextField extends javax.swing.JTextField implements FormComponent
    private static Popup popUpToolTip;
    private static PopupFactory popUpFactory = PopupFactory.getSharedInstance();
    private boolean isValidated = false;
    private String regEx = "a regex";
    public MyJTextField()
    this.addKeyListener(new java.awt.event.KeyAdapter()
    public void keyReleased(java.awt.event.KeyEvent evt)
    if(evt.getKeyCode()!=java.awt.event.KeyEvent.VK_ENTER)
    validateComponent();
    else if(evt.getKeyCode()==java.awt.event.KeyEvent.VK_ENTER)
    if(isValidated)
    ((Component)evt.getSource()).transferFocus();
    this.addFocusListener(new java.awt.event.FocusAdapter()
    public void focusLost(java.awt.event.FocusEvent evt)
    if(popUpToolTip!=null){popUpToolTip.hide();}
    public void validateComponent()
    if(text.matches(regex))
    isValidated = true;
    if(popUpToolTip!=null){popUpToolTip.hide();}
    else
    isValidated = false;
    if(popUpToolTip!=null){popUpToolTip.hide();}
    String error = "C'&egrave; un errore nella validazione di questo campo";
    JToolTip toolTip = createToolTip();
    toolTip.setTipText(error);
    popUpToolTip = null;
    popUpToolTip = popUpFactory.getPopup(
    this,
    toolTip,
    getLocationOnScreen().x,
    getLocationOnScreen().y - this.getPreferredSize().height -1
    popUpToolTip.show();
    }(I've cut it a bit, here's only the lines that involve JToolTip use)
    I have many of them in a form, and when the first tooltip appears (on the first textfield I type in) it never disappears, while nex textfields work just fine.It seems the first tooltip appearing can't be overwritten or something similar. If I use this same component on any other NetBeans project, everithing works without issues.
    I have some other custom components working the same way (JComboBox, JXDatePicker), and they had this "not disappearing tooltip" issue since I changed this
    popUpToolTip = popUpFactory.getPopup(this, toolTip, getLocationOnScreen().x, getLocationOnScreen().y - this.getPreferredSize().height -1);
    whit this
    popUpToolTip = popUpFactory.getPopup(null, toolTip, getLocationOnScreen().x, getLocationOnScreen().y - this.getPreferredSize().height -1);
    but if I try it on the JTextField all textfield's tooltips stay stuck there, not only the first one appeared (while other components still works fine).
    This thing is really driving me crazy. Someone has an hint (or a link to another thread) which could explain this strange behaviour?
    Thanks in advance.

    BoBear2681 wrote:
    Note that an SSCCE wouldn't require you to post any proprietary code.Hmmm... well, I'll try again to reproduce the issue and post an SSCCE.
    BoBear2681 wrote:
    That probably indicates that the problem is somewhere other than where you're currently looking.Yes, I suppose so. Maybe it's some interference between all the custom components I created, or maybe something else that apparently doesn't conern at all. If I cannot reproduce it in an SSCCE and I'll figure out what's the cause of this mess I'll post it here for future knowledge.
    Many thanks for your advices. :)

  • LR 1.3.1 strange behaviour: L key adds keywords and removes pictures from collection

    After updating to LR 1.3.1 yesterday I found a very strange behaviour that I cannot explain: While in the Library module and looking at a picture from a collection (in loupe mode) I cycle through the different light modes using the L key. Then suddenly (after several hits of the L key) a keyword is added (not always the same keyword) and at the same time an unknown number of pictures is removed from the collection. The keyword is not added to the picture I was currently viewing, but to another one from the same collection. This has not happened before and I have no idea what is going on. I can restore the collection by relaunching an older catalog but of course this does not solve the problem. Can anybody help?
    (PC, Win XP prof SP 2, 4 Gig RAM)

    It is possible that instead of hitting the l key, or perhaps within the same sequence of hits your are in fact accidentally hitting the k key.
    K is the shortcut for "Add shortcut keyword"
    Of course you would have had to set that particular keyword at some point and it does not explain the different keywords being assigned.
    Unless the alt key was involved somehow and you were rating the images with 1-9 numbers. That would account for different keywords being assigned and would seem arbitrary.
    To check: look at one or two of the images that you may have rated using a number key and then look at the keyword set the keyword came from. Press the alt key and a number from 1-9 will appear next to the keyword. If they match then thats the answer.
    If you weren't rating the images this way then.....??
    Perhaps there is a fault with the keyboard itself rather than the program.
    David

  • Strange behaviour of Mouse-Events and Range size

    Hello,
    i found a strange behaviour of the Paragraph-Ranges in Word and can't explain this myself.
    I have a add-in with a Custom Task Pane "UserControl1" and a button "Button1":
    dropbox.com/s/zz2m0out5rvds0m/word.jpg
    This is the Code for the user control:
    public partial class UserControl1 : UserControl
    public UserControl1()
    InitializeComponent();
    private void button1_Click(object sender, EventArgs e)
    showRanges();
    private void button1_MouseEnter(object sender, EventArgs e)
    showRanges();
    private void showRanges()
    Debug.WriteLine("-------------------------------------");
    foreach (Microsoft.Office.Interop.Word.Paragraph para in Globals.ThisAddIn.Application.ActiveDocument.Paragraphs)
    Debug.WriteLine(para.Range.Start.ToString() + " - " + para.Range.End.ToString() + " | " + para.Range.Text.ToString());
    The mouse-enter and mouse-click events of the button, prints out the ranges of the current paragraphs. In this example it outputs:
    0 - 15 | The first line
    15 - 32 | And a second one
    Thats fine!
    And now the strange stuff starts: When i change something in the first line in the document like "The VERY first line" and use the button again, i got different range outputs for mouse-enter and mouse-click events.
    mouse-enter event (wrong ranges):
    -------------------------------------0 - 143 | The VERY first line
    143 - 160 | And a second one
    mouse-click event (correct ranges):
    0 - 20 | The VERY first line
    20 - 37 | And a second one
    Why the hell I get wrong Ranges when I use the mouse-enter event??? (When I enter the button with mouse a second time, it shows the correct ranges again).

    Hi Torben,
    What is Word version?
    According to my test in Word 2013, the code you provided works fine for me.
    I changed the code as below:
    private void showRanges(string eventname)
    Debug.WriteLine(eventname + "-------------------------------------");
    foreach (Microsoft.Office.Interop.Word.Paragraph para in Globals.ThisAddIn.Application.ActiveDocument.Paragraphs)
    Debug.WriteLine(para.Range.Start.ToString() + " - " + para.Range.End.ToString() + " | " + para.Range.Text.ToString());
    private void button1_MouseEnter(object sender, EventArgs e)
    showRanges("Button MouseEnter");
    private void button1_Click(object sender, EventArgs e)
    showRanges("Button Click");
    The document:
    The output:
    The result is same.
    There might be something else at the end of the first line.
    If you change current document to .zip and find document.xml, what does it look like?
    Here is my document.xml:
    <w:body>
    <w:p w:rsidR="001347D9" w:rsidRPr="001511D8" w:rsidRDefault="001511D8">
    <w:pPr>
    <w:rPr>
    <w:sz w:val="72"/><w:szCs w:val="72"/>
    </w:rPr>
    </w:pPr>
    <w:r w:rsidRPr="001511D8">
    <w:rPr>
    <w:sz w:val="72"/>
    <w:szCs w:val="72"/>
    </w:rPr>
    <w:t>The VERY first line</w:t>
    </w:r>
    </w:p>
    <w:p w:rsidR="001511D8" w:rsidRPr="001511D8" w:rsidRDefault="001511D8" w:rsidP="001511D8">
    <w:pPr>
    <w:rPr>
    <w:sz w:val="72"/><w:szCs w:val="72"/>
    </w:rPr>
    </w:pPr>
    <w:r w:rsidRPr="001511D8">
    <w:rPr>
    <w:sz w:val="72"/>
    <w:szCs w:val="72"/>
    </w:rPr>
    <w:t>And a second one</w:t>
    </w:r>
    <w:bookmarkStart w:id="0" w:name="_GoBack"/>
    <w:bookmarkEnd w:id="0"/>
    </w:p>
    <w:sectPr w:rsidR="001511D8" w:rsidRPr="001511D8">
    <w:pgSz w:w="12240" w:h="15840"/>
    <w:pgMar w:top="1440" w:right="1440" w:bottom="1440" w:left="1440" w:header="720" w:footer="720" w:gutter="0"/>
    <w:cols w:space="720"/>
    <w:docGrid w:linePitch="360"/>
    </w:sectPr>
    </w:body>
    Is there anything different?
    I have uploaded the sample document for your test, please check:
    https://onedrive.live.com/redir?resid=AD77AE76D657E280!166&authkey=!AFfIP0eVTDQdMAc&ithint=file%2cdocx
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Strange behaviour of Runtime.getRuntime().exec(command)

    hello guys,
    i wrote a program which executes some commands in commandline (actually tried multiple stuff.)
    what did i try?
    open "cmd.exe" manually (administrator)
    type "echo %PROCESSOR_ARCHITECTURE%" and hit enter, which returns me
    "AMD64"
    type "java -version" and hit enter, which returns me:
    "java version "1.6.0_10-beta"
    Java(TM) SE Runtime Environment (build 1.6.0_10-beta-b25)
    Java HotSpot(TM) 64-Bit Server VM (build 11.0-b12, mixed mode)"
    type "reg query "HKLM\SOFTWARE\7-zip"" returns me:
    HKEY_LOCAL_MACHINE\SOFTWARE\7-zip
    Path REG_SZ C:\Program Files\7-Zip\
    i wrote two functions to execute an command
    1) simply calls exec and reads errin and stdout from the process started:
    public static String execute(String command) {
              String result = "";
              try {
                   // Execute a command
                   Process child = Runtime.getRuntime().exec(command);
                   // Read from an input stream
                   InputStream in = child.getInputStream();
                   int c;
                   while ((c = in.read()) != -1) {
                        result += ((char) c);
                   in.close();
                   in = child.getErrorStream();
                   while ((c = in.read()) != -1) {
                        result += ((char) c);
                   in.close();
              } catch (IOException e) {
              return result;
         }the second function allows me to send multiple commands to the cmd
    public static String exec(String[] commands) {
              String line;
              String result = "";
              OutputStream stdin = null;
              InputStream stderr = null;
              InputStream stdout = null;
              // launch EXE and grab stdin/stdout and stderr
              try {
                   Process process;
                   process = Runtime.getRuntime().exec("cmd.exe");
                   stdin = process.getOutputStream();
                   stderr = process.getErrorStream();
                   stdout = process.getInputStream();
                   // "write" the parms into stdin
                   for (int i = 0; i < commands.length; i++) {
                        line = commands[i] + "\n";
                        stdin.write(line.getBytes());
                        stdin.flush();
                   stdin.close();
                   // clean up if any output in stdout
                   BufferedReader brCleanUp = new BufferedReader(
                             new InputStreamReader(stdout));
                   while ((line = brCleanUp.readLine()) != null) {
                        result += line + "\n";
                   brCleanUp.close();
                   // clean up if any output in stderr
                   brCleanUp = new BufferedReader(new InputStreamReader(stderr));
                   while ((line = brCleanUp.readLine()) != null) {
                        result += "ERR: " + line + "\n";
                   brCleanUp.close();
              } catch (IOException e) {
                   // TODO Auto-generated catch block
                   e.printStackTrace();
              return result;
         }so i try to execute the commands from above (yes, i am using \\ and \" in java)
    (1) "echo %PROCESSOR_ARCHITECTURE%"
    (2) "java -version"
    (3) "reg query "HKLM\SOFTWARE\7-zip""
    the first function returns me (note that ALL results are different from the stuff above!):
    (1) "" <-- empty ?!
    (2) java version "1.6.0_11"
    Java(TM) SE Runtime Environment (build 1.6.0_11-b03)
    Java HotSpot(TM) Client VM (build 11.0-b16, mixed mode, sharing)
    (3) ERROR: The system was unable to find the specified registry key or value.
    the second function returns me:
    (1) x86 <-- huh? i have AMD64
    (2) java version "1.6.0_11"
    Java(TM) SE Runtime Environment (build 1.6.0_11-b03)
    Java HotSpot(TM) Client VM (build 11.0-b16, mixed mode, sharing)
    (3) ERROR: The system was unable to find the specified registry key or value.
    horray! in this version the java version is correct! processor architecture is not empty but totally incorrect and the reg query is still err.
    any help is wellcome
    note: i only put stuff here, which returns me strange behaviour, most things are working correct with my functions (using the Runtime.getRuntime().exec(command); code)
    note2: "reg query "HKLM\HARDWARE\DESCRIPTION\System\CentralProcessor\0" /t REG_SZ" IS working, so why are "some" queries result in ERR, while they are working if typed by hand in cmd.exe?

    ok, i exported a jar file and execute it from cmd:
    java -jar myjar.jar
    now the output is:
    (1) "" if called by version 1, possible to retrieve by version 2 (no clue why!)
    (2) "java version "1.6.0_10-beta"
    Java(TM) SE Runtime Environment (build 1.6.0_10-beta-b25)
    Java HotSpot(TM) 64-Bit Server VM (build 11.0-b12, mixed mode)"
    (3) C:\Program Files\7-Zip\
    so all three problems are gone! (but its a hard way, as i need both functions and parse a lot of text... :/ )
    thanks for the tip, that eclipse changes variables (i really did not knew this one...)

Maybe you are looking for

  • How do I manually move a playlist from new iTunes to ipod classic?

    My iTunes just updated itself. Now the screen looks totally different. I want to manually move a playlist from the new iTunes to my iPod classic. It worked perfectly yesterday, but now that that the iTunes updated, the page doesn't show my iPod so I

  • Is it possible to rplace the ralink rt 5390 network adaptor for a better one

    I have just bought a compaq presario cq57 ,the problem is that the wireless network adapter is rubbish .I have reset the Bt home hub in every configuration possible ,different channels and different security and i am sitting right next to the router

  • Are pictures embedded in the file?

    Dear community, I'm having an issue with an InDesign file. It's a 160 page catalogue file which weights around 350MB. I did receive it from other graphic designer. It was not packed the way it usually is (zipped with all the typefaces and pictures).

  • DB13 Verify Database error during processing

    Hi Gurus, Need your help on the error encountered when running verify database in DB13. Below is the log: BR0001I ****************__________________________________ BR0395I Verifying /oracle/DV1/sapdata2/sr3_20/sr3.data20 using DBVERIFY... BR0396I Ve

  • This Video Cannot be Played

    Every time I try to play a video on my new G3s iPhone I get an error message "This Movie Cannot be Played" This happens on YouTube, TV.Com, or UStream. No video will play from the internet.