Multi threading race condition in JTable while rendering and truncating?

Hi All,
It seems that there is a race confition when rendering a large table which is truckated by another thread while rendering it on a JTable view.
Let me try to explain what I think is the problem:
When considering the folowing code from BasicTableUI
First the size of the tbale model is determined in
public void paint(Graphics g, JComponent c) {
[snip]
        if (rMax == -1) {
         rMax = table.getRowCount()-1;
        }then this cMax is passed to:
private void paintCells(Graphics g, int rMin, int rMax, int cMin, int cMax) {
     JTableHeader header = table.getTableHeader();
     TableColumn draggedColumn = (header == null) ? null : header.getDraggedColumn();
     TableColumnModel cm = table.getColumnModel();
     int columnMargin = cm.getColumnMargin();
        Rectangle cellRect;
     TableColumn aColumn;
     int columnWidth;
     if (table.getComponentOrientation().isLeftToRight()) {
         for(int row = rMin; row <= rMax; row++) {
          cellRect = table.getCellRect(row, cMin, false);
                for(int column = cMin; column <= cMax; column++) {
                    aColumn = cm.getColumn(column);
                    columnWidth = aColumn.getWidth();
                    cellRect.width = columnWidth - columnMargin;
                    if (aColumn != draggedColumn) {
                        paintCell(g, cellRect, row, column);
                    cellRect.x += columnWidth;
     } else {The prepareRenderer works like this:
    public Component prepareRenderer(TableCellRenderer renderer, int row, int column) {
        Object value = getValueAt(row, column);
[snip]
     return renderer.getTableCellRendererComponent(this, value,
                                                   isSelected, hasFocus,
                                                   row, column);
    }Here the above getValueAt is called for every cell to be rendered (in one thread) , while async a row can be deleted (in another thread) while the tables rendereing is still in progress. This leads to a value to be unexpectedly be null in the above return renderer.getTableCellRendererComponent method call: this method could return an empty panel to indicated that the cell is gone which is strange behaviour because the row doesn't exists anymore. The other option would be to return a null renderer so that the cell won't be rendered but that is impossible because the code doens't expect a null renderer. The third option could to be synchronize somehow the 2 threads so that any delete on the model has to wait until the rendering has finished.
A possble solution could be to make paintCells at least protected and change to code to see if the designated row still exists, and if not don't increment the row height
Any help/feedback is greatly appreciated!
Note that this question is based upon Java5 and I do not know if this is also true for Java6
Thnx
Andr'e

So this means that a TableModel must be manupulated (setValueAt , adding deleting and/or updating objects in this TableModel) through a thread in the EventQueue!
i.e. (pseudo code)
        EventQueue.invokeLater(new Runnable() {
            public void run() {
                getTableModel().setValueAt(........)
        });A

Similar Messages

  • I want to freeze frame  while rendering and to continue

    hey all
    i am using a processor and a codec to grab frames (AccessFrame...)
    while rendering the media i created a mouse listener .
    on the first click i want to freeze the image and click 3 more times in order to get specific coordinates
    and then to carry on with the media transmission.
    so... what i did i stopped the processor clicked 3 more time and then started the player.
    ok so its work. when i start the player i get a black screen for a second and the media is playing....
    my question is. does anyone has a better way??? when i start the processor from the stopped stage i am getting
    a black screen.
    thanks
    Nati

    Open the video in QuickTime Player.
    Scrub to the frame.
    Edit/Copy.
    Open Preview.
    File/New From Clipboard.
    File/Save...

  • Program has encountered a problem while rendering and shuts down

    I was rendering a video, and about 23% of the way through the program encountered this program. I restarted and tried it again. It now happens in the 7th clip out of the 80 clips on the timeline or about 7% of the way. I've deleted the scratch disk files with no luck.
    Does anyone know what would cause this problem?

    Which Satellite L675? There is a label on the bottom.
    Probably easiest to restore from the hidden partition. See the section Recovering to out-of-box state (recommended recovery method), which begins on p. 62 of the User's Manual.
       Satellite L670 Series User’s Guide
    Yes, I've read here that it can take a long time to restore the factory image.
    -Jerry

  • New Mac Pro (late 2013) crashes / freezes while rendering or editing in Premiere Pro CC

    We recently purchased a new Mac Pro desktop (Late 2013, 16GB memory, D700 Graphic Card, 2.7 GHz -12 Core, OSX 10.9.3) and we are running Adobe CC on it. When using Premiere Pro CC (7.2.2) I am having major issues while rendering and editing. About 50% of the time when I try to render it starts off real fast then just freezes. This happens in Premiere and Media Encoder. Sometimes I can just Force Quit Premiere or Media Encoder and other times I have to do a hard restart on the entire computer because the entire computer freezes. The computer will also occasionally freeze whenever doing simple editing or stacking layers. The  computer will also just decide to suddenly stop and restart when editing or doing simple tasks like browsing the web. Additionally there has been several times if the render does finish, the final video will have digital glitches throughout the video. I have to redo the render once or twice and it will finally be fine. This all is happening several times a day. This never happened on our previous Mac Pro, but we were not running Mavericks. I used Migration Assistant to transfer from old computer to new computer. So I don't know if this is an a problem with the actual Mac Pro, Mavericks, graphic card or Adobe? But right now I am very frustrated as you can imaging spending all this money for a computer that has been giving us more issues than our previous computer. Any help would be greatly appreciated!

    1. This procedure is a diagnostic test. It changes nothing, for better or worse, and therefore will not, in itself, solve the problem. But with the aid of the test results, the solution may take a few minutes, instead of hours or days.
    2. If you don't already have a current backup, back up all data before doing anything else. The backup is necessary on general principle, not because of anything in the test procedure. Backup is always a must, and when you're having any kind of trouble with the computer, you may be at higher than usual risk of losing data, whether you follow these instructions or not.
    There are ways to back up a computer that isn't fully functional. Ask if you need guidance.
    3. Below are instructions to run a UNIX shell script, a type of program. All it does is to collect information about the state of the computer. That information goes nowhere unless you choose to share it. However, you should be cautious about running any kind of program (not just a shell script) at the behest of a stranger. If you have doubts, search this site for other discussions in which this procedure has been followed without any report of ill effects. If you can't satisfy yourself that the instructions are safe, don't follow them. Ask for other options.
    Here's a summary of what you need to do, if you choose to proceed:
    ☞ Copy a line of text in this window to the Clipboard.
    ☞ Paste into the window of another application.
    ☞ Wait for the test to run. It usually takes a few minutes.
    ☞ Paste the results, which will have been copied automatically, back into a reply on this page.
    The sequence is: copy, paste, wait, paste again. You don't need to copy a second time. Details follow.
    4. You may have started the computer in "safe" mode. Preferably, these steps should be taken in “normal” mode, under the conditions in which the problem is reproduced. If the system is now in safe mode and works well enough in normal mode to run the test, restart as usual. If you can only test in safe mode, do that.
    5. If you have more than one user, and the one affected by the problem is not an administrator, then please run the test twice: once while logged in as the affected user, and once as an administrator. The results may be different. The user that is created automatically on a new computer when you start it for the first time is an administrator. If you can't log in as an administrator, test as the affected user. Most personal Macs have only one user, and in that case this section doesn’t apply. Don't log in as root.
    6. The script is a single long line, all of which must be selected. You can accomplish this easily by triple-clicking anywhere in the line. The whole line will highlight, though you may not see all of it in the browser window, and you can then copy it. If you try to select the line by dragging across the part you can see, you won't get all of it.
    Triple-click anywhere in the line of text below on this page to select it:
    PATH=/usr/bin:/bin:/usr/sbin:/sbin:/usr/libexec;clear;cd;p=(Software Hardware Memory Diagnostics Power FireWire Thunderbolt USB Fonts 51 4 1000 25 5120 KiB/s 1024 85 \\b%% 20480 1 MB/s 25000 ports 'com.autodesk.AutoCad com.evenflow.dropbox com.google.GoogleDrive' DYLD_INSERT_LIBRARIES\ DYLD_LIBRARY_PATH -86 ` route -n get default|awk '/e:/{print $2}' ` 25 N\\/A down up 102400 25600 recvfrom sendto CFBundleIdentifier 25 25 25 1000 MB );N5=${#p[@]};p[N5]=` networksetup -listnetworkserviceorder|awk ' NR>1 { sub(/^\([0-9]+\) /,"");n=$0;getline;} $NF=="'${p[26]}')" { sub(/.$/,"",$NF);print n;exit;} ' `;f=('\n%s: %s\n' '\n%s\n\n%s\n' '\nRAM details\n%s\n' %s\ %s '%s\n\t(%s)\n' );S0() { echo ' { q=$NF+0;$NF="";u=$(NF-1);$(NF-1)="";gsub(/^ +| +$/,"");if(q>='${p[$1]}') printf("%s (UID %s) is using %s '${p[$2]}'",$0,u,q);} ';};s=(' /^ *$|CSConfigDot/d;s/^ */   /;s/[-0-9A-Fa-f]{22,}/UUID/g;s/(ochat)\.[^.]+(\..+)/\1\2/;/Shared/!s/\/Users\/[^/]+/~/g ' ' s/^ +//;5p;6p;8p;12p;' ' {sub(/^ +/,"")};NR==6;NR==13&&$2<'${p[10]} ' 1s/://;3,6d;/[my].+:/d;s/^ {4}//;H;${ g;s/\n$//;/s: [^EO]|x([^08]|02[^F]|8[^0])/p;} ' ' 5h;6{ H;g;/P/!p;} ' ' ($1~/^Cy/&&$3>'${p[11]}')||($1~/^Cond/&&$2!~/^N/) ' ' /:$/{ N;/:.+:/d;s/ *://;b0'$'\n'' };/^ *(V.+ [0N]|Man).+ /{ s/ 0x.... //;s/[()]//g;s/(.+: )(.+)/ (\2)/;H;};$b0'$'\n'' d;:0'$'\n'' x;s/\n\n//;/Apple[ ,]|Intel|SMSC/d;s/\n.*//;/\)$/p;' ' s/^.*C/C/;H;${ g;/No th|pms/!p;} ' '/= [^GO]/p' '{$1=""};1' ' /Of/!{ s/^.+is |\.//g;p;} ' ' $0&&!/ / { n++;print;} END { if(n<200) print "com.apple.";} ' ' $3~/[0-9]:[0-9]{2}$/ { gsub(/:[0-9:a-f]{14}/,"");} { print|"tail -n'${p[12]}'";} ' ' NR==2&&$4<='${p[13]}' { print $4;} ' ' END { $2/=256;if($2>='${p[15]}') print int($2) } ' ' NR!=13{next};{sub(/[+-]$/,"",$NF)};'"`S0 21 22`" 'NR!=2{next}'"`S0 37 17`" ' NR!=5||$8!~/[RW]/{next};{ $(NF-1)=$1;$NF=int($NF/10000000);for(i=1;i<=3;i++){$i="";$(NF-1-i)="";};};'"`S0 19 20`" 's:^:/:p' '/\.kext\/(Contents\/)?Info\.plist$/p' 's/^.{52}(.+) <.+/\1/p' ' /Launch[AD].+\.plist$/ { n++;print;} END { if(n<200) print "/System/";} ' '/\.xpc\/(Contents\/)?Info\.plist$/p' ' NR>1&&!/0x|\.[0-9]+$|com\.apple\.launchctl\.(Aqua|Background|System)$/ { print $3;} ' ' /\.(framew|lproj)|\):/d;/plist:|:.+(Mach|scrip)/s/:[^:]+//p ' '/root/p' ' !/\/Contents\/.+\/Contents|Applic|Autom|Frameworks/&&/Lib.+\/Info.plist$/ { n++;print;} END { if(n<1000) print "/System/";} ' '/^\/usr\/lib\/.+dylib$/p' ' /Temp|emac/d;/(etc|Preferences)\//s/^\.\/[^/]+//p;' ' /\/(Contents\/.+\/Contents|Frameworks)\/|\.wdgt\/.+\.[bw]/d;p;' 's/\/(Contents\/)?Info.plist$//;p' ' { gsub("^| ","||kMDItem'${p[35]}'=");sub("^.."," ") };1 ' p '{print $3"\t"$1}' 's/\'$'\t''.+//p' 's/1/On/p' '/Prox.+: [^0]/p' '$2>'${p[9]}'{$2=$2-1;print}' ' BEGIN { i="'${p[26]}'";M1='${p[16]}';M2='${p[18]}';M3='${p[31]}';M4='${p[32]}';} !/^A/ { next;} /%/ { getline;if($5<M1) a="user "$2"%, system "$4"%";} /disk0/&&$4>M2 { b=$3" ops/s, "$4" blocks/s";} $2==i { if(c) { d=$3+$4+$5+$6;next;};if($4>M3||$6>M4) c=int($4/1024)" in, "int($6/1024)" out";} END { if(a) print "CPU: "a;if(b) print "I/O: "b;if(c) print "Net: "c" (KiB/s)";if(d) print "Net errors: "d" packets/s";} ' ' /r\[0\] /&&$NF!~/^1(0|72\.(1[6-9]|2[0-9]|3[0-1])|92\.168)\./ { print $NF;exit;} ' ' !/^T/ { printf "(static)";exit;} ' '/apsd|OpenD/!s/:.+//p' ' (/k:/&&$3!~/(255\.){3}0/ )||(/v6:/&&$2!~/A/ ) ' ' $1~"lR"&&$2<='${p[25]}';$1~"li"&&$3!~"wpa2";' ' BEGIN { FS=":";} { n=split($3,a,".");sub(/_2[01].+/,"",$3);print $2" "$3" "a[n]" "$1;b=b$1;} END { if(b) print("\n\t* Code injection");} ' ' NR!=4{next} {$NF/=10240} '"`S0 27 14`" ' END { if($3~/[0-9]/)print$3;} ' ' BEGIN { L='${p[36]}';} !/^[[:space:]]*(#.*)?$/ { l++;if(l<=L) f=f"\n   "$0;} END { F=FILENAME;if(!F) exit;if(!f) f="\n   [N/A]";"file -b "F|getline T;if(T!~/^(AS.+ (En.+ )?text$|POSIX sh.+ text ex)/) F=F" ("T")";printf("\nContents of %s\n%s\n",F,f);if(l>L) printf("\n   ...and %s more line(s)\n",l-L);} ' ' BEGIN{FS="= "} /Path/{print $2} ' ' /^ +B/{ s/.+= |(-[0-9]+)?\.s.+//g;p;} ' ' END{print NR} ' ' /id: N|te: Y/{i++} END{print i} ' ' / /{$0="'"${p[28]}"'"};1;' '/ en/!s/\.//p' ' NR!=13{next};{sub(/[+-M]$/,"",$NF)};'"`S0 39 40`" ' $10~/\(L/&&$9!~"localhost" { sub(/.+:/,"",$9);print $1": "$9;} ' '/^ +r/s/.+"(.+)".+/\1/p' 's/(.+\.wdgt)\/(Contents\/)?Info\.plist$/\1/p' 's/^.+\/(.+)\.wdgt$/\1/p' );c1=(system_profiler pmset\ -g nvram fdesetup find syslog df vm_stat sar ps sudo\ crontab sudo\ iotop top pkgutil PlistBuddy whoami cksum kextstat launchctl sudo\ launchctl crontab 'sudo defaults read' stat lsbom mdfind ' for i in ${p[24]};do ${c1[18]} ${c2[27]} $i;done;' defaults\ read scutil sudo\ dtrace sudo\ profiles sed\ -En awk /S*/*/P*/*/*/C*/*/airport networksetup mdutil sudo\ lsof test );c2=(com.apple.loginwindow\ LoginHook '-c Print /L*/P*/loginw*' '-c Print L*/P*/*loginit*' '-c Print L*/Saf*/*/E*.plist' '~ $TMPDIR.. \( -flags +sappnd,schg,uappnd,uchg -o ! -user $UID -o ! -perm -600 \)' '.??* -path .Trash -prune -o -type d -name *.app -print -prune' '-c Print\ :'${p[35]}' 2>&1' '-c Print\ :Label 2>&1' '{/,}L*/{Con,Pref}* -type f ! -size 0 -name *.plist -exec plutil -s {} \;' "-f'%N: %l' Desktop L*/Keyc*" therm sysload boot-args status " -F '\$Time \$Message' -k Sender kernel -k Message Req 'Beac|caug|dead[^bl]|FAIL|GPU |hfs: Ru|inval|jnl:|last value [1-9]|n Cause: -|NVDA\(|pagin|proc: t|Roamed|rror|ssert|Thrott|tim(ed? ?|ing )o|WARN' -k Message Rne 'Goog|ksadm|SMC:' -o -k Sender fseventsd -k Message Req 'SL' " '-du -n DEV -n EDEV 1 10' 'acrx -o comm,ruid,%cpu' '-t1 10 1' '-f -pfc /var/db/r*/com.apple.*.{BS,Bas,Es,OSXU,Rem,up}*.bom' '{/,}L*/Lo*/Diag* -type f -regex .\*[cgh] ! -name *ag \( -exec grep -lq "^Thread c" {} \; -exec printf \* \; -o -true \) -execdir stat -f:%Sc:%N -t%F {} \;|sort -t: -k2 |tail -n'${p[38]} '-L {/{S*/,},}L*/Lau* -type f' '-L /{S*/,}L*/StartupItems -type f -exec file {} +' '-L /S*/L*/{C*/Sec*A,E}* {/,}L*/{A*d,Ca*/*/Ex,Compon,Ex,In,iTu,Keyb,Mail/B,P*P,Qu*T,Scripti,Sec,Servi,Spo,Widg}* -type f -name Info.plist' '/usr/lib -type f -name *.dylib' `awk "${s[31]}"<<<${p[23]}` "/e*/{auto,{cron,fs}tab,hosts,[lps]*.conf,pam.d,ssh{,d}_config,*.local} {,/usr/local}/etc/periodic/*/* /L*/P*{,/*}/com.a*.{Bo,sec*.ap}* .launchd.conf" list getenv /Library/Preferences/com.apple.alf\ globalstate --proxy '-n get default' -I --dns -getdnsservers -getinfo\ "${p[N5]}" -P -m\ / '' -n1 '-R -l1 -n1 -o prt -stats command,uid,prt' '--regexp --only-files --files com.apple.pkg.*|sort|uniq' -kl -l -s\ / '-R -l1 -n1 -o mem -stats command,uid,mem' -i4TCP:0-1023 com.apple.dashboard\ layer-gadgets '-d /L*/Mana*/$USER&&echo On' );N1=${#c2[@]};for j in {0..8};do c2[N1+j]=SP${p[j]}DataType;done;N2=${#c2[@]};for j in 0 1;do c2[N2+j]="-n ' syscall::'${p[33+j]}':return { @out[execname,uid]=sum(arg0) } tick-10sec { trunc(@out,1);exit(0);} '";done;l=(Restricted\ files Hidden\ apps 'Elapsed time (s)' POST Battery Safari\ extensions Bad\ plists 'High file counts' User Heat System\ load boot\ args FileVault Diagnostic\ reports Log 'Free space (MiB)' 'Swap (MiB)' Activity 'CPU per process' Login\ hook 'I/O per process' Mach\ ports kexts Daemons Agents launchd Startup\ items Admin\ access Root\ access Bundles dylibs Apps Font\ issues Inserted\ dylibs Firewall Proxies DNS TCP/IP Wi-Fi Profiles Root\ crontab User\ crontab 'Global login items' 'User login items' Spotlight Memory Listeners Widgets Parental\ Controls );N3=${#l[@]};for i in 0 1 2;do l[N3+i]=${p[5+i]};done;N4=${#l[@]};for j in 0 1;do l[N4+j]="Current ${p[29+j]}stream data";done;A0() { id -G|grep -qw 80;v[1]=$?;((v[1]==0))&&sudo true;v[2]=$?;v[3]=`date +%s`;clear >&-;date '+Start time: %T %D%n';};for i in 0 1;do eval ' A'$((1+i))'() { v=` eval "${c1[$1]} ${c2[$2]}"|'${c1[30+i]}' "${s[$3]}" `;[[ "$v" ]];};A'$((3+i))'() { v=` while read i;do [[ "$i" ]]&&eval "${c1[$1]} ${c2[$2]}" \"$i\"|'${c1[30+i]}' "${s[$3]}";done<<<"${v[$4]}" `;[[ "$v" ]];};A'$((5+i))'() { v=` while read i;do '${c1[30+i]}' "${s[$1]}" "$i";done<<<"${v[$2]}" `;[[ "$v" ]];};';done;A7(){ v=$((`date +%s`-v[3]));};B2(){ v[$1]="$v";};for i in 0 1;do eval ' B'$i'() { v=;((v['$((i+1))']==0))||{ v=No;false;};};B'$((3+i))'() { v[$2]=`'${c1[30+i]}' "${s[$3]}"<<<"${v[$1]}"`;} ';done;B5(){ v[$1]="${v[$1]}"$'\n'"${v[$2]}";};B6() { v=` paste -d: <(printf "${v[$1]}") <(printf "${v[$2]}")|awk -F: ' {printf("'"${f[$3]}"'",$1,$2)} ' `;};B7(){ v=`grep -Fv "${v[$1]}"<<<"$v"`;};C0(){ [[ "$v" ]]&&echo "$v";};C1() { [[ "$v" ]]&&printf "${f[$1]}" "${l[$2]}" "$v";};C2() { v=`echo $v`;[[ "$v" != 0 ]]&&C1 0 $1;};C3() { v=`sed -E "$s"<<<"$v"`&&C1 1 $1;};for i in 1 2;do for j in 2 3;do eval D$i$j'(){ A'$i' $1 $2 $3; C'$j' $4;};';done;done;{ A0;A2 0 $((N1+1)) 2;C0;A1 0 $N1 1;C0;B0;C2 27;B0&&! B1&&C2 28;D12 15 37 25 8;A1 0 $((N1+2)) 3;C0;D13 0 $((N1+3)) 4 3;D23 0 $((N1+4)) 5 4;for i in 0 1 2;do D13 0 $((N1+5+i)) 6 $((N3+i));done;D13 1 10 7 9;D13 1 11 8 10;D22 2 12 9 11;D12 3 13 10 12;D23 4 19 44 13;D23 5 14 12 14;D22 6 36 13 15;D22 7 37 14 16;D23 8 15 38 17;D22 9 16 16 18;B1&&{ D22 11 17 17 20;for i in 0 1;do D22 28 $((N2+i)) 45 $((N4+i));done;};D22 12 44 54 45;D22 12 39 15 21;A1 13 40 18;B2 4;B3 4 0 19;A3 14 6 32 0;B4 0 5 11;A1 17 41 20;B7 5;C3 22;B4 4 6 21;A3 14 7 32 6;B4 0 7 11;B3 4 0 22;A3 14 6 32 0;B4 0 8 11;B5 7 8;B1&&{ A2 19 26 23;B7 7;C3 23;};A2 18 26 23;B7 7;C3 24;A2 4 20 21;B7 6;B2 9;A4 14 7 52 9;B2 10;B6 9 10 4;C3 25;D13 4 21 24 26;B4 4 12 26;B3 4 13 27;A1 4 22 29;B7 12;B2 14;A4 14 6 52 14;B2 15;B6 14 15 4;B3 0 0 30;C3 29;A1 4 23 27;B7 13;C3 30;D13 24 24 32 31;D13 25 37 32 33;A1 23 18 28;B2 16;A2 16 25 33;B7 16;B3 0 0 34;B2 21;A6 47 21&&C0;B1&&{ D13 21 0 32 19;D13 10 42 32 40;D22 29 35 46 39;};D23 14 1 48 42;D12 34 43 53 44;D22 0 $((N1+8)) 51 32;D13 4 8 41 6;D12 26 28 35 34;D13 27 29 36 35;A2 27 32 39&&{ B2 19;A2 33 33 40;B2 20;B6 19 20 3;};C2 36;D23 33 34 42 37;B1&&D23 35 45 55 46;D23 32 31 43 38;D12 36 47 32 48;D13 20 42 32 41;D23 14 2 48 43;D13 4 5 32 1;D22 4 4 50 0;D13 14 3 49 5;B3 4 22 57;A1 26 46 56;B7 22;B3 0 0 58;C3 47;D23 22 9 37 7;A7;C2 2;} 2>/dev/null|pbcopy;exit 2>&-  
    Copy the selected text to the Clipboard by pressing the key combination command-C.
    7. Launch the built-in Terminal application in any of the following ways:
    ☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)
    ☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.
    ☞ Open LaunchPad. Click Utilities, then Terminal in the icon grid.
    Click anywhere in the Terminal window and paste by pressing command-V. The text you pasted should vanish immediately. If it doesn't, press the return key.
    8. If you see an error message in the Terminal window such as "syntax error," enter
    exec bash
    and press return. Then paste the script again.
    9. If you're logged in as an administrator, you'll be prompted for your login password. Nothing will be displayed when you type it. You will not see the usual dots in place of typed characters. Make sure caps lock is off. Type carefully and then press return. You may get a one-time warning to be careful. If you make three failed attempts to enter the password, the test will run anyway, but it will produce less information. In most cases, the difference is not important. If you don't know the password, or if you prefer not to enter it, press the key combination control-C or just press return three times at the password prompt. Again, the script will still run.
    If you're not logged in as an administrator, you won't be prompted for a password. The test will still run. It just won't do anything that requires administrator privileges.
    10. The test may take a few minutes to run, depending on how many files you have and the speed of the computer. A computer that's abnormally slow may take longer to run the test. While it's running, there will be nothing in the Terminal window and no indication of progress. Wait for the line
    [Process completed]
    to appear. If you don't see it within half an hour or so, the test probably won't complete in a reasonable time. In that case, close the Terminal window and report the results. No harm will be done.
    11. When the test is complete, quit Terminal. The results will have been copied to the Clipboard automatically. They are not shown in the Terminal window. Please don't copy anything from there. All you have to do is start a reply to this comment and then paste by pressing command-V again.
    At the top of the results, there will be a line that begins with "Model Identifier." If you don't see that, but instead see a mass of gibberish, you didn't wait for the "Process completed" message to appear in the Terminal window. Please wait for it and try again.
    If any private information, such as your name or email address, appears in the results, anonymize it before posting. Usually that won't be necessary.
    12. When you post the results, you might see the message, "You have included content in your post that is not permitted." It means that the forum software has misidentified something in the post as a violation of the rules. If that happens, please post the test results on Pastebin, then post a link here to the page you created.
    Note: This is a public forum, and others may give you advice based on the results of the test. They speak only for themselves, and I don't necessarily agree with them.
    Copyright © 2014 by Linc Davis. As the sole author of this work, I reserve all rights to it except as provided in the Use Agreement for the Apple Support Communities website ("ASC"). Readers of ASC may copy it for their own personal use. Neither the whole nor any part may be redistributed.

  • Race Conditions

    I want to write some code to prevent a race condition.
    I've looked on the internet at some examples of race conditions, but this one confuses me - apparently these threads a race condition can still occur, i dont see how?
    t1
    Acquire Lock
    while (lock)
    lock=true;
    // enter cs
    transaction += cred;
    // release lock
    lock = false;
    t2
    Acquire Lock
    while (lock)
    // enter cs
    transaction -= debit;
    // release lock
    lock = false;
    Now forgive me for being naive, but my understanding of race conditions is that there shouldnt be a race when there is a lock - can someone please tell me where the problem lies here? I know its very simple.

    Code without comments and numbered...
    code in T1::
    t1.01 while (lock);
    t1.02 lock=true;
    t1.03 transaction += cred;
    t1.04 lock = false;
    Code in T2::
    t2.01 while (lock);
    t2.02 lock=true;
    t2.03 transaction -= debit;
    t2.04 lock = false;
    Both, T1 and T2 are executed sharing the central CPU and RAM. lock is initially
    false. T1 does t1.01 and exits the loop, get suspended and then T2 enters. T2 does t2.01 and because is false, exits the loop, BUT for some reason has more time ;-), so, goes to t2.02 and sets the lock to true and got suspended. Well, now you have T1 and T2 "within" the protected code (02-04) and both will have a share of the CPU and probably will have wrong results.
    Java gives you a way to have locks and synchronize calls that avoid those race conditions. Read on them and have fun...

  • Error behaviour in multi-threaded mode

    I'm running TestStand 3.0 in sequential mode. In the middle of my sequence I have a multi-threaded (6 threads) section with the appropriate Waits. My problem is that if an Error occurs while inside the multi-threaded section, then execution bypasses the Waits and I lose all the result data from the other threads.
    Is there anything that I can do to get the error thread to force each of the other threads to go through their Wait so that I can get their report data.
    Hurst

    Hi,
    Try using the New Execution option instead of New Thread.
    Or In the Properties set the step to ignore runtime errors. Then put your own error trapping in
    Regards
    Ray Farmer
    Regards
    Ray Farmer

  • How can i use multi threading in labview?

    i want to run a Digital storage oscilloscope and an energ ratio meter simultaneously using labview. i am using GPIB interfacing and windows XP. how can i do this using multi threading. Bot the instruments shd run and give data at the same time.

    You can't do this - at least not with a single GPIB board. It has nothing to do with threading or LabVIEW. There can only be one talker at a time over the bus. Depending on the instruments, you could probably set them up to take measurements simultaneously but you have to sequentially poll them to get the data.

  • Oraclient9i.dll error in multi threaded delphi server application

    I created a multi threaded server application in delphi using oracle9i and indy server components. When I run my application, I am getting an error "oraclient9i.dll" error when executing my SQL statements. I have check communication between my server application and the client application without using oracle and its working fine, its only when I started executing SQL statements when I got this error.
    Can anybody help me with this problem or point me to the right direction on how to resolve this issue.
    thanks

    > I have tried what you suggested. I have created a
    seperate TOracleSession on each thread that I create
    on the OnConnect event however I am having Problems
    using the oraclesession created on the OnExecute
    event. Somehow it is still executing the SQL that I
    have created on the main form where I first opened an
    oraclesession component created on the main form.
    It sounds then like the TOracleSession object in the thread is a copy of the one in the main thread/form.
    > Do you think that It would work if I create an
    instance of the TOracleDatasets and TOracleQuery on
    the OnExecute event and also at the same time create
    my TOracleSession on this event and continue
    processing the data receive from the client server.
    I've never used the Indy components for threading. The default TThread class worked just fine for me.
    What I used to do is define the session and database objects as privates in my new thread class (let's call it TThreadSQL) - which was subclassed from TThread.
    The constructor of this new TThreadSQL class did the following (writing here purely from memory - have not done Delphi for some time now): constructor TThreadSQL.Create( TNSalias, username, password : string );
    // constructor is called with the Oracle session connection details
    begin
      inherited Create; // call the parent class constructor
      CreateOracleSession; // call own private method to create an Oracle connection
    end;
    The CreateOracleSession method would then:
    - create a BDE Session (TSession) object
    - create a BDE Database (TDatabase) object, using the BDE Oracle native driver and an Oracle TNS alias plus username and password for connection
    The destructor would close the connection. The Execute method which is used to fire up the thread, would use a TQuery object (or whatever) to execute a SQL using it owns connection.

  • Multi-Thread - Utilizing Multicores

    Does Crystal Report XI do multi-threading?  I upgrading computers at work and I'm trying to get as much speed out ofthe computers as possible.  The main mfg computer using Crystal Reports Daily and I'm looking at upgrading it to Quad Core 2.66Ghz.  But I have found out that many of the software packages we use are unable to utilize the core.
    Will Crystal Reports?

    Thanks,
    I use a piece of software called Planit Solid which uses Crystal Reprts to create is cut sheets with in Solid.  So I'm limited.

  • Multi-threaded server with independent IO

    I have designed a multi-threaded server which handles XML via sockets. I am running into the issue that when I try to send data to all of the clients, I have having to iterate through a shared resource where the sockets are stored at. I do not have this problem with reading because it is done in the thread created for this client (I pass the socket into the thread). If one computer freezes, then the iteration (writeToAll) through the client sockets also freeze. I would like to send XML to all clients and have everything fully independent so if it has a problem writing to a client, then it wouldn't halt the server. I would spawn a new thread for each write but that wouldn't be practical and I worry about threads live-locked.
    I have looked into JCSP and it looks promising for the common issues associated with thread programming, but this is more of a design issue.
    Any robust multi-threaded servers out there for enterprise use and scalability?

    A basic server which provides an example of what I mean:
    http://www.wellho.net/solutions/java-a-multithreaded-server-in-java.html
    connectiontable is a non-synchronized static method; I use a synchronized non-static method. I do not know which one I need to use.
    The problem: If a socket "lingers" on sending output* (ex if the client is frozen but the socket is still bounded), then it never throws an exception!
    *Sending from a shared resource (hashtable) on the parent thread (where the serversocket resides).                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Aperture multi-threaded?

    Does anyone know if the upcoming new program Aperture will be multi-threaded to take advantage of the dual and dual-core processors?
    Keith

    quote from Joe Schorr, product manager on Aperture
    'Aperture is the first Apple program that actually uses Apple's Core image technology. Core data is an OS-level database structure. It drives Aperture. It takes advantage of ColorSync and multiprocessors. It makes extensive use of the graphics card.
    It's a uniquely Mac solution.'
    interview at http://www.creativepro.com/story/feature/23554.html?cprose=daily

  • Race conditions with UI thread

    Hi community,
    the update to LabVIEW 2014 has caused sveral of my vis to act up - vis that I had coded with race conditions with the UI thread that I was not aware of.
    Maybe they didn't exist previously, maybe I was just ignorant.
    Here is a where I first noticed something was wrong. It has a workaround inside:
    http://forums.ni.com/t5/LabVIEW/How-to-make-sure-plots-in-xy-graph-are-present/td-p/3033109
    Thanks again Norbert for your help with that.
    Now problems are showing up in other places too and it might be the tip of an iceberg. I'm a little afraid right now. It's not just xy graphs. The latest example:
    I have a sub-vi whose frontpanel I open with an invoke node inside that sub-vi. Afterwards, in the caller I register for events of frontpanel objects of the sub-vi. This fails now - apparently the fp of the sub-vi isn't open yet although the sub-vi has finished executing (yes, I use dataflow to ensure register for event is done only after the sub-vi has finished). This has a striking resemblance to my issue in the previous thread. It seems that vis can now be "finished" executing while stuff that was supposed to happen inside the sub-vi is still executing in the UI thread.
    I had not expected this.
    Is this intended behaviour?
    Is this new to LabVIEW 2014?
    Can someone please shed some light on this behavior change (if indeed it is one)?
    Can someone please advise me on a general solution/workaround for the host of problems this is causing me?
    Best regards
    Florian

    Norbert,
    I'm currently unable to reproduce the issue in my code regardless of cpu core affinity (you gotta hate random errors).
    I have attached an example that shows a simplified version of the code that has previously produced the error.
    This example might be flawed since it hasn't produced the error yet.
    The issue would show when the button "open window" is pressed, if it did at all.
    Also there is stuff in there that I just implemented in an attempt to keep the UI thread busy.
    For the core of the issue please disregard the bottom while loop in caller.vi
    I'll keep trying.
    Best regards
    Florian
    Attachments:
    subvi event registration.llb ‏56 KB

  • Problems debugging multiple threads to test race conditions

    I was trying to use JDeveloper 10.1.3 to debug race conditions (in the Embedded OCJ4 Container) and was not able to get the degree of control over multiple threads that I had hoped. I was able to trap a break point where I see two active request threads in the Threads window, and I am able to select each thread individually and see the current line of code that each is currently on. However, if I use the debugger controls to step a line of execution on one of the threads, the execution point also seems to change on the other thread.
    In some other IDEs I have used concepts like "freezing" and "thawing" threads which provide fine grain control over debugging race conditions. Is anyone aware of a similar concept in JDeveloper that I might just not be aware of? Instead it just seems that debugger has either paused the JVM or else plays all threads while only bounding particular thread you have focus on to the number of execution steps you specified (step into, step over, step out of, ...).
    Thanks.

    There are some developers that have mentioned this to me also.
    It appears to be possible in eclipse however, but not JDeveloper. Can anyone verify this, and hopefully give us a work around?
    Thanks,
    Tony

  • Helpful hint while multi-threading

    Hi all
    This had me stupmed for a little while. A multi-threaded program I'd been working didn't appear to be working correctly. I noticed this was because it looked like the thread never made it to its run() method. The cause of this was the fact id overridden the start() method of the thread without including this.run() at the end. The symptoms of this happening aren't obvious though, and it can be quite puzzling. I hope this gets added to any FAQs etc, or solves someones problem.

    And if, for whatever reason, you do need to override start(), you should not call this.run() at the end, you should call super.start() !!!
    If you call this.run() at the end, you are having the current thread go and do the run method.

  • Is rendering in Final Cut single thread or multi thread?

    There seems to be this recurring message about how the new Macpros perform single-threaded tasks about the same as the previous gen of Macpros, however in multi-threaded tasks the new Pros shine.
    How do I know if a task is single-threaded or multi-threaded? I do a lot of rendering video filters, generators, effects, etc. in Final Cut. Even something as (seemingly) simple as generating scrolling credits takes forever to render.
    Is video rendering a multi-threaded task? Will I see time significant time savings in rendering with the new Pro machines?

    It's not right now but the new Mac Pros are faster in single-threaded modes anyway:
    http://www.macrumors.com/2009/03/14/updated-mac-pro-benchmarks-and-video-of-inte rnals/
    Turns out the initial benchmarks were incorrect. The integrated memory controller is a MASSIVE performance boost. But it is inevitable that Apple will eventually choose the multi-threaded route for Final Cut Studio anyway, even if they do not at the present.

Maybe you are looking for

  • ContactSheet X (CSX) v1.4 has been released

    ContactSheet X (CSX) v1.4 has been released. The biggest change with this rev is the addition of PSCS4 support. Other changes include better support for metadata in captions and templates, improved color profile handling, and improved error handling.

  • "This entry already exists in the following table"

    Hello Friends I use SAP 2005 B PL05.In my UDO screens when i try to update an existing record in matrix, i get the error message This entry already exists in the following tables: "Tablename" But i'm not restricting anything  through code in the Upda

  • Startup message Error

    On startup I get this message "/Library/Startup/Icon has not been started because it does not have the proper security settings" I click on OK to get rid of message When I migrated to Snow Leopard I thought it might be solved but no. I have now migra

  • Want to add some grid styling in my datagrid

    Hi All ,           In my datagrid i have a requirement in which when ever i do mouse hovering onto a particular read only data grid a link button should gets appended before that row and also the color of the row should also changed to yellow . till

  • Why Set up table in LO Extraction ?

    Hi All, In LO Extraction we have filling up of set up tables for doing Init and then delta falls into update table etc then using V3 collective run push it to Delta Queue. Then we extract into BW. Why in LO alone this is the methodology for extractio