XCode (4.6.3 & 5.0) debug strange behaviour

Hi
I don't often use XCode in debug mode but it used to fulfill all my requirements i.e. the code would stop ON the breakpoint not 2 or 3 lines of C++ code later. Also it would display my local variables correctly. Now it either doesn't display them (just a large L in a cyan box with the varaible name) or in some cases displays them incorrectly (size = 0 when it is anything but zero). Others, oddly, it displays correctly in the debug area.
I can't remember the last version of XCode which worked as I would expect but it was an early 4.6.x or late 4.5.x
I've taken to copying the code over to a Linux system and using gdb to get some useful testing.
Anyone else having this kind of problem?
Chris

erwincoumans wrote:
Shame if we have to reinstall the operating system, just to fix a debug variable display problem.
That would be a shame, since it's extreme, probably unnecessary, and might not even work. Talk about killing a bug with a bazooka...
Minor erratic behavior of this sort is an application settings issue: either settings that are set incorrectly or a corrupt settings plist file. With a smaller, simpler app I'd suggest deleting the preferences plist file (located in ~/Library/Preferences) and then redoing all the settings by hand. With XCode it might take a bit more hunting since there are a lot of settings that could be set incorrectly and (likely) multiple locations where settings data is stored. Check first (as I suggested above) that you are not trying to debug when the project is in a release configuration, and if that's not it look through the application and project settings to see if anything obvious is awry.  Post back if you need to with more information.

Similar Messages

  • Strange behaviour of data element  object

    Dear Gurus,
    I have incremented the field length of a z table's field from 5 (type DEC)  to 8 by increasing the corresponding domain length . But the internal tables that refer to this field still refer to the old value 5, though the table is accepting values for this field with 8 length through 'Create Entries' in SE11.
    The problem seems to be in the runtime object of the corresponding data element which shows
    database length = 5 
    abap length = 5
    BUT dictionary length = 8.
    Could anyone pls help diagnose this strange behaviour as even if I create new domains with new data elements for this table field ,it gives the SAME RUNTIME OBJECT STATUS as mentioned above.
    Rewards are awaiting the right answer.
    Thanks in advance.
    Shweta.

    Hi,
    For these kind of problems, you can use the Database utility tool (SE14), give the table name press enter, click Adjust and Activate Database table also select save data radiobutton. After this Re-Run the Program, it works fine, also cross-check in the Debugging screen.
    Cheers...
    Santosh.
    Mark Usefull Answers.

  • Strange behaviour of Calendar Objects

    Hello folks, you may not believe it but I had a really strange behaviour in my Calendar Objects:
    I have 2 GregorianCalendar Objects, one instantiated by getInstance() for holding a reference for today and a second a user can pick which may or may not lie in the past. With some of my date fields it is allowed to have a past date, with others it is not, that is why I hold the reference for today.
    Then, for getting to know if the picked date is in the past I set the hours, minutes, seconds and milliseconds to 0 before comparing because I was just interested in the day not the time.
    And now comes what I cannot comprehend nor what I was able to fix:
    In the morning hours of the day I programmed this worked great. I gave it to our testers, and some days later I got it back on my desk, it would not work. I tested again in the morning, and it workd. I was confused, let it lay around a few days and tested again, this time in the afternoon. And it worked not ... now I was really confused. Just I had no time to fix it asap and put it aside for the next morning ... when it worked again ... ???
    So I started deep debugging ... and since I already got an idea it could have something to do with the daytime I worked on it in the evening.
    The debugging told me that the milliseconds of the 2 Calendar objects had exactly the same time and date, just different milliseconds in the evening and in the afternoon, but not in the morning. I cannot understand why, maybe one of you?
    I solved it by kicking the millisecond compare and compared year, month and day, so now it works. But it still confuses me why the milliseconds could have differed at all and why not in the morning but just in the afternoon and evening (both Objects are of the same time zone, I checked this, too).
    Rommie.

    I set the hours, minutes, seconds and milliseconds to 0...And you get different results in the morning and the afternoon? Okay, go to the API documentation and read about what the constant Calendar.HOUR means. Look just below it for another constant called Calendar.HOUR_OF_DAY and consider whether you should be using that instead.
    PC²

  • Strange behaviour in "Do - Until" statement

    Hi,
    I'm having a strange behaviour in a script I'm creating. The purpose of the script is to update some files in some folders. In the case that more folders need to use the script, I'm importing the folders name and path from a CSV file (much easier to read
    it from there instead of hardcoding the folders in the code). As you can see, I add a number at the beginning of the folder's name, and then I let them choose which folder number do they want to update.
    # Import from CSV File
    $name = @()
    $path = @()
    $bkpPath = @()
    Import-Csv $AppsFile |
    ForEach-Object {
    $name += $_.Name
    $path += $_.Path
    $bkpPath += $_.bkpPath
    Write-Host "Choose the folder to update:"
    Write-Host ""
    $count = 1
    foreach ($n in $name) {
    Write-Host $count " - " $n
    $count += 1
    Do {$opt = read-host -prompt "Enter the option number"}
    Until ($opt -lt $count -AND $opt -gt 0)
    The problem appears when I started debuging the script, and try to input strange characters. The idea of the "Do - Until" statement, is that the user enters a loop until they choose a correct option. It works ok when it doesn't let you input letters,
    or numbers outside the range I'm using.
    The strange behaviour appears when I enter for example "0." (The important part is the DOT after the zero). There, it sends me to the last option in my CSV file. If I put "<number>.", it reads it as if it were "<number>".
    And if I input a number out of range plus a final dot, it breaks my script (instead of just keep looping as it's supposed to).
    Does anyone even understand the issue? =P It's really strange, I don't know if there is another way to limit the input...
    Thanks,
    Regards

    $opt is a string, and you're trying to compare it to numbers, which is probably going to give you headaches.  I tend to write those types of loops like this:
    $opt = $null
    while ($true)
    $string = read-host -prompt "Enter the option number"
    if ([int]::TryParse($string, [ref]$opt) -and $opt -lt $count -and $opt -gt 0)
    break
    Simply because the validation can get kind of complex sometimes, and I think it's ugly to jam it in after an "until" statement, even though the end result is the same.

  • 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 FileOpenPicker (Crashes)

    Hello,
    I have a strange behaviour of my implementation of FileOpenPicker (use it to select an image file). My Implementation works just fine when debugging my app on my device (Samsung Ativ S with WP 8.1), but when I start my app directly on the phone without debugging
    the FileOpenPicker crashes when calling (I can see the Picker just for a moment..)
    openPicker.PickSingleFileAndContinue()
    I have implemented IFileOpenPickerContinuable on to different pages. I have this strange behaviour only through one of the pages.
    BR,
    juvi
    IFileOpenPickerContinuable
    IFileOpenPickerContinuable

    Hi juvi123,
    Based on your description, I can see that your app works well with debugging but it crashs without debugging. I wonder if you have tried the realse mode. Can you get the same result in the realse mode? I will recommand you uninstall the app on your device,
    then deploy it again to see if you can get the right result.
    Besides, according to the behaviour, it seems that you think this openPicker.PickSingleFileAndContinue() line causes the crash. It may be not caused by this line. So it will be better if you can post the reproduce project and your OS version in here.
    At same time I hope you can do some test in your side to help find the issue, first please try to use the emulator and a different device to test if you can reproduce it. Then since this strange behaviour only happens in one of the pages,
    please try to check the difference between this crash page and others normal pages. You can try to reduce the functions of the crash page to help narrow down this issue.
    Best Regards,
    Amy Peng
    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 in Pentium IV machine

    Hi all. I put this post in Java HotSpot forum, but that forum seems not to be as popular as this, so I've decided to post it here too.
    I've been reading posts in this forum (and another in this site) for more than a week trying to find any idea that could help me with my "strange" problem, but with no success.
    I've developed an application that manages some info stored in Mysql. My developing machine is a Pentium II (400MHz) with Red Hat 7.3 Valhalla installed. I use Mysql 3.23.49 and J/Connector (version 2.0.14) downloaded from Mysql site and JRE version 1.4.1.-b21.
    The production machine is a Pentium IV (1.60 GHz) , with the same Red Hat version, the same JRE version and Mysql 3.23.51.
    Well, in developing machine I am able to run up to 4 instances of the application witout crashing, only decreasing timing performance. But in production machine, I get and "strange" behaviour. Sometimes (1 of each 10 times) the application crashes (even the machine crashes sometimes), and I get Hot Spot log files (hs_err_pid####.log) like these
    Type 1 ------------------------------------->
    Unexpected Signal : 11 occurred at PC=0x403291D8
    Function=skip_method_invoke_and_aux_frames__12vframeStream+0x58
    Library=/usr/java/j2sdk1.4.1/jre/lib/i386/client/libjvm.so
    Current Java thread:
    at java.security.AccessController.doPrivileged(Native Method)
    at sun.io.Converters.getDefaultEncodingName(Converters.java:66)
    at java.lang.StringCoding.decode(StringCoding.java:226)
    at java.lang.String.<init>(String.java:383)
    at com.mysql.jdbc.Buffer.readLenString(Unknown Source)
    at com.mysql.jdbc.MysqlIO.getResultSet(Unknown Source)
    at com.mysql.jdbc.MysqlIO.sqlQueryDirect(Unknown Source)
    at com.mysql.jdbc.MysqlIO.sqlQuery(Unknown Source)
    at com.mysql.jdbc.Connection.execSQL(Unknown Source)
    - locked <0x448f92d0> (a com.mysql.jdbc.jdbc2.IO)
    at com.mysql.jdbc.Connection.execSQL(Unknown Source)
    at com.mysql.jdbc.Statement.executeQuery(Unknown Source)
    - locked <0x448f92d0> (a com.mysql.jdbc.jdbc2.IO)
    at com.mysql.jdbc.jdbc2.Statement.executeQuery(Unknown Source)
    at GeneraTablaDiasCerrados.<init>(GeneraTablaDiasCerrados.java:99)
    at GeneraTablaDiasCerrados.main(GeneraTablaDiasCerrados.java:425)
    Type 2------------------------------------------------>
    Unexpected Signal : 11 occurred at PC=0x424AC980
    Function=sqlQueryDirect (//or nextRow//) (compiled Java code) (or nextRow)
    Library=(N/A)
    Current Java thread: (//No output in this case//)
    Type 3------------------------------------------------------>
    An unexpected exception has been detected in native code outside the VM.
    Unexpected Signal : 11 occurred at PC=0x4212E3B0
    Function=(null)+0x4212E3B0
    Library=java
    NOTE: We are unable to locate the function name symbol for the error
    just occurred. Please refer to release documentation for possible
    reason and solutions.
    Current Java thread:
    at java.net.SocketInputStream.socketRead0(Native Method)
    at java.net.SocketInputStream.read(SocketInputStream.java:129)
    at java.io.BufferedInputStream.fill(BufferedInputStream.java:183)
    at java.io.BufferedInputStream.read(BufferedInputStream.java:201)
    - locked <0x44901b38> (a java.io.BufferedInputStream)
    at com.mysql.jdbc.MysqlIO.readPacket(Unknown Source)
    at com.mysql.jdbc.MysqlIO.sendCommand(Unknown Source)
    at com.mysql.jdbc.MysqlIO.sqlQueryDirect(Unknown Source)
    at com.mysql.jdbc.MysqlIO.sqlQuery(Unknown Source)
    at com.mysql.jdbc.Connection.execSQL(Unknown Source)
    - locked <0x448f92e8> (a com.mysql.jdbc.jdbc2.IO)
    at com.mysql.jdbc.Connection.execSQL(Unknown Source)
    at com.mysql.jdbc.Statement.executeQuery(Unknown Source)
    - locked <0x448f92e8> (a com.mysql.jdbc.jdbc2.IO)
    at com.mysql.jdbc.jdbc2.Statement.executeQuery(Unknown Source)
    at GeneraTablaDiasCerrados.<init>(GeneraTablaDiasCerrados.java:99)
    at GeneraTablaDiasCerrados.main(GeneraTablaDiasCerrados.java:425)
    ---------------------------------------------->
    After this text, I get Dynamic libraries info.
    I can't figure out what's happening. I have read in these forums that Signal 11 is about Segmentation Fault, or JVM trying to write in forbidden positions.
    Later I read that JVM could crash on Pentium IV processors under certain circumstances, but isn't those issues supossed to be fixed in version 1.4.1?
    The last trail I'm following is J/Connector, because in error messages type 2 and 3 are involved mysql classes. But it doesn't explain the fact that in developing machine everything runs properly.
    I also consider the posibility of corrupted files in hard disk, but all of them seem to be OK (sizes in production machine matches those in developing machine).
    Can anyone help me showing me another trail to follow?
    Thanks to all in advance.
    Note: Please, forgive my English and the length of this post.

    Hi OMcGovern. Thanks for your answer.
    I've a couple of theorys,
    1) The second last stack trace call is for encoding.
    The basic US version of the JRE only supports about
    ut 8 basic encoding schemes. You could try running it
    with the international version of the JRE.
    ( To check version : if i18n.jar is in JRE's lib
    directory, it's the international version )I've checked it and I don't have the international version (not in production machine and not in developing machine). I downloaded the "Linux RPM in self-extracting file" version, (in both cases) and there is no choice for downloading any "international" version or something like this. I'll search for it in sun site. It seems to be a good guess to follow, because production machine is allocated in the USA, and developing machine is here in Spain.
    2) Running java -Xint ( interpreted mode ), might
    rule out any hotspot errors. It could give you more
    debugging information too.
    Worth a shot.I'm not running with that option.
    3) It doesn't quite make sense that the last stack
    trace entry is a
    security call, in an application. Are you doing
    ng anything strange ?
    Eg. writing your own classloaders or the like ?No I'm not doing. Maybe a problem with J/Connector, but my deep doubt and what's driving me crazy is : Why is runnig all ok (I was really proud of this fact because this is my first "big" app in Java) in my developing machine and crashing in production machine?
    I'll look for i18n.jar, will install it and let's see what happens..
    Thanks again.

  • Roaming Profiles / Wrong permissions? Strange Behaviour...

    Hi, got some problems with roaming windows profiles.
    Server: XServe G5 | Mac OS X 10.5 | working as PDC
    Client: Windows XP Professional SP2
    1. I'm able to connect with Windows-Client to PDC, newly created folders (e.g. on Desktop)
    are stored in the profile, also files / programs within this folders - when user logs off
    files and folders are stored properly.
    2. When I try to get the same profile at a second Windows-Client the profile could not be
    loaded because of that created file within that folder (1.).
    I get an Windows-Error-Message: "Error performing Inpage Operation"
    That only happens because of the saved /created files in the new created folders. When I create a folder, without saving a file inside, it works without problems. Profile settings are loaded properly.
    Here is the content of my samba config (with testparm) , hope that helps - I didn't make any modifications to that file manually. Would be really nice to get help with that strange behaviour.
    [global]
    dos charset = 437
    unix charset = UTF-8-MAC
    display charset = UTF-8-MAC
    workgroup = SKDL
    server string = skdl-pdc
    auth methods = guest, odsam
    map to guest = Bad User
    obey pam restrictions = Yes
    passdb backend = odsam
    log level = 2
    debug pid = Yes
    max xmit = 131072
    printcap name = cups
    add user script = /usr/bin/opendirectorypdbconfig -c createuseraccount -r %u -n /LDAPv3/127.0.0.1
    add machine script = /usr/bin/opendirectorypdbconfig -c createcomputeraccount -r %u -n /LDAPv3/127.0.0.1
    logon path = \\%N\profiles\%u
    logon drive = H:
    domain logons = Yes
    os level = 65
    preferred master = Yes
    domain master = Yes
    wins support = Yes
    usershare allow guests = Yes
    usershare allow full config = Yes
    usershare max shares = 1000
    usershare owner only = No
    usershare path = /var/samba/shares
    idmap domains = default
    idmap alloc backend = odsam
    idmap negative cache time = 5
    com.apple:filter shares by access = yes
    darwin_streams:brlm = yes
    idmap config default:backend = odsam
    idmap config default:default = yes
    ea support = Yes
    stream support = Yes
    use sendfile = Yes
    printing = cups
    print command =
    lpq command = %p
    lprm command =
    include = /var/run/smb.conf
    vfs objects = darwinacl, darwin_streams
    [netlogon]
    path = /etc/netlogon
    write list = @admin
    browseable = No
    strict locking = No
    [profiles]
    path = /Users/Profiles
    read only = No
    browseable = No
    strict locking = No
    [homes]
    comment = User Home Directories
    read only = No
    create mask = 0750
    browseable = No
    root preexec = /usr/sbin/inituser %U
    com.apple:show admin all volumes = no
    [printers]
    comment = All Printers
    path = /tmp
    create mask = 0700
    printable = Yes
    browseable = No
    ----------------

    try using cacls to check the access control on the files and directories

  • 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

  • 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...)

  • Report S_ALR_87013542 strange behaviour

    Hi All,
    Report S_ALR_87013542 - Actual/Comm/Total/Plan in COAr crcy -  is showing up cross signs in some of the columns.When the cross sign (like any other column value) is clicked the line item detail are sown correctly.
    Has anybody encountered this kind of issue before ?
    I googled and searched various forums but all in vain.
    Please provide inputs to correct this strange behaviour of Report S_ALR_87013542. Thanks!
    Regards
    Dev

    Hello Dev,
    Did you execute report RKACOR04 for the affected object number and checked if this still happens ?
    Suresh Jayanthi.

  • View Master mode strange behaviour with jpg files

    Hy all,
    I'm using Aperture, and I'm tweakin a lot the SW to discover all secrets ....
    I'm really concerned about a strange behaviour of the SW in view mode.
    If I open a jpg file, do not apply ANY modification, and apply the "show master" command (pressing M), there's a subtle behaviour :
    *the images get sharper !!!!*
    It behaves as if an "edge sharpening" was applied !!!!!!
    With _RAW files this thing doesn't happen at all._
    Even stranger, if I zoom to full definition (by pressing Z), and toggle between normal view and "show master" view, the immage remains the same !
    The effect is not so evident with all images, but sometimes it is !!
    Anyway, I expect not to have such kind of things with a professional SW.
    With professional cameras and good quality files it's really annoying not to beeing sure what's the REAL content of the jpg image.
    Has anyone noted this thing ? Is there a reasonable explanation ?
    The only one I tried to figure out is the following : may be Aperture applies some kind of resampling algorithm with jpg files (bicubic, bilinear, etc).
    May be this resampling is not applied with 100% magnification, as weel as with raw files.
    But it's only my guessing. Now, I'm tweaking other viewers and other SW to understand what's the real jpg image stored in the file : the blurer one form normal view or the sharper one with "show master" mode.
    I stress once again : of course, the jpg file I'm talking about have no settings at all, just imported and toggled with M button.
    Thanks in advance.
    Regards,
    Enzo

    Hy,
    I'm afraid I'm not been clear.
    The problem is this :
    1) jpg image opened in normal view mode, no zoom, (no quick preview, of course) : image with a certain amount of blour
    2) jpg image opened in show master mode, no zoom, (no quick previre, of course) : image SHARPER with respect with the previous.
    No edit applied from import, so "show master" command shouln't apply any change in rendering, should it ?
    The only thing I said on 100% view is that such difference (between normal mode e show mastermode) is not present with 100% magnification.
    That was the issue.
    Enzo

  • Strange behaviour: two servers on the same port

    Hi!
    I hope this is the right section for this post. I need help about a strange behaviour involving a ServerSocket.
    For my thesis I need to write a program that receives data from a pre-existing DSMS client, filters them and then sends them to a pre-existing DSMS server. And here is my problem: if I try to create a ServerSocket on the same port of the DSMS server, my program throws no exception, and the servers seem running on the same port. This is a behaviour that I'd like to avoid, but I cannot understand what the problem is. Can you help me?
    The source code of the DSMS server can be found here (it's written in C++): http://infolab.stanford.edu/stream/code/stream-0.6.0.tar.gz
    The source code of my server class, instead, is this one:
    import java.io.*;
    import java.net.*;
    public class ThreadGenerator {
         private ServerSocket server;
         public void connect(String servPort, String cHost, String cPort) {
              try {
                   server = new ServerSocket(servPort);
                   System.out.println("SERVER running on port "+servPort);
              } catch (BindException e) {
                   System.out.println("Address already in use!");
              } catch (Exception e) {
                   System.err.println(e);
              try {
                   while(true){
                        Socket client = server.accept();
                        StreamThread T = new StreamThread(client, cHost, cPort);
                        T.start();
              } catch (EOFException e) {
                   System.out.println("Server closed connection!");
              } catch (Exception e) {
                   System.err.println(e);
    }I'm programming on Mac OSX Tiger, with Java 1.5.0.
    Thanks in advance for your help.

    The problem is still happening to me, I tried in this very moment. The code I'm using is the one I posted, and the second server is the one that I linked. I don't think there's anything else to add.
    If you're sure that the problem is not in my code, then it means that it is in the linked server, which partially solves the problem. But I'd like to know, if it's possibile, if there is any other way to check if the port is already in use.

  • Cursor shows strange behaviour in 10.9.5

    HI,
    I'm using a 15" MBPr late 2013, i7, 16 GB RAM, 1 TB SSD, running on 10.9.5. Lately I registered a very strange behaviour of the cursor when using the built in trackpad. If hovering over one of the symbols in the bar at the upper right corner of the screen and then moving the cursor downward, the menu of the symbol on the right of the cursor pops up (not the one the cursor ist pointing on).
    For example: the symbol for WiFi is located left from the one regulating the volume. When hovering over WiFi and moving downwards to activate/deactivate it, the volume-controle pops up ! If I want to use the WiFi, I have to hover over the symbol for bluetooth-connectivity instead....
    Any idea whats happening here ?
    Help is very much appreciated !
    MIchael

    OK, found the solution by myself. The reason seemed to be related to the resolution of the display. Changed it to another one (no matter which one), waited for the display to change and the changed the res back to optimal for display.
    The cursor now works fine and exactly....
    Really weird.

  • Windows 8.1 Enterprise Evaluation- Strange behaviour of network adapter

    Hello there are discussions and questions around this community about network adapter dropping connection while system is running. But I have found unique problem with my network adapter driver.
    I have tried to state my problem as clearly as possible. Please ask if any detail is required.
    My network status shows no access on following occasions:
    1. On alternate system wakeups.
        eg:  
    a. System boots up 
    Internet accessible
    no problem
    b. I put system to sleep(first time) and wake it up
    No access to internet !!!
    When I check in network and sharing center not even adapter shows in disabled status.(See video from the link given below).
    c. Without restarting system or without installing network adapter again,  I put system to sleep again and wake it up (2nd time).
    Internet accessible
    d. I put system to sleep for (3rd time) and wakes it up.
    No access to internet!!
    If I put system to sleep again and wake it up definitly I get network access.
    2. If I switch off the modem before windows shutdown completely or in the process of shutdown, next time when I boot system, even though the modem is switched on before booting the system, No internet access tooltip will be shown on network
    sysbol.
    Another strange behaviour is on no internet access status, I start installing adapter, and it loads required files and prompt me to click "next" and "click" install.
    But the thing is before I go to "next" button, I will get network access as shown in this link
    http://youtu.be/sPlXVEiYBeo. Ignore virtualbox adapter. Same behaviour was there when there is no vbox adapter. Same was happening in Windows 8 Pro, but not in windows 7, so that there is no H/W problem I think. 
    Any idea on how to fix this or any alternate solution ? 

    Hi,
    Firstly, access your network adapter official website to get the proper driver applied to your system.
    Then going to Control Panel > Device Manager, right click your adapter > Properties. Under the Power Management tab, make sure "Allow the computer to turn off this device to save power" checkbox unchecked.
    If it still persists, try to disable "fast startup" as below steps:
    1.In Control Panel, open the Power Options item.
    2.Click the Choose what the power buttons do link.
    3.Clear the Turn on fast startup (recommended) check box.
    4.Click Save Settings.
    Karen Hu
    TechNet Community Support

Maybe you are looking for