Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

java memory error #434

Closed
ryand59 opened this issue Feb 20, 2019 · 13 comments
Closed

java memory error #434

ryand59 opened this issue Feb 20, 2019 · 13 comments

Comments

@ryand59
Copy link

ryand59 commented Feb 20, 2019

Howdy,

I'm getting a Java/memory error when I try to open an existing drawing. I'm running DIYLC 3.53.0 under windows 10 (64 bit).

I've attached a screenshot of the error. I can't the current .diylc/logs -- there is a c:/Users//.diylc, but there is no logs folder or file in that location. Somewhere else in windows 10 maybe?

I'm pretty new to the tool, but I did not see anyone having exactly this same error already. As far as I know the drawing files are fine. It doesn't matter which one I try to open, I always get the same error.

Thanks in advance for any help,

Ryan D.
ryand1959@gmail.com
diylc error when opening a file

@ryand59
Copy link
Author

ryand59 commented Feb 20, 2019

OK,

Sorry but it looks like there are only two drawing files that cause this error when opening. I tried creating a new drawing and I can save it and open it again without issue. I also am able to open other drawing files I've created without trouble. Both the drawing files that are giving me the error are pretty small and can be recreated without much fuss, so this is not a big problem for me.

@EL34xyz
Copy link

EL34xyz commented Feb 22, 2019

Open the problem drawings on an older version of DIYLC
Just download a .zip file and open the .exe in that zip

Did you use one of the older multi section can caps in those drawings?
Those caps will create an error when trying to open the file in the latest DIYLC

@bancika
Copy link
Owner

bancika commented Feb 22, 2019

It's probably not that, @EL34xyz . It ran out of memory.

@ryand59, can you please upload the files that give you errors, I'll debug them

@ryand59
Copy link
Author

ryand59 commented Feb 22, 2019

Thanks guys.

I don't think I had any caps on these drawings. They are of humbucker pickups and only the pickups. I have moved on and recreated the drawings, but here is one of the two files that give me the error. For some reason, they are very large and even zipped they exceed the upload limit.

So I created a .png of one of the drawings and I looked at -- I did insert .jpeg images in both these drawings. Maybe the inserted jpeg's are causing the error and/or bloated size? I don't recall any other drawings where I did that...

I appreciate your assistance!

Ryan D.

Original G&B Bridge Pickup.zip

@ryand59 ryand59 closed this as completed Feb 22, 2019
@bancika
Copy link
Owner

bancika commented Feb 22, 2019

Yes, that's it. DIYLC is not really optimized for handling bitmaps and may consume more memory than needed. Also, files are huge because it uses inefficient way of serializing the data. Your image file is pretty large and takes a ton of memory to handle ( 4160x3120). You can increase DIYLC memory limit to 2GB and then it will work. Just edit diylc.l4j.ini file and change this one flag to be -Xmx2512m instead of -Xmx512m...it will increase the limit and the file will work.
But again, I suggest against large bitmaps, whenever possible.

@ryand59
Copy link
Author

ryand59 commented Feb 22, 2019 via email

@EL34xyz
Copy link

EL34xyz commented Feb 22, 2019

Bitmap images are huge compared to png, jpg and gif
Try a png and see how that goes

I use gif's quite a bit in CAD as background images

@bancika
Copy link
Owner

bancika commented Feb 22, 2019

yeah, but the problem is that DIYLC serializes everything as raw bitmaps. Even jpeg and gif.

@ryand59
Copy link
Author

ryand59 commented Feb 23, 2019

bancika,

It's academic at this point since I don't "need" those files and I don't foresee importing jpegs into drawings in the future, but I thought I'd let you know that I tried the change you suggested to the .ini file...

First, I had a file system permission problem and it wouldn't let me save the edited file. Got that sorted out, made the change, and then had a "dead on arrival" problem when I tried to launch the app -- nothing would happen. I changed the parameter in the .ini file back to the original parameter and it fired right up.

Please, this is not a priority or even needed! Now that I know what caused the issue, I will avoid the problem. Just trying to keep you informed.

The app is wonderful, btw. I was able to document my guitar's wiring before I ripped it apart and modded the heck out of it. I did so in very little time with absolutely no reading any documentation or watching any tutorials.

Nice work!

Is there someplace I could learn about how to make a component? As part of my guitar's mods, I put a new pickup selector switch in my guitar (a Freeway Ultra) and if I'm able, I'd love to contribute to the tools for others to use. Let me know if it's possible and what it would take to do. I'm not really a coder, so if it requires writing any java or python or anything like that, I probably couldn't do it.

Thanks for the tool and for the support!

Ryan D.

@bancika
Copy link
Owner

bancika commented Feb 24, 2019

Sure, but it's good you reminded me about it, it's really embarrassing how I handle images :)

I made a change for the next version that will make much smaller files and require less memory to work with images. Keep an eye for 3.54 :)

@EL34xyz
Copy link

EL34xyz commented Feb 24, 2019

That's good news because I like to add background images for amp layouts in order to create a board with the terminal holes in the same location.
It's nice to add a .gif board image as a background for situations like that
I do it in a 2D CAD program now, but doing it in DIYLC would be great

@EL34xyz
Copy link

EL34xyz commented Feb 24, 2019

Also, I had posted here a long time ago that there was an issue in adding an image as a background in DIYLC

If I create a 10 inch image in my image app and then add it to DIYLC, the image is about 1/3 the original size.
So the image is not at the proper scale it was created
I will try and find that post I created again because it had the exact details

@aka13-404
Copy link

aka13-404 commented Feb 21, 2023

Yes, that's it. DIYLC is not really optimized for handling bitmaps and may consume more memory than needed. Also, files are huge because it uses inefficient way of serializing the data. Your image file is pretty large and takes a ton of memory to handle ( 4160x3120). You can increase DIYLC memory limit to 2GB and then it will work. Just edit diylc.l4j.ini file and change this one flag to be -Xmx2512m instead of -Xmx512m...it will increase the limit and the file will work. But again, I suggest against large bitmaps, whenever possible.

How would I go about increasing memory available in more recent versions? I can't find any ini files.
I have more ram than I need, and I have a lot of 512x512pngs in a layout. I can't export a png, and run out of memory.
(Sorry for the necrobump, but this is the issue that is found on GH when searching for out of memory.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants