[Thunar-dev] ThunarVfsInfo: Bug in thunar_vfs_info_new_for_path?

Jannis Pohlmann info at sten-net.de
Wed Feb 1 16:40:35 CET 2006


Jannis Pohlmann schrieb:
> Benedikt Meurer schrieb:
> 
>>Jannis Pohlmann wrote:
>>
>>
>>>Benedikt Meurer schrieb:
>>>
>>>
>>>
>>>>Jannis Pohlmann wrote:
>>>>
>>>>
>>>>
>>>>
>>>>>>Does Thunar work for you? What version of shared-mime-info do you use
>>>>>>(if > 0.16, do you have mmap()'able caches)? Does it work with other
>>>>>>files (if so, please send me the XmlIniFile.html)? Have you tried with
>>>>>>-O0 (especially for thunar-vfs)?
>>>>>
>>>>>Thunar works fine here, yes. I'm using shared-mime-info 0.16-3. No, it
>>>>>doesn't work with other files. -O0 (for both, the program and
>>>>>thunar-vfs) doesn't change anything.
>>>>
>>>>
>>>>Wow, this is really interesting, because Thunar uses exactly the same
>>>>code in various places.
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>>>Other than that, you could try to add printf statements to thunar-vfs,
>>>>>>maybe that helps to locate the problem.
>>>
>>>
>>>I have attached my changes to thunar-vfs-info.c. They are marked with
>>>
>>> /* MOD>> */
>>> ...
>>> /* <<MOD */
>>>
>>>I also attached a simplified main.c source. The output now is:
>>>
>>>jannis at nebelsee ~/tmp/thunar-vfs> rm main.o test; bash build.sh; ./test
>>>~/Arbeit/XmlIniFile.html
>>>Path name (before info): XmlIniFile.html
>>>thunar-vfs-info.c, 116: XmlIniFile.html
>>>thunar-vfs-info.c, 652: XmlIniFile.html
>>>thunar-vfs-info.c, 671: XmlIniFile.html
>>>thunar-vfs-info.c, 740: XmlIniFile.html
>>>thunar-vfs-info.c, 852: XmlIniFile.html
>>>thunar-vfs-info.c, 853: XmlIniFile.html
>>>main.c, 27: XmlIniFile.html
>>>main.c, 28:
>>>
>>>This is absolutely weird. As you can see, the info->path member is
>>>readable in thunar-vfs-info.c (in _thunar_Vfs_info_new_internal). But as
>>>soon as it is returned to the main function, you can not access it
>>>anymore. Strangely enough, you can still access the path object created
>>>in the main routine.
>>>
>>>I'm either totally stupid or there is something wrong with ... uhm ...
>>>don't know.
>>
>>
>>Looks like some strang compiler (optimization) bug. What version of gcc
>>do you use?
> 
> 
> gcc (GCC) 4.0.2 20050808 (prerelease)
> 
> I'll try it with gcc-3.4 now.

Hm. No changes with gcc-3.4, even if I compile ThunarVFS and my test
script using it.

- Jannis



More information about the Thunar-dev mailing list