|
View:
New views
6 Messages
—
Rating Filter:
Alert me
|
|
|
Linux libcolorer segfaultHi!
I'm using the colorer binaries and the Java bindings to syntax highlight some HTML on a SWT StyledText widget. Everything went ok, but now everytime I need to show code, my java process crashes wiht a segfault. I narrowed my problem to the TextColorer.setRegionMapper function. If I comment this call, everything goes smoothly (i.e., the code is presented without any syntax highlight). As soon as I uncomment the line, java crashes. Here is the usefull part of the backtrace. glibc detected *** /usr/lib/jvm/java-6-sun-1.6.0.02/bin/java: double free or corruption (out): 0x093985e8 *** ======= Backtrace: ========= /lib/i686/cmov/libc.so.6[0xb7e4bd55] /lib/i686/cmov/libc.so.6(cfree+0x90)[0xb7e4f7f0] /usr/lib/libstdc++.so.6(_ZdlPv+0x21)[0xb3f7feb1] /usr/lib/libstdc++.so.6(_ZdaPv+0x1d)[0xb3f7ff0d] /media/ROOT/workspace/WebAppViewer/colorer/os/linux/x86/libnet_sf_colorer.so(_ZN6VectorIP13_jobjectArrayE14ensureCapacityEi+0x7f)[0xb2161f1f] /media/ROOT/workspace/WebAppViewer/colorer/os/linux/x86/libnet_sf_colorer.so(_ZN6VectorIP13_jobjectArrayE7setSizeEi+0x57)[0xb2161a77] /media/ROOT/workspace/WebAppViewer/colorer/os/linux/x86/libnet_sf_colorer.so(Java_net_sf_colorer_impl_BaseEditorNative_getLineRegions+0x98)[0xb2160318] Is this solved in SVN? I tried to build the svn version on linux (following the INSTALL file) but it fails somewhere in a XSD conversion. Can you PLEASE help me somehow? I really need this library to work so I can finnish my project :( TIA Ruben ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ colorer-talks mailing list colorer-talks@... https://lists.sourceforge.net/lists/listinfo/colorer-talks |
|
|
Re: Linux libcolorer segfaultOn Tue, 2007-07-24 at 12:00 +0100, Ruben Fonseca wrote:
> Hi! > > I'm using the colorer binaries and the Java bindings to syntax highlight > some HTML on a SWT StyledText widget. > > Everything went ok, but now everytime I need to show code, my java > process crashes wiht a segfault. > > I narrowed my problem to the TextColorer.setRegionMapper function. If I > comment this call, everything goes smoothly (i.e., the code is presented > without any syntax highlight). As soon as I uncomment the line, java > crashes. > > Here is the usefull part of the backtrace. > > glibc detected *** /usr/lib/jvm/java-6-sun-1.6.0.02/bin/java: double > free or corruption (out): 0x093985e8 *** > ======= Backtrace: ========= > /lib/i686/cmov/libc.so.6[0xb7e4bd55] > /lib/i686/cmov/libc.so.6(cfree+0x90)[0xb7e4f7f0] > /usr/lib/libstdc++.so.6(_ZdlPv+0x21)[0xb3f7feb1] > /usr/lib/libstdc++.so.6(_ZdaPv+0x1d)[0xb3f7ff0d] > /media/ROOT/workspace/WebAppViewer/colorer/os/linux/x86/libnet_sf_colorer.so(_ZN6VectorIP13_jobjectArrayE14ensureCapacityEi+0x7f)[0xb2161f1f] > /media/ROOT/workspace/WebAppViewer/colorer/os/linux/x86/libnet_sf_colorer.so(_ZN6VectorIP13_jobjectArrayE7setSizeEi+0x57)[0xb2161a77] > /media/ROOT/workspace/WebAppViewer/colorer/os/linux/x86/libnet_sf_colorer.so(Java_net_sf_colorer_impl_BaseEditorNative_getLineRegions+0x98)[0xb2160318] > > Is this solved in SVN? I tried to build the svn version on linux > (following the INSTALL file) but it fails somewhere in a XSD conversion. Just to report that (finally) I compiled the SVN version and the problem persists :( Please dont't make me look to the C++ files to find the problem. If you need more information about my environment please ask! Ruben ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ colorer-talks mailing list colorer-talks@... https://lists.sourceforge.net/lists/listinfo/colorer-talks |
|
|
Re: Linux libcolorer segfaultHi Rubens,
Please provide your jvm vendor and version. Also could you please show up a piece of code, responsible for colorer's baseEditor configuration? That would be helpful.
2007/7/24, Ruben Fonseca <krani1@...>: On Tue, 2007-07-24 at 12:00 +0100, Ruben Fonseca wrote: -- Igor ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ colorer-talks mailing list colorer-talks@... https://lists.sourceforge.net/lists/listinfo/colorer-talks |
|
|
Re: Linux libcolorer segfaultOn Tue, 2007-07-24 at 22:11 -0500, Igor Russkih wrote:
> Hi Rubens, > > Please provide your jvm vendor and version. Hi Igor :) I'm running Debian Sid Linux (kernel 2.6.22) on a 32bit dual core machine. I'm using SUN Java 6 JDK (6.02) and the latest SWT (3.3 Final). > > Also could you please show up a piece of code, responsible for > colorer's baseEditor configuration? That would be helpful. Of course :) Here I create the StyledText (SWT): StyledText codeCanvas = new StyledText(this.codeComposite, SWT.BORDER | SWT.MULTI | SWT.V_SCROLL | SWT.H_SCROLL); codeCanvas.setFont(new Font(this.codeComposite.getDisplay(), "Courier New", 10, SWT.NORMAL)); Then I use colorer: // Build the parser ParserFactory pf = new ParserFactory("colorer/colorer/catalog.xml"); TextColorer textColorer = new TextColorer(pf, new ColorManager()); textColorer.attach(text); textColorer.setCross(false, false); textColorer.setRegionMapper("eclipse", false); textColorer.setPairsPainter(true, TextColorer.HLS_OUTLINE2); textColorer.chooseFileType("inet.php"); text.setText(buffer.toString()); text.setEditable(false); The funny thing is that, if I comment the "setRegionMapper" line, everything works smootly. Do you have any lead? Thank you! Ruben ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ colorer-talks mailing list colorer-talks@... https://lists.sourceforge.net/lists/listinfo/colorer-talks |
|
|
Re: Linux libcolorer segfaultRuben,
Could you please try to run on your system a standalone test app: ColorerDemo You can find it within eclipsecolorer's distribution. you can use ColorerDemo.bat - but you have to slightly modify it to use under linux. I have no access to linux box, so I can't check this. But on win32 it works fine. The sequence ColorerDemo uses: ParserFactory pf = new ParserFactory(); textColorer = new TextColorer(pf, new ColorManager()); textColorer.attach(text); textColorer.chooseFileType("xml.xml"); textColorer.setCross(true, true); textColorer.setRegionMapper("default", true); Also please try to move colorer's initialization below your StyledText initialization (after text.setText() ) This looks much like some problems with order of initialization of components. I'll be able to check this on linux only on a next week, when I reach my home pc...
2007/7/25, Ruben Fonseca <krani1@...>: On Tue, 2007-07-24 at 22:11 -0500, Igor Russkih wrote: -- Igor ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ colorer-talks mailing list colorer-talks@... https://lists.sourceforge.net/lists/listinfo/colorer-talks |
|
|
Re: Linux libcolorer segfaultOn Wed, 2007-07-25 at 16:57 -0500, Igor Russkih wrote:
> Ruben, > > Could you please try to run on your system a standalone test app: > ColorerDemo Yup that always run fine. > > You can find it within eclipsecolorer's distribution. you can use > ColorerDemo.bat - but you have to slightly modify it to use under > linux. > > I have no access to linux box, so I can't check this. But on win32 it > works fine. > > The sequence ColorerDemo uses: > > ParserFactory pf = new ParserFactory(); > textColorer = new TextColorer(pf, new ColorManager()); > textColorer.attach(text); > textColorer.chooseFileType("xml.xml"); > textColorer.setCross(true, true); > textColorer.setRegionMapper("default", true); > > > Also please try to move colorer's initialization below your StyledText > initialization (after text.setText() ) > > This looks much like some problems with order of initialization of > components. I'll be able to check this on linux only on a next week, > when I reach my home pc... Well. I really don't know what solved the problem. But I did *a lot* of refactoring of my application, isolating the GUI code from the rest, taking care of thread gui access and stuff like that, and the problem never appeared again. So I thing you must be right, it probably was a initialization order or something like that. Anyway, thank you for your support :) Ruben ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ colorer-talks mailing list colorer-talks@... https://lists.sourceforge.net/lists/listinfo/colorer-talks |
| Free Forum Powered by Nabble | Forum Help |