directory diff fails to start

Having trouble installing Oxygen? Got a bug to report? Post it all here.
rouner
Posts: 4
Joined: Fri Jan 26, 2018 7:18 pm

directory diff fails to start

Post by rouner »

I have been trying to run the diff tool on two directories of installers, one about 30 GB one about 60 GB. I ran it on some similar dirs earlier but the past several tries it starts and the progress ("Processing") window says "operation in progress" and "Comparing..." But the progress bar sho NO progress. I let this run overnight and no progress. Any advice or known issues with this tool? Thanks!
adrian
Posts: 2850
Joined: Tue May 17, 2005 4:01 pm

Re: directory diff fails to start

Post by adrian »

Hello,

1. What version of Oxygen/Diff tool are you using?
2. On what platform are you running it (Windows, Mac, Linux)?
3. Are you starting the Diff tool from its own launcher (.exe/.app) or from the Oxygen tools menu?
But the progress bar sho NO progress
That means it was not able to complete making the list of files to compare.
Check the CPU usage of the tool. If it uses 100% CPU (all cores) it most likely ran out of memory. Since it's a Java app, it has a memory cap. The default is 512MB (-Xmx512m).

If you start the tool with its own launcher, you can increase the heap memory available by editing the file diffDirs.vmoptions (or creating a new file named custom_diffDirs.vmoptions) and adding on a new line at the end of that file the new Java VM heap argument. e.g. For 4GB of memory

Code: Select all

-Xmx4g
Regards,
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
rouner
Posts: 4
Joined: Fri Jan 26, 2018 7:18 pm

Re: directory diff fails to start

Post by rouner »

Thanks--
1. 19.1 I started with an earlier version (19?) and saw there was an update, installed it, same behavior
2. Mac OS X 10.12.6 (Sierra)
3. I have been starting from the Oxygen tools menu

I did a few diffs earlier that seemed to work fine. Then 7-8 tries where it says "Comparing..." but makes no progress. I'll try from diff dir app and see if that makes a difference.
adrian
Posts: 2850
Joined: Tue May 17, 2005 4:01 pm

Re: directory diff fails to start

Post by adrian »

Hi,
3. I have been starting from the Oxygen tools menu
In that case, if you have 8GB of memory or more, it should work reasonably well, as Oxygen's limit is by default 1/4 of your system RAM. So if you have 8GB it uses 2GB (for 16GB it uses 4GB, and so on).
On Mac, adjusting the memory for Oxygen .apps is different, you have to start Finder, go to the Oxygen installation folder (from /Applications), Ctrl-click (or right click) on the .app icon (e.g. Diff Directories.app) and from the pop-up menu select 'Show Package Contents'. Navigate to the 'Contents' directory and edit the 'Info.plist' file. You can open it with 'TextEdit'.

Look for the VMOptionArray key and add the -Xmx parameter in a new string element from the array element (can be first). For example, for 4000 MB use the following:

Code: Select all

<string>-Xmx4000m</string>
So it should look like:

Code: Select all

<key>VMOptionArray</key>
<array>
<string>-Xmx4000m</string>
<string>-Dfile.encoding=UTF-8</string>
...
Restart the application and verify the amount of memory that is actually available to Oxygen in Help->About, JVM Memory Used/Total(last row). If the application no longer starts then you have probably used an invalid value, so you will have to retrace your steps, edit the the Info.plist file and try again.

Regards,
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
rouner
Posts: 4
Joined: Fri Jan 26, 2018 7:18 pm

Re: directory diff fails to start

Post by rouner »

Hi Adrian,

Thanks for your assistance. I'm sure memory is the issue as you mentioned--had a similar issue years ago opening large XML files.

However, I have 16GB RAM on my Mac desktop, and /added changed the info.plist file for both the XML editor and diff applications, to 4000 and then 8000 MB as you directed and restarted the application, and still there is no progress indicated on the progress bar. Activity Monitor app only indicates oxygen app using around 300 MB RAM and 0 compressed memory.

I have let the command run for several hours but still no progress is being listed.

I will reboot the computer and try again, though I believe I've done that too.

Are there alternatives you might suggest for increasing the memory allocation to either the XML editor or the diff application--I'm fine to launch the app with either route.

Thanks!

Andrew
rouner
Posts: 4
Joined: Fri Jan 26, 2018 7:18 pm

Re: directory diff fails to start

Post by rouner »

For the other method you mention, I can't seem to find any "diffDirs.vmoptions" and wouldn't know where it should be located if creating a "custom_diffDirs.vmoptions" file. But presumably that new file should be a copy of the "diffDirs.vmoptions" file that is edited (and ai don't have the original to base it on)?
adrian
Posts: 2850
Joined: Tue May 17, 2005 4:01 pm

Re: directory diff fails to start

Post by adrian »

Hi,
There are no .vmoptions files on the Mac. That's why I said that "On Mac, adjusting the memory for Oxygen .apps is different". On the Mac it's just the Info.plist files.
Did you check the memory in Help > About in either Oxygen or Diff Directories tool?

The problem may not be the memory after all, maybe it encounters a symbolic link or a directory/file that it cannot access.

Regards,
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
adrian
Posts: 2850
Joined: Tue May 17, 2005 4:01 pm

Re: directory diff fails to start

Post by adrian »

Hi,

If the problem persists and you are willing to help us investigate the problem, you can enable logging in Oxygen.
Create a plain text file (unformatted) named 'log4j.properties' with this content:

Code: Select all

log4j.rootCategory= debug, R2

log4j.appender.R2=org.apache.log4j.RollingFileAppender
log4j.appender.R2.File=${user.home}/Desktop/oxygenLog/oxygen.log
log4j.appender.R2.MaxFileSize=12000KB
log4j.appender.R2.MaxBackupIndex=20
log4j.appender.R2.layout=org.apache.log4j.PatternLayout
log4j.appender.R2.layout.ConversionPattern=%r %p [ %t ] %c - %m%n
Copy the 'log4j.properties' file to the Oxygen installation directory and restart Oxygen. Then reproduce the problem and close Oxygen. You will find a directory named 'oxygenLog' on your Desktop and inside it the generated log files(oxygen.log.*). Please zip those files and send them to us.
When you generate the log, it would also be helpful if you could provide us a simple step by step procedure of what you did in Oxygen up to encountering the problem.

Note that the logging/debug mode decreases the application performance severely. At the end of the procedure please do not forget to remove the file 'log4j.properties' from the Oxygen installation directory.

Regards,
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
Post Reply