'General protection error, when i convert QString to Char

I try to convert QString to const *char, it generate General Protection fault. I could't understand about that.

dmesg

code that generate General Protection fault

When I checked with gdb, segment fault is generated in "vfprintf".

gdb result

  1. What does mean "General Protection"
  2. I tried to run this code other system, it works well. Are there any conditions that could cause problems?
    1. redhat 6 / qt 4.6
    2. redhat 7 / qt 4.8
  • I have already tried converting to "toStdString, toLocal8Bit, etc..."


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source