Problems with sound layers

I’ve recently discovered a problem with sound layers. I got myself out of trouble because I do incremental saves. That is I save my projects regularly using filename, filename-2 etc. This allowed me to recover the situation.

If you put more than 1 sound file per sound layer, you can’t delete the second or subsequent sound files from they layer, or delete the sound layer without Pencil2D crashing.

Users need to be warned about this problem.

I’ve just discovered another wrinkle, if your project has no bitmap or vector layers and just consists of a camera layer and a sound layer, you can delete a sound layer with more than one sound file.

Users have not been warned about this problem because it is not a known issue. I just started up a project with the latest version of Pencil2D, added multiple sound files in a single sound layer, and I can delete the second clip or the entire layer just fine, so something else is happening.

What version of Pencil2D are you using? Please check by going to Help > About. If you are using anything less than 0.6.6, upgrade and try again. If you are using 0.6.6, you can try downloading the latest nightly build as it may have a fix for your issue. They are available on the same page as the stable downloads. If that does not work, please provide a video of the issue or a project file with clear, minimal steps to consistently reproduce the issue so we can determine what is causing the issue and how to fix it.

Hi Pencil2D Community

I am using version 0.6.6, but what I hadn’t previously noticed it’s not the number of sound files that causes the problem but the position of the frame marker.

If this is at position 1, then deleting the sound layer results in a crash.

At any other position, of the frame marker, Pencil2D doesn’t crash.

Also if you attempt to delete a sound file with the frame marker at position 1 Pencil2D crashes.

It look as if its the frame position @ 1 that is the problem.

I didn’t notice this previously.

Elisa Kivi

Hi Pencil2D Community

I’ve done more investigation, I did experiments using very small sound files. But the original problem the sound files were much larger.

So as a workaround, I’ll use smaller sound files. One can only relate what one has found, in this case I’ve now looked into the situation systematically.

I should also state the computer I’m using is low end hardware, costing about $200. It has a 2 GHz processor and only 4 GBytes of memory. The spec might be part of the problem.

Thank you for producing an excellent software package, I’m have fun exploring what it can do.

Elisa Kivi

@AnimatorElisa In cases like this it is advised that you share the specific file that caused the crash along step by step instructions on how to reproduce the problem. This is how we ask people to report bugs so developers can attempt to invoke the same problem and with their specialized debugging tools attempt to find the repair the issue.

While a low-end hardware might be a potential cause for the crash (it can’t process fast enough the changes because windows can’t cope with it) it is always important that we rule out every possible issue once these crashes appear.

If you can share the original file that caused you issues it would be beneficial for everyone using Pencil2D in the future so we can try to fix it and at the same time learn to avoid such cases.

I second what @JoseMoreno has suggested and additionally repeat my suggestion to try the nightly build. It is unlikely this particular issue is due to poor system specs.

Hi Pencil2D Team

If I wanted to look at the Pencil2D code how would I do it?

I’ve been attempting to diagnosis where the problems exist, but without looking at the code myself, this is difficult.

I’m not criticising the team, but I know that sometimes you can be too close to a problem to see it and someone from outside may be able to assist.

Other than a few very small niggles, Pencil2D is an excellent package. For animators, like myself, please keep your efforts going.

Elisa Kivi

Hi Pencil2D Team

Attached is a document in .doc format and a .zip file containing the files.

Elisa Kivi

(Attachment Sound_layer.doc is missing)

(Attachment Sound_Problem.zip is missing)

@AnimatorElisa The best way for you to assist is to help us reproduce the issue. Once we can reproduce an issue, it is relatively easy to debug the program to find the cause. If we can’t reproduce the issue, then it’s next to impossible for us to find the cause. There are many different ways even a single action could potentially cause the program to crash.

The files you sent did not upload correctly here. You may have to log into the website and upload them directly here rather than attaching them in an email. Another option would be to upload the files to a file sharing site (Google Drive, Dropobox, WeTransfer, mega.nz, etc.) and just share the link to that here.

If you are set on debugging the issue yourself, the code for Pencil2D is available on Github and there is a mostly up-to-date compilation guide in our wiki for various platforms. The program is written in C++ with the Qt framework.

Hi Pencil2D Team

I have supplied you three files which illustrate the issue. I’ve now ascertained that the issues pertain to one version of Windows, that is 10 Pro version. For Windows 7 Pro & Linux there are no issues.

Windows 10 Pro handles calls to open a new window, input data from a stream differently. This is illustrated when you switch on automatic save. Windows 10 Pro simply saves when the required number of changes have been made.

Windows 7 Pro & Linux display a new small window in the centre of the screen. This has a question, something like do you want to save? Underneath three on screen Button Yes, No & Never.

Pencil2D doesn’t proceed until a button is pressed & then acts upon the answer.

I’ve included the three files again with this email.

Elisa Kivi

Sound.pclx (282 KB)

Sound-2.pclx (522 KB)

Sound-3.pclx (522 KB)

Hi Pencil2D Team

The first files works there are no problems. All three files visually are identical, the only differences are in the sound layer.

Attached are the sound files.

(Attachment Sound-1.mp3 is missing)

(Attachment Sound-3.mp3 is missing)

(Attachment Sound-4.mp3 is missing)

(Attachment Sound-2.mp3 is missing)

Hi Pencil2D Team

Please could you make it possible for users to upload .mp3 files to your email account.

Elisa Kivi

There is no difference between Windows and other operating systems when it comes to the autosave. If you have a document that has never been saved before, a popup dialog asking you if you want to save if autosave is enabled and you have made enough modifications to trigger it. It will saving without asking if the project has been saved to a file before. It will not ask and not save an unsaved document if you have pressed the “Never ask again” button when the dialog has come up before.

Does this issue have anything to do with autosave? Because you have not mentioned that previously and that would be important information to provide. For instance if the issue goes away when you disable autosave.

Please could you make it possible for users to upload .mp3 files to your email account.

I will bring up the issue with the site owner.

Hi Pencil2D Team

SO what’s the attached file then, ‘Scotch Mist’ I was logged on to a system running Windows 7 Pro, with Autosave enabled and this screen appeared. Pencil2D was waiting for an answer before proceeding.

Elisa Kivi

HI Pencil2D Team

And when running Pencil2D under Windows 10 Pro same conditions Autosave on Pencil2D simply saves and continues no input from keyboard or mouse required.

@AnimatorElisa Hi. The autosave dialog only appears when:

  1. The file has achieved the required amount of “modifications” (actions applied on the canvas or timeline) AND
  2. When the file has never been saved before. This was implemented to make sure people would save at least once to avoid overflowing the RAM and having Pencil2D crash.

Now, you say that:

And when running Pencil2D under Windows 10 Pro same conditions Autosave on Pencil2D simply saves and continues no input from keyboard or mouse required.

But I don’t have that experience. If you activate the reminder dialog, it will not go away until you click one of the buttons or press a key that could activate the focused button (in this case the YES button).

For example, pressing Spacebar or Enter / Return keys would activate the YES button since it’s focused. On the contrary pressing ESC key will cancel the dialog as if pressing the NO button (so it will appear again later)

In that case you need to make sure that: A. if you were drawing you may have accidentally clicked on any of the buttons while you were drawing. OR B. You had already saved the file once.

If you saved the file once this reminder will not appear again for that particular file.

Hi Pencil2D Team

Why does it appear & require an input when using Windows 7 Pro & not when using Windows 10 Pro?

Elisa Kivi

@AnimatorElisa I have windows 10 and this doesn’t happen to me.

That’s why I mentioned the conditions to invoke that window in my previous post. So please test again with a new file that has not been saved, and lower the amount of modications in the preferences so you can test it thoroughly.

Either version should not have any difference in this regard. So I’m saying it’s not an apparent Pencil2D problem and it could be an issue with your Operating system, your hardware peripherals or specific software that causes that.

Just in case please try to use the nightly build under windows 10 and let me know if this one also causes the same issue. If not then I can only think it’s a problem on your specific device.

Hi Pencil2D Team

I’ll try the nightly build.

Elisa Kivi

Hi Pencil2D Team

I’ve just downloaded the 32bit version of the latest Nightly Build 15th July 21. I unzipped it into a separate directory. This computer was running Windows 10 Pro.

In frame 1, I drew a simple outline in black using the brush tool & then filled it with red.

Having set the Autosave on and setting the number of modifications to 5. I added 59 copies using the add key frame button +. No autosaves were made.

I now proceeded to delete frames, using the delete frames button -. This time every 5 frames deleted a save was made & the onscreen message was very briefly displayed. Pencil2D didn’t wait for keyboard or mouse input before proceeding.

This is in contrast to what happens doing the above procedure using Windows 7 Pro.

There is a possibility that this difference is due to differences in the versions of Windows and not a problem in Pencil2D.

From experience some programs use undocumented ways of interfacing with the operating system, in this case Windows. Undocumented features can disappear at any time, due to modifications by Microsoft, therefore using them is not advised.

Microsoft provide a listing of the approved methods. Sometimes in writing graphics software these are too slow, thus the developers use non documented methods.

Elisa Kivi

Imprint