1.18.00.00 Crash in sample editor.

Started by Paul Legovitch, March 07, 2010, 19:21:24

Previous topic - Next topic

Paul Legovitch

Full Version:
OpenMPT v1.18.00.00

Has the bug occured in previous versions? If yes, please specify version(s):
1.17.03.03 is also crashing, but 1.17.03.02 works fine.

Description of the bug:
In the sample editor, ompt crashes after 2 or 3 operations from the sample toolbar (normalize, amplify, etc.) or from shortcuts (Ctrl+X, etc).

How often does it happen?:
Everytime I use the sample editor in 1.18.00.00 or 1.17.03.03 (never in 1.17.03.02)
I use linux+wine but I have the exact same behaviour in winXP.

How to reproduce (step by step description):
Ex : open a module with a few samples. Ctrl+X to cut a sample, go to another sample, click downsample, then normalize and the crash occurs.

Saga Musix

That's very strange. Does it also happen in the latest "stuff" build?
» No support, bug reports, feature requests via private messages - they will not be answered. Use the forums and the issue tracker so that everyone can benefit from your post.

Paul Legovitch

Yes, the latest .01 has the same behaviour. :(
I'm going to take a wild guess and say this bug has to do with the sample undo feature introduced in 1.17.03.03 and 1.18.00.00.
I have a laptop with only 256 Mo Ram, so maybe it's related though the crashes occur with short samples and few changes (not memory demanding).

Saga Musix

Please add the section "[Sample Editor]" to your mptrack.ini and play around a bit with the "UndoBufferSize" value in this section. The value is in Megabytes, the default on your system should be 64mb, so you could try something like UndoBufferSize=1 or UndoBufferSize=10 to see if it helps.
» No support, bug reports, feature requests via private messages - they will not be answered. Use the forums and the issue tracker so that everyone can benefit from your post.

Paul Legovitch

I had a hard time finding the mptrack.ini file : I thought I would find it with the .exe but it was in a hidden folder called Application Data.
Anyway I tested UndoBufferSize=1 and 10 and both seems to solve the problem, I couldn't make ompt crash while clicking on every sample editing tools like a mad man ! :D
So it's great ! But what's the difference between 1 and 10 ?

Saga Musix

QuoteI had a hard time finding the mptrack.ini file : I thought I would find it with the .exe but it was in a hidden folder called Application Data.
The official release (as you might know, releases 1.17.03 through 1.18 were all just testing releases) will contain a link to the AppData directory in the tracker's directory, so the files will be easier to locate.

The difference between 1 and 10 is easy: UndoBufferSize=1 will restrict the undo buffer size to 1 MiB, 10 will restrict it to 10 MiB.

In the meanwhile, I have found (and fixed) a problem related to this (the maximum size was not set to 64 MiB in your case, but something close to 256 MiB), but I will dig into this some more to find out why OpenMPT actually crashes.

EDIT: Please try again with the latest "stuff" version. If it works alright without the UndoBufferSize variable being set, please try again with UndoBufferSize=512 and see if the problem occurs again.
» No support, bug reports, feature requests via private messages - they will not be answered. Use the forums and the issue tracker so that everyone can benefit from your post.

Paul Legovitch

The latest version does not crash, either with or without UndoBufferSize=512 (as a comparison I tested the same operations on the same samples with 1.18.00.00, the crash occurs after 3-4 clicks).
So it works, plus I can undo multiple times (only one time with UndoBufferSize=1 but here I did not encounter any limit).

Saga Musix

Hmm, it's strange that it does not crash anymore at all as the "other" fix I applied was a fix in the undo code for deleting sample selections. But good to know that it doesn't crash anymore.

I guess you can close this bug report then.
» No support, bug reports, feature requests via private messages - they will not be answered. Use the forums and the issue tracker so that everyone can benefit from your post.