g_io_channel_seek_position() crashes on 64-bit machine but works fine on 32-bit one



Hi everyone!
I'm developing a simple application using gtk+2 and use
g_io_channel_seek_position() in it. Earlier I worked under 32-bit Linux and
everything went perfectly fine, but then I switched to a 64-bit OS (the
same Linux distribution, only the architechture has changed).

I compile my code with gcc and use -m32 option both for compiling and
linking. The program builds fine, but it receives a segfault in above
mentioned function. The same code works fine under 32-bit OS. Here's the
output of the program.


(main_1:17875): GLib-CRITICAL **: g_io_channel_seek_position: assertion
`(error == NULL) || (*error == NULL)' failed
(main_1:17875): GLib-WARNING **: g_io_channel_seek_position: unknown seek
type
Segmentation fault (core dumped)



 It's also strange that the program doesn't crash on the first warning and
that it complains about seek type when the seek type is G_SEEK_SET. And
*error is NULL on function call.

What am I missing here and what could be the issue?

Thank you in advance,
Dmitry


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]