Programming :: Use Libxml2 On MinGW - XmlFree Crashes
Oct 22, 2010
libxml2 works fine on Linux machines. On Windows, the distribution at [URL] is built for the Microsoft C compiler/linker. The tools pexport and dlltool supplied with MinGW work fine to enable linking to these libraries EXCEPT for static data within the DLL. libxml2 is written so that calls to xmlFree, xmlMalloc and xmlRealloc dispatch through static variables in the DLL - the actual function has another name. BUT, the link library that dlltool builds has its own .globl variable that never gets initialized, and calls to xmlFree(whoever) wind up at location 0.
SOLUTION: AFTER an initial call to xmlParseFile() or some other xml function that initializes the DLL's variables, add the line:
if(!xmlFree) xmlMemGet(&xmlFree,&xmlMalloc,&xmlRealloc,NULL) This will initialize the application's static pointers to the dll's routines. (The NULL pointer would return the address of xmlStrdup, but it's a function already, not a variable <???> so it works anyway).This solution is portable - if you run on a Linux machine where the pointers are properly initialized already, it won't hurt anything.
I am using libxml2 (libxml2-2.7.6-1.fc10.x86_64 ) I get crash when I call xmlFreeTextReader after the XMl file is processed. Following is the sample code that I am using:
I'm trying to add HTTP authentication to my app (it's a rss reader). As the app is in written in C and uses Libxml2, I've been searching in Libxml2 doc, but it seems it's not possible. Maybe someone could point me to a link to relevant info about how I could achieve that?
I'm using libxml2 to handle/manipulate some XML files. In order to check the consistency of a XML file, I have a DTD and I'm using the xmlValidateDtd method to compute the check.
However, when an error occures during the check (for example an attribute is missing in a XML tag), then libxml2 writes the error on the stdout/stderr. For exemple:
Code:
/home/XML/FreeFour.xml:18: element CA: validity error : Element CA does not carry attribute maxlength
The method return the right result (true or false depending on the check result), but occurring errors are written on the stdout/stderr, and I actually don't want that.
I've made a linux app that I'm porting to win32 winth MinGW and MSYS. It's a ticker app that reads then renders a text file to a pixmap (a tall single-line image), then it kind of scrolls the pixmap by drawing a part of it to a drawing_area, using gdk_draw_drawable() within a timeout handler set by g_timeout_add().
The problem is it works fine on linux (the scrolling is really smooth and that's the goal) but the win version is choppy and uses at least 90% of cpu resources (vs 15% with linux) like there is a big performance problem. And I'm not even sure that double buffering is set. Is it related to some mingw config or drawing_area stuff or gtk for win?
I have a RHEL4.8 machine, and I am trying to install the following libxml2-2.7.8 and libxslt-1.1.26 The OS installed versions are: libxml2-2.6.16-12.6 and libxslt-1.1.11-1.e14_7.2 I installed libxml2-2.7.8 and it appears to have installed successfully. However, when I attempt to build and install libxslt, it complains about some undefined references when linking to libxml2 which I believe are not in the old version (but do exist in the new one I installed). I am not able to erase the old versions and I am not able to update to the ones I want. I am at a dead-end at the moment and I am not sure how to proceed.
I've been at it all day trying to get PHP synced up with MySQL. The long and short of it is, php-mysql RPM's lead me into dependency hell (I've been trying to repent but for some reason I always end up there) after I had already used an RPM to install PHP. MySQL is fine, for now.
Here's where I'm at now... I have since uninstalled any previous versions of PHP and have grabbed the tar.gz2 version of PHP to compile / run with the "--with-mysql" option enabled. However, whenever I try to ./configure --with-mysql, I'm eventually told that "configure:error: libxml2 version 2.6.11 or greater required."
Running "rpm -qi libxml2" confirms that I've got version 2.6.26 installed... What gives!?
As is customary, here is my system info: Information for general problems.
== BEGIN uname -rmi == 2.6.18-238.9.1.el5 i686 i386 == END uname -rmi == == BEGIN rpm -qa *-release* == centos-release-notes-5.6-0.i386 centos-release-5-6.el5.centos.1.i386
i need a sample xml parser program which parses given xml file and prints its contents iam very new to this area and iam using libxml2.so library I wish that provided example should be in C only
We have an application which allows user to perform Drag and Drop operations. The problem we are facing now is the application crash. System works fine for some time and allows user to perform many drag drops successfully. But after running for some time and user perform a drag and drop the system crashes.Following stack trace we are getting while system crashes.
I have a friend (really), who is the author of a Perl application that uses backticks to launch an external application. The process reads a largish set of data files, and printing largish amounts of data which is consumed by Perl. Very rarely, the external application crashes. When it does, the Perl script has been seen to hang, and the host CPU usage goes to 100%. The Perl script can be killed and the host recovers.
The question is whether this is predictable/expected behavior, and if it is, is there anything within Perl which can be used to defend against this behavior. I have already recommended the use of the open() form of reading from a child process, but I'm not sure whether that really accomplishes anything. My theory on the matter is that Perl ends up busy-waiting on the child's output, never receiving any EOF, and consuming all CPU. I cannot see how using open() changes that behavior. I am now interested in this problem so I can avoid causing similar behaviors in the future, and just because 'inquiring minds wish to know'.
EDIT: I suppose I should have added that this is on generic 32-bit Linux hosts; Perl 5.8.X
Using content proposal in helios, giving problem if u press tab. Below is the error. For recreation snippet is provided(taken from 2 sites) after error log.Only u need to press tab while proposal pop up is visible & then point mouse at client.
#################################ERROR LOG############################# # A fatal error has been detected by the Java Runtime Environment: #
When I compile my application, I received following error: ERROR: Source object libxml2.so has EABI version 0, but target turbine has EABI version 4. So I need a libxml2 file with ARM EABI version 4. Can I find one from the internet? or does anyone know how to create one?
I want to generate core dump files from my program when it crashes. Its a pretty big process and has about 10-11 threads in it.I have followed the documentation to enable core dump by setting ulimit to unlimited etc. I quickly tried "A demo program creating a core dump" from the following webpage, which succeeds in Segfault and dumping a core file in the directory that I configured.However, I tried running my original program and caused it to crash. I did this by making calls to kill(), raise() or the same null pointer access as shown in the webpage above. In each case, my program crashed but did not generate a core dump file. Am I missing something?My program is in C++ and my environment is Redhat 9.0 (kernel 2.4.20)
Going through the "Why do I NOT get a core dump?" section on the same webpage as above, I can see two potential problems. One - there are issues with the suid/sgid (bullet # 6). I am not able to change any settings with suid because my system does not contain either /proc/sys/fs/suid_dumpable or /proc/sys/kernel/suid_dumpableTwo, my program has threads in it and the bullet # 8 is the problem.
VLC has been working fine and has played this DVD before. The DVD is in very good condition but is now causing a problem.VLC will show the fist few menus/clips but as it's about to get to the main menu it stops.
I just installed Slackware 13.37 on an old IBM Netvista and when I try to start KDE it gets through most of the splash screen and then crashes with the following error messages: Segmentation fault at address 0x4
Fatal server error: Caught signal 11 (Segmentation fault). Server aborting
[code]...
lspci shows I have an Nvidia chip: NV6 Vanta/Vanta LT rev 15 Other GUIs, such as Fluxbox, do not crash, so I think the problem may be with KDE, but I am at a loss. Has anyone seen or solved such a problem? I have not posted /var/log/Xorg.0.log because the KDE error message above seems more detailed.
I am interested in learning 3D programming. The thing is, I would hate to put too much effort to learn something that doesn't have future and is dying. My favorite language at the time is Java. My goal is professional programming.
So I have several questions: 1. Should I learn JOGL or start learning C++ and do C++ openGL programming? 2. Is there a big difference between JOGL and C++ openGL programming? 3. Is it worth to learn openGL? Does it have a future? 4. Is it a big difference between openGL and directX coding? 5. If choosing Java, then JOGL or LWJGL?
Every since updating to kde 4.3, I have been experiencing frequent X crashes (1-2 times a day) whenever compositing is turned on (nvidia card). I was hoping that kde 4.3.1 would fix the issue for me, but no luck. So, I'd like to figure out what the nature of the problem is so that I can report it to the appropriate (ahem) authorities, but am not exactly sure how to dig up any useful information. The Xorg log didn't *seem* to have anything particularly informative to say about it (just a few lines about nvidia_drv.so).
This probably isn't new, but it snuck up on me somehow. I usually use Eclipse for development and it's not having a problem, but on my laptop, I recently had to run ant manually and got a surprise:
I have installed Fedora 12 as a clean installl, everything worked perfect. But lately either after installing an update or making some parameter changes, while restarting my system it just comes up with lots of error messages and crashes. I have to press the switch off button to shutdown. I don't know from where to get that error message to post here
X crashes exactly 10 minutes after log on, and I am returned to log in screen. I am running: Kernel Linux 2.6.30.10-105.2.23.fc11.i586. Gnome 2.26.3. on a Dell Laptop.
Last week I performed an update on my laptop running Fedora 14 with "yum update".
The first problem was that while updating, my machine was frozen and after a had reboot I got a kernel panic (#$%*) After adding the new kernel manually that was fixed but after rebooting, I couldn't start my mailer (Evolution) any more.
When I start evolution while running KDE I get this message (tail var/log/messages): Feb 21 18:03:10 BEL001 NetworkManager[1418]: <info> (wlan0): supplicant connection state: completed -> group handshake Feb 21 18:03:10 BEL001 NetworkManager[1418]: <info> (wlan0): supplicant connection state: group handshake -> completed
[Code]....
How can I get evolution back to work again on my machine?
PS.After rebooting the login screen has changed and now I can't change anymore to using gnome. It only gives the options to login to KDE or 'custom'. How can I change custom to Gnome?
I've recently moved from Ubuntu (after moving from Gentoo and Arch) to Fedora 15 and am experiencing some crashing.
What happens is after a few hours or not particularly hard usage (web browser, a couple of terminals, maybe having run a few Ant scripts etc) all the fans seem to go into serious overdrive. I can't move the mouse and the system doesn't respond to any keyboard input. After about five minutes of this, the fans slow down but the system remains unresponsive. I've left it for a further 30 minutes, still nothing so I have to do a hard reset.
My hardware is a stock laptop Compal IFL90. Besides the standard installed software, the only other things I've installed are;
- Sun JDK (and Eclipse, but not running during crash) - Pogo Plug software (pogoplugfs which is started on login) - Cryptkeeper for my encfs stuff - Opera
Can anyone point me to a possible fix, or let me know what other information is needed to try and get more complete support? It's not to much of a problem at the moment, but when I start using my laptop more frequently, having to power cycle every few hours is going to make is to difficult to use.
Sometimes, when browsing the internet with FireFox, the entire system freezes. The only thing I can do is moving the mouse pointer,I can't use the Run command or anything else.It usually happens after a stand-by.
After upgrading to KDE 4.6 (Factory repos) Amarok crashes every time I try to play a song. Changing between Gstreamer and Xine doesn't make any difference.
Title says it all.Ubuntu 9.10 on HP Pavilion dv4 laptop crashes all the time absolutely for no reason.
Everything is working very fine and suddenly bang ubuntu drops to black screen and cursor blinking on top right corner requiring a reboot to get it back to normal and again happens the same at any random time.
i've been trying to install ubuntu for 3 days but every time I am getting a new problem first thing when I was booting from my live cd i got the message