Thread: Re: [jnc-users] JNC hangs
Status: Beta
Brought to you by:
soapy
From: Lee D. P. <le...@3s...> - 2007-02-18 18:04:56
|
Marco, > >> Harpal Grover wrote: > >>> I downloaded the latest JNC, 1.1, and attempted to compile my java > >>> app to a native app. The compilation started, but after awhile > >>> stopped working and JNC just hung, with the following log output: > >> > >> Did you mix .java and .class source files? > >> Does it work with JNC 1.0? > > I've experienced a similar problem after upgrading to 1.1. I setup my project in 1.0.1 and it compiles fine, this is using mixed src and jar files. If I attempt to compile the same project with 1.1 it hangs when processing the swt.jar. There is no trace of any gcj or related processes in task manager when this happens. Regards Lee |
From: Lee D. P. <le...@3s...> - 2007-02-18 21:07:11
|
>=20 > > If I attempt to compile the same project with 1.1 it hangs when > > processing the swt.jar. >=20 > This is a whole new topic. What do you mean by hang? > Is there an output? How long did you wait? Did you try without > optimization? The compile never completed. The JNC window just stayed with the text below (I had set the flag to output commands btw and these were not output) : processing swt-win32.jar I started the build just as I was leaving for the office yesterday morning and it was still at that point 8 hours later. I didn't try without optimization; I tried a few more builds directly with auto compiler with the same results last night so decided to leave it at that and continue testing with 1.0.1 which continued to build within 10-15 mins. If I get time I'll upgrade again and try some different options to see if I can isolate the problem. >=20 > > There is no trace of any gcj or related > > processes in task manager when this happens. >=20 > I think cc1.exe or jc1.exe should be in the process list. Just look for > the process consuming the most memory or/and cpu. There were no processes running except the JavaNativeCompiler.exe. Normally when compiling I see quite a bit of activity in the task manager with jc1, gcj, ar or cc1.=20 Lee |
From: Marco T. <mt...@gm...> - 2007-02-19 07:15:06
|
Lee D. Painter wrote: >>> If I attempt to compile the same project with 1.1 it hangs when >>> processing the swt.jar. >> This is a whole new topic. What do you mean by hang? >> Is there an output? How long did you wait? Did you try without >> optimization? > > The compile never completed. The JNC window just stayed with the text > below (I had set the flag to output commands btw and these were not > output) > > : processing swt-win32.jar You might run out of RAM/Swap. GCJ 4.3 needs a lot more compared to GCJ 4.2. I can compile swt without problems. What operating system do you have? How much Ram? How do you compile the jar? The whole or only needed references? > I started the build just as I was leaving for the office yesterday > morning and it was still at that point 8 hours later. I didn't try > without optimization; Would be nice to know the result with optimization. > I tried a few more builds directly with auto > compiler with the same results AutoCompiler actually only executes "JavaNativeCompiler -compile theFile.jnc" while keeping the console open. So, not really surprising :-) > last night so decided to leave it at that > and continue testing with 1.0.1 which continued to build within 10-15 > mins. If I get time I'll upgrade again and try some different options to > see if I can isolate the problem. > >>> There is no trace of any gcj or related >>> processes in task manager when this happens. >> I think cc1.exe or jc1.exe should be in the process list. Just look > for >> the process consuming the most memory or/and cpu. > > There were no processes running except the JavaNativeCompiler.exe. > Normally when compiling I see quite a bit of activity in the task > manager with jc1, gcj, ar or cc1. Very strange! The GUI frontend calls "gcj" and waits until it returns. So there really ought to be something... Unless you run out of memory of course. Then the behavior is unspecified I guess. Marco |
From: Lee D. P. <le...@3s...> - 2007-02-19 11:03:28
|
> > > > The compile never completed. The JNC window just stayed with the text > > below (I had set the flag to output commands btw and these were not > > output) > > > > : processing swt-win32.jar >=20 > You might run out of RAM/Swap. GCJ 4.3 needs a lot more compared to GCJ > 4.2. I can compile swt without problems. > What operating system do you have? > How much Ram? > How do you compile the jar? The whole or only needed references? >=20 This is a Windows XP Service Pack 2 machine with 1 GB memory.=20 All of the jar files are compiled as a whole except swt.jar which is references only.=20 > > I started the build just as I was leaving for the office yesterday > > morning and it was still at that point 8 hours later. I didn't try > > without optimization; >=20 > Would be nice to know the result with optimization. > > > > There were no processes running except the JavaNativeCompiler.exe. > > Normally when compiling I see quite a bit of activity in the task > > manager with jc1, gcj, ar or cc1. >=20 > Very strange! The GUI frontend calls "gcj" and waits until it returns. > So there really ought to be something... Unless you run out of memory of > course. Then the behavior is unspecified I guess. > I've now run a few more builds and have a bit more information. I can successfully compile SWT if I compile the whole jar but of course this has linking issues with AWT. This produces the following output in the log. [exec] - processing swt-win32.jar [exec] [gcc-121694-win\bin\gcj [exec] -fjni [exec] -O2 [exec] -Ilibs/win/gui/gui.jar [exec] -c [exec] ..\..\sslexplorer-agent\build\extension\swt-win32.jar [exec] -o [exec] C:\DOCUME~1\lee\LOCALS~1\Temp\JNCTemp2ogdqu.out\swt-win32-win.jar.o [exec] -I..\..\sslexplorer-agent\build\extension\nanoxml-2.2.3.jar [exec] -I..\..\sslexplorer-agent\build\extension\agent-debug.jar [exec] -I..\..\sslexplorer-agent\build\extension\maverick-ssl-debug.jar [exec] -I..\..\sslexplorer-agent\build\extension\maverick-crypto.jar [exec] -I..\..\sslexplorer-agent\build\extension\agent-en.jar [exec] -I..\..\sslexplorer-agent\build\extension\agent-swt-en.jar [exec] -I..\..\sslexplorer-agent\build\extension\log4j-java1.1.jar [exec] -I..\..\sslexplorer-agent\build\extension\commons-logging-java1.1.jar [exec] -I..\..\sslexplorer-agent\build\extension\maverick-util-debug.jar [exec] -I..\..\sslexplorer-agent\build\extension\jRegistryKey.jar [exec] -I..\..\sslexplorer-agent\build\extension\jzlib.jar [exec] -I..\..\sslexplorer-agent\build\extension\agent-swt-debug.jar] The problem seems to be when I have the swt.jar set to references only. When I have this option, with or without optimization I only get the following output in the log. [exec] - processing swt-win32.jar I'm not sure if that's a clue but I never see the command output as the successful compile above shows. This is using the same .jnc file with the only difference being that the jar flag is unset to include referenced classes only. Memory usage seems to be within the available limits. I'll try increasing the virtual memory to see if that makes a difference.=20 Thanks, Lee |
From: Marco T. <mt...@gm...> - 2007-02-19 14:29:15
|
Lee D. Painter wrote: >>> The compile never completed. The JNC window just stayed with the > text >>> below (I had set the flag to output commands btw and these were not >>> output) >>> >>> : processing swt-win32.jar >> You might run out of RAM/Swap. GCJ 4.3 needs a lot more compared to > GCJ >> 4.2. I can compile swt without problems. >> What operating system do you have? >> How much Ram? >> How do you compile the jar? The whole or only needed references? >> > > This is a Windows XP Service Pack 2 machine with 1 GB memory. Should work... I have the same setup and can compile swt for references only... > All of the jar files are compiled as a whole except swt.jar which is > references only. Can you try a compilation with reference only by starting JNC by running "autocompiler -debug"? This will start the gui but keep the console open and print exceptions if any... >>> I started the build just as I was leaving for the office yesterday >>> morning and it was still at that point 8 hours later. I didn't try >>> without optimization; >> Would be nice to know the result with optimization. >>> There were no processes running except the JavaNativeCompiler.exe. >>> Normally when compiling I see quite a bit of activity in the task >>> manager with jc1, gcj, ar or cc1. >> Very strange! The GUI frontend calls "gcj" and waits until it returns. >> So there really ought to be something... Unless you run out of memory > of >> course. Then the behavior is unspecified I guess. >> > > I've now run a few more builds and have a bit more information. I can > successfully compile SWT if I compile the whole jar but of course this > has linking issues with AWT. This produces the following output in the > log. > > [exec] - processing swt-win32.jar > [exec] [gcc-121694-win\bin\gcj > [exec] -fjni > [exec] -O2 > [exec] -Ilibs/win/gui/gui.jar > [exec] -c > [exec] ..\..\sslexplorer-agent\build\extension\swt-win32.jar > [exec] -o > [exec] > C:\DOCUME~1\lee\LOCALS~1\Temp\JNCTemp2ogdqu.out\swt-win32-win.jar.o > [exec] -I..\..\sslexplorer-agent\build\extension\nanoxml-2.2.3.jar > [exec] -I..\..\sslexplorer-agent\build\extension\agent-debug.jar > [exec] > -I..\..\sslexplorer-agent\build\extension\maverick-ssl-debug.jar > [exec] > -I..\..\sslexplorer-agent\build\extension\maverick-crypto.jar > [exec] -I..\..\sslexplorer-agent\build\extension\agent-en.jar > [exec] -I..\..\sslexplorer-agent\build\extension\agent-swt-en.jar > [exec] -I..\..\sslexplorer-agent\build\extension\log4j-java1.1.jar > [exec] > -I..\..\sslexplorer-agent\build\extension\commons-logging-java1.1.jar > [exec] > -I..\..\sslexplorer-agent\build\extension\maverick-util-debug.jar > [exec] -I..\..\sslexplorer-agent\build\extension\jRegistryKey.jar > [exec] -I..\..\sslexplorer-agent\build\extension\jzlib.jar > [exec] > -I..\..\sslexplorer-agent\build\extension\agent-swt-debug.jar] > > The problem seems to be when I have the swt.jar set to references only. > When I have this option, with or without optimization I only get the > following output in the log. > > [exec] - processing swt-win32.jar Well, that would print tons of messages if this printed the used commands. Therefore I disabled them. > I'm not sure if that's a clue but I never see the command output as the > successful compile above shows. This is using the same .jnc file with > the only difference being that the jar flag is unset to include > referenced classes only. Thats ok and intended. > Memory usage seems to be within the available limits. I'll try > increasing the virtual memory to see if that makes a difference. Actually, compiling in references only mode should use way less ram than compiling the complete jar. So this shouldn't be the cause here. Marco |
From: Lee D. P. <le...@3s...> - 2007-02-20 19:41:14
|
Marco, > > All of the jar files are compiled as a whole except swt.jar which is > > references only. >=20 > Can you try a compilation with reference only by starting JNC by running > "autocompiler -debug"? This will start the gui but keep the console open > and print exceptions if any... I tried this and I see no additional exceptions in the console.=20 Yesterday something else started happening, it started to compile without getting stuck when using it through the JNC 1.1 GUI but the link fails with multiple definition errors again (see below). This seems to have no pattern as sometimes it compiles and others it gets stuck as per the original problem. I did change some virtual memory settings before this happened though but when monitoring the compile everything seems to be within limits. The same project file executed above compiles and links correctly in 1.0.1 without modification. This is rather quite confusing :( Lee=20 ----- c:/workspace.head/build-tools/jnc/gcc-121694-win/bin/../lib/gcc/i686-pc- mingw32/4.3.0/../../../libgcj.a(gui_java_text.o): In function `ZN4java4text8Collator11getInstanceEJPS1_PNS_4util6LocaleE':D:/programmi ng/jnc/libs/gui/win/java/text/Collator.java:255: multiple definition of `java::text::Collator* java::text::Collator::getInstance(java::util::Locale*)' libs/win/libjncNoGui.a:ccuecaaa.jar:(.text+0x840): first defined here =09 c:/workspace.head/build-tools/jnc/gcc-121694-win/bin/../lib/gcc/i686-pc- mingw32/4.3.0/../../../libgcj.a(gui_java_text.o): In function `ZN4java4text8CollatorC1Ev':D:/programming/jnc/libs/gui/win/java/text/Co llator.java:453: multiple definition of `java::text::Collator::Collator()' |
From: Marco T. <mt...@gm...> - 2007-02-21 07:48:15
|
Lee D. Painter wrote: > Marco, > >>> All of the jar files are compiled as a whole except swt.jar which is >>> references only. >> Can you try a compilation with reference only by starting JNC by > running >> "autocompiler -debug"? This will start the gui but keep the console > open >> and print exceptions if any... > > I tried this and I see no additional exceptions in the console. > > Yesterday something else started happening, it started to compile > without getting stuck when using it through the JNC 1.1 GUI but the link > fails with multiple definition errors again (see below). This seems to > have no pattern as sometimes it compiles and others it gets stuck as per > the original problem. I did change some virtual memory settings before > this happened though but when monitoring the compile everything seems to > be within limits. Hmmm... If it works now, I'd suggest we blame the memory (swap) and go on with life... After all, I never had problems compiling SWT. > The same project file executed above compiles and links correctly in > 1.0.1 without modification. This is rather quite confusing :( > > Lee > > ----- > > c:/workspace.head/build-tools/jnc/gcc-121694-win/bin/../lib/gcc/i686-pc- > mingw32/4.3.0/../../../libgcj.a(gui_java_text.o): In function > `ZN4java4text8Collator11getInstanceEJPS1_PNS_4util6LocaleE':D:/programmi > ng/jnc/libs/gui/win/java/text/Collator.java:255: multiple definition of > `java::text::Collator* > java::text::Collator::getInstance(java::util::Locale*)' > libs/win/libjncNoGui.a:ccuecaaa.jar:(.text+0x840): first defined > here > > c:/workspace.head/build-tools/jnc/gcc-121694-win/bin/../lib/gcc/i686-pc- > mingw32/4.3.0/../../../libgcj.a(gui_java_text.o): In function > `ZN4java4text8CollatorC1Ev':D:/programming/jnc/libs/gui/win/java/text/Co > llator.java:453: multiple definition of > `java::text::Collator::Collator()' Since 1.1, the package java.text is also excluded if you check the "exclude gui" box. Your code depends on it... Either change the code or uncheck the "exclude gui" box. There's a faq entry on the homepage about these "multiple definition" errors if you're interested... Marco |
From: Lee D. P. <le...@3s...> - 2007-02-21 10:00:15
|
> > Yesterday something else started happening, it started to compile > > without getting stuck when using it through the JNC 1.1 GUI but the link > > fails with multiple definition errors again (see below). This seems to > > have no pattern as sometimes it compiles and others it gets stuck as per > > the original problem. I did change some virtual memory settings before > > this happened though but when monitoring the compile everything seems to > > be within limits. >=20 > Hmmm... If it works now, I'd suggest we blame the memory (swap) and go > on with life... After all, I never had problems compiling SWT. I'm hoping this is limited to the one workstation and I'll do some testing on our actual automated build machines. > Since 1.1, the package java.text is also excluded if you check the > "exclude gui" box. Your code depends on it... Either change the code or > uncheck the "exclude gui" box. > There's a faq entry on the homepage about these "multiple definition" > errors if you're interested... Right that makes sense as to why it fails but I was unaware that java.text was excluded in 1.1 and not 1.0.1 and there is no indication of that in the FAQ. Should that be considered as part of the GUI? It has date formats and i18n stuff which can be used outside of Swing and AWT. I've now turned off the excluded GUI flag but now I have a 6MB exe with 1.1 instead of 2.3 MB with 1.0.1. So this really does not help in my case as 6MB is not an acceptable size given that it is includes AWT/Swing when we don't even use it. Download size is quite important for this application and is one of the reasons we spent the time converting to SWT in the first place :( Lee |
From: Marco T. <mt...@gm...> - 2007-02-21 10:16:16
|
Lee D. Painter wrote: >>> Yesterday something else started happening, it started to compile >>> without getting stuck when using it through the JNC 1.1 GUI but the > link >>> fails with multiple definition errors again (see below). This seems > to >>> have no pattern as sometimes it compiles and others it gets stuck as > per >>> the original problem. I did change some virtual memory settings > before >>> this happened though but when monitoring the compile everything > seems to >>> be within limits. >> Hmmm... If it works now, I'd suggest we blame the memory (swap) and go >> on with life... After all, I never had problems compiling SWT. > > I'm hoping this is limited to the one workstation and I'll do some > testing on our actual automated build machines. Compiled jars are cached (unless you removed that flag). So just ensure that the compilation runs through the first time. >> Since 1.1, the package java.text is also excluded if you check the >> "exclude gui" box. Your code depends on it... Either change the code > or >> uncheck the "exclude gui" box. >> There's a faq entry on the homepage about these "multiple definition" >> errors if you're interested... > > Right that makes sense as to why it fails but I was unaware that > java.text was excluded in 1.1 and not 1.0.1 It's listed in the GUI at the "Exclude GUI" option. > and there is no indication > of that in the FAQ. No, but a description of why "multiple definition" errors occur and that it is because of "Exclude GUI" or "Exclude JCE". > Should that be considered as part of the GUI? It has > date formats and i18n stuff which can be used outside of Swing and AWT. Actually you're right. But I added it because I had to take it from a Sun JRE because the GNU Classpath one is broken. So, if you exclude the GUI, you're sure that you do not have to follow the Sun license. > I've now turned off the excluded GUI flag but now I have a 6MB exe with > 1.1 instead of 2.3 MB with 1.0.1. So this really does not help in my > case as 6MB is not an acceptable size given that it is includes > AWT/Swing when we don't even use it. See, size matters ;-) Well, just find the part that uses java.text and remove/recode it. > Download size is quite important > for this application and is one of the reasons we spent the time > converting to SWT in the first place :( Shouldn't be too complicated to get that working... Marco |
From: Marco T. <mt...@gm...> - 2007-02-18 18:16:36
|
Lee D. Painter wrote: > Marco, > >>>> Harpal Grover wrote: >>>>> I downloaded the latest JNC, 1.1, and attempted to compile my java >>>>> app to a native app. The compilation started, but after awhile >>>>> stopped working and JNC just hung, with the following log output: >>>> Did you mix .java and .class source files? >>>> Does it work with JNC 1.0? > > I've experienced a similar problem after upgrading to 1.1. I setup my > project in 1.0.1 and it compiles fine, this is using mixed src and jar > files. That's no problem. Only mixing .java and .class files is a problem. > If I attempt to compile the same project with 1.1 it hangs when > processing the swt.jar. This is a whole new topic. What do you mean by hang? Is there an output? How long did you wait? Did you try without optimization? > There is no trace of any gcj or related > processes in task manager when this happens. I think cc1.exe or jc1.exe should be in the process list. Just look for the process consuming the most memory or/and cpu. Marco |