View Issue Details

IDProjectCategoryView StatusLast Update
0000334OpenMPTGeneralpublic2013-01-30 14:47
Reportermoltres_rider Assigned ToSaga Musix  
PrioritynormalSeveritycrashReproducibilitysometimes
Status resolvedResolutionfixed 
Platformx86OSWindowsOS Version7
Product VersionOpenMPT 1.21.01.00 (upgrade first) 
Target VersionOpenMPT 1.22.01.00 (upgrade first)Fixed in VersionOpenMPT 1.22.01.00 (upgrade first) 
Summary0000334: find any instrument/replace with note -1 multiple times causes freeze
Description

if you find and select 'any instrument' and replace with all 'note -1' repeatedly the program slows down until eventually freezing and not responding

Steps To Reproduce

open a large module (40+) patters >5 minutes
-find/replace - any instrument - replace with note - 1
do this about 7 times
each time the program gets slower and slower until freezing completely

Additional Information

I experience this after applying a +1 oct on whole pattern but that may or may not be related

TagsNo tags attached.
Has the bug occurred in previous versions?
Tested code revision (in case you know it)

Activities

jmkz

jmkz

2013-01-16 16:22

reporter   ~0001051

Last edited: 2013-01-16 16:28

Search and replace a large file is high CPU consuming, so expect some time to end. Try leaving OpenMPT alone till end their tasks, and check if even leaving alone also freezes. Even at my side, search and replace whole song takes 3 and half minutes each round for this module: http://modarchive.org/index.php?request=view_by_moduleid&query=143280

jmkz

jmkz

2013-01-16 16:30

reporter   ~0001052

My mistake on 1051 edits. Anyway, consider some time to finish.

Saga Musix

Saga Musix

2013-01-16 20:11

administrator   ~0001053

Last edited: 2013-01-17 01:11

<blockquote>Search and replace a large file is high CPU consuming</blockquote>
That part isn't true (at least the Find/Replace algorithm itself is really fast), and I don't think it would freeze completely at all, but search/replace creates many undo points (one for every cell), and thus it will get slower and slower once you've reached more than 100,000 undo points (deleting previous undo points is slow). I will either change the behaviour to just create one undo point per pattern, or merge the undo points internally.

Saga Musix

Saga Musix

2013-01-17 01:02

administrator   ~0001054

Last edited: 2013-01-17 01:07

The behaviour has been changed to create only one internal undo point per pattern for each replace action. This shouldn't congest the undo buffer anymore and thus not slow down the program: http://sagagames.de/stuff/mptrack.exe
Creating undo steps is a relatively expensive operation, so this update should also greatly speed up Find/Replace in general.

moltres_rider

moltres_rider

2013-01-30 12:33

reporter   ~0001078

sorry I took awhile to respond but I really haven't got to test it out yet, but it STILL seems to slow down each time I use the find/replace... I am doing the find/replace one pattern at a time from pattern 19 and by pattern 23, the find/replace is REALLY SLOW!!!

Saga Musix

Saga Musix

2013-01-30 12:41

administrator   ~0001079

Do you use "replace all"? I have done a test on azo_osl.it, one of the biggest modules out there, and find&replace now works instantly on it.

moltres_rider

moltres_rider

2013-01-30 12:55

reporter   ~0001080

now it doesn't want to work at all!! it kept getting slower and slower and now all it does is when I go to find - note: any, replace with: instrument 7, it does NOTHING but jump to the first note in the first channel on EVERY pattern I try it on, and I DO have 'replace all' checked!!!

Saga Musix

Saga Musix

2013-01-30 12:56

administrator   ~0001081

If it just jumps to the first occurence, you most definitely don't have the "Replace with:" checkbox checked. Right?

moltres_rider

moltres_rider

2013-01-30 14:13

reporter   ~0001082

yes, that somehow AUTOMATICALLY got unchecked... I also noticed after putting the checkmark back in play it was fast again, but still seems to slow down, I also noticed that using 'find next' in the next pattern doesn't experience the slow issue as bringing up the dialog does... I continued to pattern 40 using 'find next' as that didn't slow it down...

Saga Musix

Saga Musix

2013-01-30 14:45

administrator   ~0001083

Last edited: 2013-01-30 14:47

I bet the checkbox got "automatically" unchecked just like OpenMPT "broke" for you so often before - i.e. it was your own fault (FWIW OpenMPT never unchecks that box by itself - never ever. There is no code for doing that). I'm closing this because the original issue clearly has been resolved. Find&Replace will remain slow-ish if you don't use "Replace All" because that's how it works, but noone with a sane mind would want to Find&Replace 100,000 notes by hand anyway.

Issue History

Date Modified Username Field Change
2013-01-16 12:13 moltres_rider New Issue
2013-01-16 16:22 jmkz Note Added: 0001051
2013-01-16 16:25 jmkz Note Edited: 0001051
2013-01-16 16:28 jmkz Note Edited: 0001051
2013-01-16 16:30 jmkz Note Added: 0001052
2013-01-16 20:11 Saga Musix Note Added: 0001053
2013-01-17 00:57 Saga Musix Assigned To => Saga Musix
2013-01-17 00:57 Saga Musix Priority high => low
2013-01-17 00:57 Saga Musix Status new => assigned
2013-01-17 00:57 Saga Musix Product Version => OpenMPT 1.21.01.00 (upgrade first)
2013-01-17 00:57 Saga Musix Target Version => OpenMPT 1.22.01.00 (upgrade first)
2013-01-17 00:57 Saga Musix Priority low => normal
2013-01-17 01:02 Saga Musix Note Added: 0001054
2013-01-17 01:04 Saga Musix Status assigned => feedback
2013-01-17 01:07 Saga Musix Note Edited: 0001054
2013-01-17 01:11 Saga Musix Note Edited: 0001053
2013-01-30 12:33 moltres_rider Note Added: 0001078
2013-01-30 12:33 moltres_rider Status feedback => assigned
2013-01-30 12:41 Saga Musix Note Added: 0001079
2013-01-30 12:41 Saga Musix Status assigned => feedback
2013-01-30 12:55 moltres_rider Note Added: 0001080
2013-01-30 12:55 moltres_rider Status feedback => assigned
2013-01-30 12:56 Saga Musix Note Added: 0001081
2013-01-30 12:56 Saga Musix Status assigned => feedback
2013-01-30 14:13 moltres_rider Note Added: 0001082
2013-01-30 14:13 moltres_rider Status feedback => assigned
2013-01-30 14:45 Saga Musix Note Added: 0001083
2013-01-30 14:45 Saga Musix Status assigned => resolved
2013-01-30 14:45 Saga Musix Resolution open => fixed
2013-01-30 14:46 Saga Musix Fixed in Version => OpenMPT 1.22.01.00 (upgrade first)
2013-01-30 14:47 Saga Musix Note Edited: 0001083