Back-tracing references

Is there a way to �back-trace� a reference?
In other words, can I find which object �A� has a reference to my object �B� and prevents it from being garbage-collected?
I have a program which doesn�t garbage-collect some objects, even though I force it with
System.runFinalization();
System.gc();
�and I can�t find out why!

1. Use a memory inspector e.g., JProbe.
2. The timing of an object's collection is non-deterministic.. it may happen sooner, or later, or not at all. And System.gc() won't force anything but a penalty in your application's performance esp. considering all threads are suspended during a scan.
3. The use of finalizers should generally be considered bad practice. An object with a finalizer tends to loiter because of the extra steps the gc must perform (first in determining when to finalize and then when to collect) -- finalizers aggravate an already sticky memory management process. Refactor your system to use explicit destruction.

Similar Messages

  • Tracing references in the Flex SDK

    I work with Flash Builder on a daily basis and I find great value in  "Find reference (Ctrl+Shift+G)" and "Open declaration (F3)". In Flex SDK 4.6.0 I was able to find references and open declarations not only in my own projects but also in the SDK files which I find valuable for various reasons. Using Apache Flex SDK 4.11.0 Flash Builder seems to have lost this ability: Open declaration works half the time and most often navigates to the wrong place in the file, and Find references does not work with SDK files at all. I have tried with both Flash Builder 4.6 and 4.7.
    By tracing references in the SDK I mean working with the files accompanying the compiled Flex SDK (ie. C:\sdk_location\framework\projects\project\src\).
    Any ideas how I can make Flash Builder help me browsing the SDK again?
    Details:
    My project compiles with both
    Apache Flex SDK 4.11.0
    Flex SDK 4.6.0
    I can use Find references in my own project.
    I can use Find references in Flex SDK 4.6.0.
    I can't use Find references in Apache Flex SDK 4.11.0.

    Change to the Flex bin directory and use mxmlc like this:
    mxmlc path/to/my/App.mxml
    This should create a SWF file that you can then run. If you
    plan on posting the app somewhere, you'll probably want to create
    an HTML wrapper. You can use the wrappers in the html-templates
    directory.
    For more info on using mxmlc, see the online help (type
    "mxmlc -help list") or look in the Compilers chapter of the
    Building and Deploying book. For more on using the wrappers, look
    in the wrappers chapter of the same book.
    hth,
    matt horn
    flex docs

  • Registering call back object reference

    hello to all.
    I am developing a RMI application and I have a problem while registering the call back reference object of client.
    I have followed what ever thing required to register the clients object reference to register at the server side and server can call my client and it works fine in local environment. But when I use live environment my client can register the object but server cannot call my client.
    When I use following code while registering the client reference object
    System.out.println("Call me back registered as \n"+cmb); //cmb the the clients reference objectit gives following output
    Call me back registered as  
    Admin_Stub[UnicastRef [liveRef: [endpoint:[192.168.1.2:56851](remote),objID:[-57856c9e:124db6554b6:-7ffe, -7745666993431596650]]]]  At localhost it works fine even if my IP address changes to 192.168.1.2 to 192.168.1.4 or 6 i.e. works fine in local environment but when registering to the live environment it registers with the same IP address as shown in the output. So what can I do to register the object so that server can call me.
    Also when server get the reference of my client's object and try to connect my client it gives an exception of connection time out, which means it cannot find my client to reply.
    So, please suggest me what to do.
    Thank in advance.

    Very difficult, in fact impossible. You have to allolw for the presence or absence of:
    (a) client-side firewalls
    (b) client-side NAT
    (c) misconfigured client-side DNS, e.g. the Linux /etc/hosts issue described in the FAQ item.
    So some client-side configuration is inevitable. Most people avoid callback-based applications over the Internet for these reasons, as well as the security reasons that cause this issue in the first place.

  • Way to highlight marker and refer back to reference

    One thing that would be nice to have is a way to highlight a reference marker in Frame and go back to where the
    cross-reference  was created. The cross-reference could easily be in another section of  the book. I know you can do Special > List of  > References,  but when you are in the doc itself it would be nice to do. I assume in ExtendScript you would highlight the marker and then launch the ExtendScript snippet, since it shouldn't (I think) be too much
    code if you were on the marker (and the code would check that it was a marker). Thanks for any advice

    I agree completely that it would be nice. I built a similar feature into my XRef Wizard plugin for structured documents, where you can search for all cross-references in a book that point to any particular element. It produces a hyperlinked report for each one. I use it frequently.
    The methodology for unstructured crossreferences would be identical. Probably the most difficult part would be the reporting aspect; ie, creating a report, displaying results in a pod, or whatever. The process of searching through a book for matching cross-references would require relatively little code.
    Are you asking whether it can be done? Or are you asking for someone to do it for you? The answer to the first is an easy "yes", the other not as much
    Russ

  • References from nested clusters

    Hi,
    Currently our station can test only one product at the time, but we modified the wiring so now we can attach 2 units to the same station. A new application must be written to handle the new scenario. The test has to be executed several times on both the units. The execution is sequential so unit1 first then unit2.
    I have created a CONTROL cluster with the following elements
    - bool: boolean button (means unit enabled/disabled)
    - PARAMS cluster: various text rings. This cluster is disabled and greyed out once the user enabled the starter.
    - MEASUREMENT graph
    Rules:
    - the unit can not be enabeled if any of the text rings is unconfigured.
    - the test must be interrupted immediately for the given unit if the enabled button is pressed during the test (when the user disable the unit runtime). So a reference to this button must be used and continously monitored.
    - the test must be interrupted immediately for both the units if the stop button is pressed during thet test
    - after a test is completed the results must be evaluated and the unit must be disabled if the measured values are outside of the limits.
    now... This would be a very easy task if I would have one unit only. I would just create the neccessary control references drive them to the measurement VI and here we go.
    But its getting inconveniently complex when I have control 2 units. I can not treat the control elements in an array (so like an array with 2 CONTROL clusters) because then I can not disable the PARAMS clusters independently.
    I dont see an easy way to add 2 of the CONTROL clusters to a new cluster (so treat them as one cluster), I am not sure how to get the references in this way. (if I combine them into one cluster its pretty easy to get propertynode/value for any of the elements, but I need control refs)
    So I handle both clusters as an independent control on the front panel, so I have add lot of duplicatinos to handle both units in the same way. I find this very inconvenient and error prone, plus it complicates the block diagram 
    I am wondering what would be right approach to handle these type of problems.
    (I have tried to create reentrant VIs but I gave up because I had to communicate too much between my main VI and the reentrant VIs. That made the code hard to follow)
    I use LV2012, but the attachment in LV8 so hopefully everybody can open it
    Thanks
    Attachments:
    Cluster.vi ‏16 KB

    Well... if I create a reference to the main cluster then I can use the controls[] property which will give me back 3 references in an array. First the button, second the params clusters, third the graph (maybe the order is different, it doesnt matter for now). But when I drive the params cluster reference to another property node it does not offer me a controls[] property, so I can not access the contents of the cluster itself. I may could use some sort of a cast function, but its really counter-intuitive.
    I always have to know the order of any of the given clusters and if I change the order my code will mess up instantly. And hell, should why should I refer to my objects as control[][0], control[][1] etc instead of a real name.
    Not sure if this can be resolved in the current LabVIEW environment...
    The workaround I made is that I have created a cluster in which each element are references. I drive the button, graph and params cluster references into it and as I have two units to control I made an array of this cluster.
    Not sure if you agree but this is overcomplicating the code and I had to create an extra cluster just to access to the references of my original clusters. Pain in the back.
    Let me know your thoughts!
    thx.

  • Stored procedure with multiple Reference Cursors

    In Sybase and SQLServer, result sets are returned to the application implicitly. Oracle emulates this by passing back weak reference cursors to the application through an IN OUT parameter.The number of reference cursors must match the number of results sets. For example, if 2 select statements are present in the stored procedure code, then 2 reference cursors are passed back.The Oracle Migration Workbench creates the correct number of reference cursors but assigns each select statement results to the first cursor created. Therefore only the last set of results are returned to the client.
    Before (SQLServer)
    CREATE PROCEDURE get_sch_associated_appointment_info (@piAcc_itn int) AS SELECT s.acc_itn, r.internal_key, r.mnemonic, r.descp, sh.start_dtime, sh.end_dtime FROM schdtl s, schdtlhdr sh, resource r WHERE s.acc_itn = @piAcc_itn and sh.acc_itn = @piAcc_itn and sh.resource_itn = r.internal_key SELECT sdcr.acc_itn, sdcr.rsch_dtime, sdcr.rsch_by_init, sdcr.rsch_code, sdcr.rsch_reason, sdcr.cncl_dtime, sdcr.cncl_by_init, sdcr.cncl_code, sdcr.cncl_reason, sdcr.prev_start_dtime, sdcr.prev_by_init FROM schdtl_canrsch sdcr WHERE sdcr.acc_itn = @piAcc_itn SELECT sdi.acc_itn, i.sched_notes, i.post_sched_notes, d.pre_sch_notes, d.post_sch_notes, i.detail_key, i.output_notes FROM schdtl_info sdi, extitem i, dept d WHERE sdi.acc_itn = @piAcc_itn and sdi.actual_dept = i.dept and sdi.actual_proc_no = i.proc_no and sdi.actual_dept = d.dept
    After (Migration Workbench) – Optional Section
    CREATE OR REPLACE PROCEDURE get_sch_associated_appointment_info (piAcc_itn int, RC1 IN OUT Omwb_emulation.globalPkg.RCT1) AS OPEN RC1 SELECT s.acc_itn, r.internal_key, r.mnemonic, r.descp, sh.start_dtime, sh.end_dtime FROM schdtl s, schdtlhdr sh, resource r WHERE s.acc_itn = piAcc_itn and sh.acc_itn = piAcc_itn and sh.resource_itn = r.internal_key; OPEN RC1 SELECT sdcr.acc_itn, sdcr.rsch_dtime, sdcr.rsch_by_init, sdcr.rsch_code, sdcr.rsch_reason, sdcr.cncl_dtime, sdcr.cncl_by_init, sdcr.cncl_code, sdcr.cncl_reason, sdcr.prev_start_dtime, sdcr.prev_by_init FROM schdtl_canrsch sdcr WHERE sdcr.acc_itn = piAcc_itn; OPEN RC1 SELECT sdi.acc_itn, i.sched_notes, i.post_sched_notes, d.pre_sch_notes, d.post_sch_notes, i.detail_key, i.output_notes FROM schdtl_info sdi, extitem i, dept d WHERE sdi.acc_itn = piAcc_itn and sdi.actual_dept = i.dept and sdi.actual_proc_no = i.proc_no and sdi.actual_dept = d.dept;
    After (Manual Change)
    CREATE OR REPLACE PROCEDURE get_sch_associated_appointment_info (piAcc_itn int, RC1 IN OUT Omwb_emulation.globalPkg.RCT1, RC2 IN OUT Omwb_emulation.globalPkg.RCT1, RC3 IN OUT Omwb_emulation.globalPkg.RCT1) AS OPEN RC1 SELECT s.acc_itn, r.internal_key, r.mnemonic, r.descp, sh.start_dtime, sh.end_dtime FROM schdtl s, schdtlhdr sh, resource r WHERE s.acc_itn = piAcc_itn and sh.acc_itn = piAcc_itn and sh.resource_itn = r.internal_key; OPEN RC2 SELECT sdcr.acc_itn, sdcr.rsch_dtime, sdcr.rsch_by_init, sdcr.rsch_code, sdcr.rsch_reason, sdcr.cncl_dtime, sdcr.cncl_by_init, sdcr.cncl_code, sdcr.cncl_reason, sdcr.prev_start_dtime, sdcr.prev_by_init FROM schdtl_canrsch sdcr WHERE sdcr.acc_itn = piAcc_itn; OPEN RC3 SELECT sdi.acc_itn, i.sched_notes, i.post_sched_notes, d.pre_sch_notes, d.post_sch_notes, i.detail_key, i.output_notes FROM schdtl_info sdi, extitem i, dept d WHERE sdi.acc_itn = piAcc_itn and sdi.actual_dept = i.dept and sdi.actual_proc_no = i.proc_no and sdi.actual_dept = d.dept;

    I believe you are using .NET(?). If that is the case, please post this query to the .NET Development - Crystal Reports  forum:
    SAP Crystal Reports, version for Visual Studio
    That forum is monitored by qualified technicians and you will get a faster response there.
    Thank you for your understanding,
    Ludek

  • Prerender() in backing file... setting desktop titles dynamically

    I have a link in page1 (with pageflow1 and portlet1), clicking on which the user is taken to page2 (with pageflow2 and portlet2) and the begin action method gets called in pageflow2. The begin action forwards to another another action (say, action2). action2 sets some request attributes, then finally forwards to the JSP that needs to be rendered. I have a backing file for portlet2 that has the prerender method implemented. The prerender() checks the request attribute set in action2() and accordingly sets the desktop title.
    Now my problem is, the prerender is getting called BEFORE begin action is invoked. Shouldn't the prerender get invoked just beofre the JSP is rendered? If not, then how can I set the desktop title dynamically based on some data in an action?
    Thanks in advance!

    There are two backing files you can give for a portlet.
    1. Backing file for a portlet
    2. Backing file for a JSP
    Try giving the backing file reference in JSP instead of portlet.
    -sampath

  • Dynamic programming issue: store typed ref in generic ref and back

    Hi All,
    Im working on a generic 'Snapshot' functionality for Class objects.
    Some background info:
    The basic idea is that when the class implements the snapshot interface, a 'snapshot' can be taken of that object and its attributes. At a later point the object can be restored to its previous state by recovering all of its attributes values from the snapshot.
    All types of attributes work well (data, ref to Class, ref to data, structs, tables, tables with refs, etc etc) except the typed data references ( TYPE REF TO [Type] ).
    The issue:
    What i try to acomplish is the following:
    I want to store a typed data reference (TYPE REF TO Mandt) into an untyped data reference (TYPE REF TO Data) and back.
    The goals is to, in the end, have the data refrence point to the same address as in the beginning, not necesseraly the same value.
    The problem is in the last step where i move back the reference from the untyped to the typed reference.
    here i keep getting Dumps caused by type incompatability. The weird thing is that in debug i see that both TECHNICAL TYPES are equal (MANDT) but the Absolute types differ. This still understandable because in fact both data types are unequal (REF TO Mandt vs. REF TO Data).
    I've tried dozens of things but i can not get it to work properly. Ive looked into type casting, using helper refs, trying to dynamically create the store data object with type specified, etc , etc.
    Please see the sample code below for better understanding.
    Hope you guys can help me out here. Any other solution to accomplish my goal is welcome as well ofcourse!
    Thanks in advance!
    Joris Bots
    REPORT  ztestjbo3.
    * Store a typed data reference into generic 'Store'.
    * and restore from that store.
    * Phase 1: Store/Save data reference in store
    * Phase 2: Change location our datref points to
    * Phase 3: Restore our dataref from the store
    * The generic data store (untyped)
    DATA g_datastore TYPE REF TO data.
    * Simple data
    DATA lv_mandt1 TYPE mandt VALUE '100'.
    DATA lv_mandt2 TYPE mandt VALUE '200'.
    * Our data reference (typed)
    DATA lr_mandt TYPE REF TO mandt.
    ************************* Phase 1 Store/Save data reference in store
    GET REFERENCE OF lv_mandt1 INTO lr_mandt.
    * our data ref lr_mandt now points to lv_mandt, containing '0100'
    *create data g_datastore like lr_mandt.
    g_datastore = lr_mandt.
    * store/save this ref to '0100'.
    ************************* Phase 2 Change location our datref points to
    * Get other ref into LR_MANDT
    GET REFERENCE OF lv_mandt2 INTO lr_mandt.
    ************************* PART 3 Restore our dataref from the store
    FIELD-SYMBOLS <fs> TYPE any.
    ASSIGN g_datastore TO <fs>.
    * This is where it all goes bad.
    lr_mandt = <fs>.
    * Shortdumps caused by type incompatability
    * In debug it shows that technical Types are equal (MANDT)
    * but The Absulote types (%_T00004S00000038O0000022592, etc) differ.
    * Below code is NOT the solution since lv_Mandt1 then overwrites lv_Mandt2
    *ASSIGN g_datastore->* TO <fs>.
    *lr_mandt->* = <fs>.
    Edited by: Joris Bots on Jan 13, 2011 5:06 PM

    Hi ..
    Your last statement was wrong.
    Just add the below line instead of
    *****ASSIGN g_datastore TO <fs>.     " Here <FS> is type od DATA which is generic type
    This is where it all goes bad.
    ****lr_mandt = <fs>.                            " here you try to assign one data type directly to particular data type MATNR which is not possible
    ASSIGN g_datastore->* to <fs>.
    GET REFERENCE OF <fs> INTO lr_mandt.
    IF sy-subrc = 0.
    ENDIF.
    Thanks
    Subhankar

  • How to retain ViewController references while doing in-app purchase

    I have a modally presented ViewController.  In it I download data from a server.  In
    -(void)connection:(NSURLConnection *)connection didReceiveData:(NSData *)data where my data arrives I have a UIProgressView bar which updates while downloading is going on.  This works fine when I do not go through the SKPayment process before starting the download.  The problem is that if before I start downloading I go through the SKPayment process to do an in-app purchase, and then come back to the ViewController to download the purchased data, the ProgressView or any messages I try to put out don't work.  Also dismissing the modal view does not work correctly.  I assume that this because during the SKPayment process Apple takes over so my app resigns (applicationWillResignActive) and when it comes back the references are lost.  All the SKPayment stuff works fine and downloading also works.  The only problem is dispaying progress and messages after going through the in-app rigamarole. 
    Not sure how to put my question. Maybe: how can I retain the reference in the ViewController?  I am using XCode 4.2 and compile for ios 5.0.  I am using ARC.  Everything is run on the main thread.  I tried [self view] in the upDateFromInternet method and the view does load (reload) but still does not show ProgressBar...

    No, that's what I said:
    an internal table declared and filled during a start routine will be available only ONLY for the current executing datapackage; other datapackages cannot read an itab declared and filled during execution.
    Is this what you require: a table which would be available for all datapackages. if you can update this table from any data package, how do you manage the case when your data loaded in parallel; any datapack could update this data simultaneously...
    as of noew I can think of three options:
    - use a database table (you could even use your PSA table but I don't recommend updating the PSA table during loading
    - try the abap clause STATIC in your declaration; you'll have to ensure that each start routine will check if this table is already declared; if yes, avoid declaring it again, (otherwise: dump)
    - store your table into MEMORY using ABAP stmt EXPORT
    hope this helps...
    Olivier.

  • Invalid Switch Executive References (once in while)

    Hi there,
    a colleague of mine is using a self-written little LV-sequencer to do UUT testing. At the beginnig of his "test sequence" he opens the corresponding SE-Session and does not close it before having performed the last test on the last UUT. He takes the reference form the Open Session-VI and puts it in a global variable. When switching, he accesses this global in order to get back the reference and put it to the Open / Close Routes-VIs. Every once in a while, the SE-VIs return an error: the reference is not valid.
    So we tried to do a workaraound: after read access, the refernece is checked using the LabVIEW "Not a refnum"-VI. If the ref should be void, we wanted to re-open the SE session. To keep it short.... nice idea, but we failed.....
    In order to getting the SE to work again, we even have to shutdown LabVIEW!
    I remember seeing a phenomenon (invalid references) like that with TestStand 3.1 and SE2.0. But only on very rare occasions, so I decided to ignore that
    We're using WinXP, LV 7.1.1, SE2.1.
    Any ideas?
    Cheers
    Oli
    Programming languages don't create bad code, programmers create bad code....

    Hi Brian,
    up to now, your tip seems to have fixed the porblem, thank you very much! The first overnight-test looks promising.
    Do you have an idea, why LabVIEW wants to unload the global from time to time? I'm a bit confused that this only happens only every once in a while....
    Cheers
    Oli
    Programming languages don't create bad code, programmers create bad code....

  • Open PDF from database in a browser and run Javascript within PDF

    What we're trying to accomplish is to query a PDF in the database and open the PDF in the browse. Once opened if a user click on a link to open another PDF, it launchs a URL to Coldfusion, that queries the database and opens the PDF link. This all works but we also want to have the open PDF goto a section or bookmark within the PDF. We currently have JavaScripts within the PDF links that do that but only if the PDF is in the file system. We're using the app.openDoc to get a reference to the opened PDF. But when opening the PDF from the database we pass the control to Coldfusion using app.launchURL or app.getURL. These do not pass back a reference to the opened PDF and the JavaScripts fails.
    I'm looking for different methods or ideas.
    Is there another way to do this, I'm new to acrobat JavaScripting?
    Thanks, Rob

    I tried tapping and holding the attachment icon, it just shows "Open / Bookmark/ Copy"...
    Also i tried opening the attachement first and then tapping on it, it just shows "open in Safari"
    Is there any settings to be done to add the options of Opening in Adobe Reader/or any other Docu Sign app . the exhibition booth systems one would work i think
    Appreciate if someone could help

  • Automator Find Text and Alert

    I am new to Automator and AppleScript. I need to create a simple application where I can drop txt files onto, the app would then search the document for the word "Failed". Then show a dialogue showing the result of the find. Please can someone point me in the right direction! Thank you in advance.

    Ok this is starting to get a bit unwieldy to post to the list so I also put a copy in my dropbox folder at  http://dl.dropbox.com/u/13002668/DropFile.scpt
    In addition to what it did before this will save the serial number and validation code to a file 'FailedBatterySerialNumbers.txt' on your Desktop. I added the name of the file that the serial number came from. Figured you might want to go back and reference the original file.
    The file looks like:
    Untitled 2.txt
    serial-number    4H6230BBVTH
    Battery Validation Code    NBD-75B1770F-02
    Untitled 2.txt
    serial-number    4H6230BBVTH
    Battery Validation Code    NBD-75B1770F-02
    enjoy, regards
    on open droppedFiles
      -- Set destination Folder on Desktop
              set destDir to (path to desktop) as text
              set destDir to alias (destDir & "FailedBatteries:")
      -- Set string to search for in log files
              set grepString to "failed"
      -- For each file dropped on us look for the grepString
      -- If found move the file to the destDir
              repeat with aFile in the droppedFiles
                        try
                                  set ret to do shell script "grep -i " & grepString & " " & quoted form of POSIX path of aFile
                                  tell application "Finder"  to move aFile to destDir
      saveData(aFile)
                        on error msg number num
                                  if num ≠ 1 then
                                            display dialog "Unknow errror: " & msg & " Number:" & num & " in file:" & aFile
                                  else
                                            display dialog "KGB:" & grepString & " not found in file:" & return & aFile
                                  end if
                        end try
              end repeat
    end open
    on saveData(aFile)
              try
                        set values to do shell script "grep -E '^serial-number|^Battery Validation Code' " & quoted form of POSIX path of aFile
              on error msg number num
                        if num ≠ 1 then
                                  display dialog "saveData:unknow errror: " & msg & " Number:" & num & " in file:" & aFile
                        else
                                  display dialog "saveData: string not found in file:" & return & aFile
                                  return
                        end if
              end try
              tell application "Finder" to set aFile to (name of aFile)
              set fileName to (path to desktop as text) & "FailedBatterySerialNumbers.txt"
              try
                        set fnum to open for access fileName with write permission
              on error msg number num
                            close access file fileName
                        display dialog "File error:" & msg & " number:" & num
                        return
              end try
              set ourEof to get eof of fnum
              write (aFile & return & values & return & return) to fnum starting at ourEof + 1
            close access file fileName
              return
    end saveData

  • How I fixed my broken iOS5 update/restore

    Like many of you, my update to iOS5 caused me to lose all my content on both iPhone and iPad. I have lots of playlists and lots of app content in folders, and I've been trying various options while re-restoring my devices to get the content back. I've figured out what may be one bug in the process, and I've figured out how to work around it.
    The core issue seems to be that the backed-up references to apps, and books, and playlists, and other content is not being resolved to their correct addresses during the restore, which leads to long delays and ultimately nothing being transferred. However, you can trick iTunes into updating these content references, and then many problems seem to go away and you can preserve your old app content, playlists, etc.
    Here's what I did.
    Assumption: you had performed a full sync and a full backup with your original system before using the iOS5 updater. Unless the content is in iTunes on your computer, and unless you have a snapshot of devices state saved on the computer, I'm not sure how to salvage a botched restore. Hopefully this backup has not been overwritten...
    1) Take your device and perform a new iOS5 restore on it in iTunes. At the appropriate point, tell the program to Set Up your device from the original iOS4 backup you had made.
    2) In the last part of the restore process it will begin trying to resync your content back onto your device, but you can interupt that by pressing the close box in the status message area of iTunes. That resync is not going to work, or you wouldn't be reading this post. We're going to make that resync work by following the next steps...
    3) Working from right to left across the sync configuration screens in iTunes, you are now going to turn off the single content-type syncing options. So first press the single checkbox to turn off Photo syncing in the Photo tab, then turn off the single checkbox for Sync Books and the single checkbox for Sync Audiobooks in the next tab. Continue for iTunesU, Podcasts, TV, Movies, Music, Ringtones. Note: each of these area maintains pointers to the individual content items or playlists that you like, and when things get fixed we'll simply turn the top checkboxes back on and your particular content will flow back onto the device.
    4) Click on the Apps tab, and look at all of your app screens on the device. You may notice some apps that have white featureless icons. These are the bad apps that will ruin your restore; you must eliminate all the white icons! You have two ways of doing this: 1) if you don't need the app right away, click on the close box on its icon to remove it [don't worry, when everything is working again you can add that app back later from the iTunes configuration screen or by redownloading it to your device], 2) if you really want the app and it's saved state, then you must click on the close box and then find the app in the app list on the left and add it back in. When the app is added back in, it will have its colored icon. [NOTE: it may be possible to restore the color by simply moving the icon to a different location in its folder or window]
    5) Now go to the first Summary tab and press the Apply and/or Sync button to resync the device. This time the sync should work, and you should have your apps back with their saved state (assuming the app developers wrote the app to preserve their state)
    6) After you've got that part working, go back and reanable your other device syncing options (music, tv shows, books, etc). When you reenable these, they will still point at your content or playlists you had chosen previously. Press Apply/Sync again, and you should have all your content back on your device.
    I can not vouch that this solution will work for you. I was stuck with two devices that I had to wipe clean to get working at all...and I really wanted my previously-backed-up content, and I've been re-restoring and playng around in order to find something that worked. My iOS5 devices now have all my old iOS4 content, and I'm very happy I don't have to replay Plant vs Zombies from the beginning.
    I hope this posting can help someone else complete the migration successfully...

    very nice of you to share.....however, i am feeling pretty puny and ****** off at apple. i guess the best offense is a good defense and where in the **** did i get the impression that apple was different from any other capitalistic corporation? i guess i just dreamt that **** up.
    i am pretty bitter. i have no music, can't get or fix my mail, battery problems, probably lost an internship and a possible love interest....why? technology. to quote 'animal house'....."i ****** up....i trusted you.'
    nevermore saith the raven....nevermore....
    i am done with all of this b.s. ....there has to be something better than this. tin cans perhaps?

  • What happened to the Lightroom 5 Beta forum? Deleted, not archived or merged?

    What happened to the Lightroom 5 Beta forum? I understand that LR5.2 is now in full release, but it would be nice if the Beta forum was locked and archived for reference. It seems to have been completely deleted, along with some detailed feedback by myself and other Beta testers. (I can't find it if it is archived, anyway.) None of my many, many LR5Beta forum contributions are listed in my "Content" tab in my Adobe profile. All of the links to the LR5Beta discussion in which I contributed to (such as http://forums.adobe.com/message/5271729#5271729 ) lead me to this message:
    "Unauthorized
    It appears you're not allowed to view what you requested. You might contact your administrator if you think this is a mistake."

    Big thumbs up for Pete.Green and Daniel T! Thank you for this incredibly fast response! I worked very hard on explaining my "Advanced Adjustment Brush" proposal back in May 2013, and I am glad that it is again available for reference... in fact, even better, as it appears that the thread is now fully unlocked and availble to reply to. I still firmly believe this proposal is the way forward for Lightroom's local adjustment tools in the future.  I hope that the remainder of the LR5Beta forums will eventually be brought back for reference.

  • Generic working in eclipse compiler but not through builds

    The following code snippet works fine in my eclipse development environment (1.6.0_06), but the build system running 1.6.0_06 throws exception:
    MyClass:343: incompatible types
    found : java.util.List<C>
    required: java.util.List<B>
    entries = createListFromSmartCopy(myAList, new B(), true);
    Types:
    A is an interface
    B is an interface of A
    C is an implementation of B
    List<A> aList = new ArrayList<A>();
    aList.add(new A());
    List<B> return = createListFromSmartCopy(aList, new C(), true);
        * <p>Creates a copy of a list where the source list could be an ancestor
        * type of the returned list. It also uses a reference object to actually
        * construct the objects that populate the return list.</p>
        * @param <T> - The ancestor type of the source list
        * @param <R> - The derived type of the destination list
        * @param <S> - The more derived type of the prototype object used to
        * construct the list of R's
        * @param sourceList - The source list
        * @param referenceObject - The object used to construct the return list
        * @param deepCopy - Deep copy serializable objects instead of just copying
        * the reference
        * @return a list of R's (as defined by the caller) of entries with the
        * object constructed as a copy of referenceObject with the properties of the
        * sourceList copyied in after construction
    public static <T extends Serializable, R extends T, S extends R> List<R> createListFromSmartCopy(
                List<T> sourceList, S referenceObject, boolean deepCopy)
          List<R> retr = new ArrayList<R>();
          for(int i = 0; i < sourceList.size(); i++)
             retr.add(copyOf(referenceObject));
             copyInto(sourceList.get(i), retr.get(i), deepCopy);
          return retr;
       }Any thoughts on either:
    1. How does this pass the compiler validation inside eclipse, even through 'R' has not been defined? I believe that the code is doing some sort of return type inference to return the exactly correct type of list as referred by the return result or else it is simply ignoring the invariant capture of R all together and silently dropping the error. The funny thing is that the code does work just fine in practice in my development system without an issue.
    or
    2. Why if the code is valid does the independent build system disallow this generic return type 'inference' to occur? Are there compiler flags I can use to withhold this special condition?

    Thanks for the response, I wasn't trying to show a full example but just my implementation's snippet. I'll list one now:
    package test;
    import java.io.ByteArrayInputStream;
    import java.io.ByteArrayOutputStream;
    import java.io.IOException;
    import java.io.ObjectInputStream;
    import java.io.ObjectOutputStream;
    import java.io.Serializable;
    import java.util.ArrayList;
    import java.util.List;
    public class TestMe
        * <p>This method performs a deep copy of an object by serializing and
        * deserialzing the object in question.</p>
        * @param <T> - The type of data to copy
        * @param original - The original object to copy
        * @return The object who's state should be the same as the original. This
        * call uses serialization to guarantee this copy is fully separate from the
        * original, so all sub-object references are also deep copies of their
        * originals
       @SuppressWarnings("unchecked")
       public static <T extends Serializable> T clone(T original)
          T obj = null;
          try
             ByteArrayOutputStream bos = new ByteArrayOutputStream();
             ObjectOutputStream out = new ObjectOutputStream(bos);
             out.writeObject(original);
             out.flush();
             out.close();
             ObjectInputStream in = new ObjectInputStream(new ByteArrayInputStream(
                      bos.toByteArray()));
             obj = (T)in.readObject();
          catch(IOException e)
             e.printStackTrace();
          catch(ClassNotFoundException cnfe)
             cnfe.printStackTrace();
          return obj;
        * <p>Copies the properties from one object to another. The destined object
        * in this method must be derived from the source object. This allows for a
        * faster and smoother transition.</p>
        * @param <T> The type of source
        * @param <R> The type of destination
        * @param source - The source object
        * @param destination - The destination object
        * @param deepCopy - Copies the reference objects instead of just passing
        * back the reference pointer reference
       public static <T, R extends T> void copyInto(T source, R destination,
                boolean deepCopy)
       // Stubbed because it links into a ton of unnecessary methods
        * <p>Copies the values of a list of an ancestor class into the values of
        * another list who's value is derived from the ancestor.</p>
        * @param <T> - The ancestor type of the source list
        * @param <R> - The derived type of the destination list
        * @param sourceList - The source list
        * @param destinationList - The destination list
        * @param deepCopy - Deep copy serializable objects instead of just copying
        * the reference
       public static <T, R extends T> void copyIntoList(List<T> sourceList,
                List<R> destinationList, boolean deepCopy)
          if(sourceList.size() > destinationList.size())
             throw new IllegalArgumentException(
                      "Cannot copy entire source set into destination list");
          for(int i = 0; i < sourceList.size(); i++)
             copyInto(sourceList.get(i), destinationList.get(i), deepCopy);
        * <p>Creates a copy of a list where the source list could be an ancestor
        * type of the returned list. It also uses a reference object to actually
        * construct the objects that populate the return list.</p>
        * @param <T> - The ancestor type of the source list
        * @param <R> - The derived type of the destination list
        * @param <S> - The more derived type of the prototype object used to
        * construct the list of R's
        * @param sourceList - The source list
        * @param referenceObject - The object used to construct the return list
        * @param deepCopy - Deep copy serializable objects instead of just copying
        * the reference
        * @return a list of R's (as defined by the caller) of entries with the
        * object constructed as a copy of referenceObject with the properties of the
        * sourceList copyied in after construction
       public static <T extends Serializable, R extends T, S extends R> List<R> createListFromSmartCopy(
                List<T> sourceList, S referenceObject, boolean deepCopy)
          List<R> retr = new ArrayList<R>();
          for(int i = 0; i < sourceList.size(); i++)
             retr.add(clone(referenceObject));
             copyInto(sourceList.get(i), retr.get(i), deepCopy);
          return retr;
       public static void main(String[] args)
          List<A> aList = new ArrayList<A>();
          aList.add(new AImpl());
          aList.add(new AImpl());
          List<B> bList = createListFromSmartCopy(aList, new C(), true);
          for(B bItem : bList)
             System.out.println("My String = "
                      + bItem.getString() + " and my number = " + bItem.getInt());
       public static interface A extends Serializable
          public void setString(String string);
          public String getString();
       public static class AImpl implements A
          private static final long serialVersionUID = 1L;
          @Override
          public void setString(String string)
          @Override
          public String getString()
             return null;
       public static interface B extends A
          public void setInt(int number);
          public String getInt();
       public static class C implements B
          private static final long serialVersionUID = 1L;
          public C()
          @Override
          public String getInt()
             return null;
          @Override
          public void setInt(int number)
          @Override
          public String getString()
             return null;
          @Override
          public void setString(String string)
    }In my eclipse (20090920-1017), this compiles and runs just fine. I stripped out the functional pieces that weren't pertinent to the discussion.

Maybe you are looking for