This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
I tried to save a big snapshot and it threw 'out of memory event' and some message that I need to increase xmx parameter next time. Ok. But after this event the snapshot was added into snapshots list and the 'unsaved star' in its title disappered. I closed the snapshot and tried to open the snapshot from snapshots list but it threw: Annotation: Error while loading snapshot: The file is not a valid NetBeans Profiler Snapshot file. java.io.IOException: The file is not a valid NetBeans Profiler Snapshot file. org.netbeans.modules.profiler.LoadedSnapshot.load(LoadedSnapshot.java:240) org.netbeans.modules.profiler.LoadedSnapshot.loadSnapshot(LoadedSnapshot.java:354) org.netbeans.modules.profiler.ResultsManager.loadSnapshot(ResultsManager.java:388) org.netbeans.modules.profiler.ResultsManager.loadSnapshots(ResultsManager.java:366) org.netbeans.modules.profiler.ProfilerControlPanel2$SnapshotsPanel.loadSelectedSnapshots(ProfilerControlPanel2.java:878) org.netbeans.modules.profiler.ProfilerControlPanel2$SnapshotsPanel.access$3200(ProfilerControlPanel2.java:616) org.netbeans.modules.profiler.ProfilerControlPanel2$SnapshotsPanel$4.mousePressed(ProfilerControlPanel2.java:770) I think if there occures an error during saving of a snapshot it should rollback and get into the state before saving.
Now snapshotSaved event is fired only if snapshot is correctly saved, otherwise corrupted file is deleted. Fixed in trunk.
Fixed in release55 branch.
verified
mistake, it doesn't work in profiler 5.5
in trunk too
Don't know what exactly now doesn't work for you after the fix, I've experienced no problems saving snapshots. Please describe exact steps how to reproduce and concrete problem - buggy behavior, expected behavior.
I can reproduce it by simulation: 1. set -xmx to 96 megs 2. create JSP sample project 3. start profiling - memory profiling, including allocation stacktraces 4. wait until the application is started 5. take snapshot 6. wait the ide is using about 90 mb 7. save snapshot Profiler informs the snapshot cannot be saved because there is not enough memory but something is saved - Saved Snapshots list contains a new item without icon. After opening of this item it throws error message 'it is not a valid profiler snapshot file.' Expected behaviour is to not create corrupted snapshot files in this state.
Thanks for the steps, now I'm able to reproduce and fix. Should be now correctly fixed in trunk. Please verify before merging to release55 branch.
verified in trunk
Merged into release55 branch.
Fix reviewed and it is OK.
verified in 5.5 rc2 build 061005
Closing old issues
Reverting to original Target Milestone value changed by mistake. Sorry for inconvenience.