Arch Linux

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#32659 - [ruby] File.expand_path raises unexpected exception

Attached to Project: Arch Linux
Opened by Dmytro Kostiuchenko (edio) - Wednesday, 14 November 2012, 21:19 GMT
Last edited by Gerardo Exequiel Pozzi (djgera) - Saturday, 17 November 2012, 13:36 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Thomas Dziedzic (tomd123)
Architecture x86_64
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:
recent ruby update seems to have a regression and particularly has braken suckless's wmii ruby configuration.
Method File.expand_path raises "incompatible character exception" spontaneosly.
Issue is not present in ruby-1.9.3_p286-1.

P.S. Can't report upstream right now as ruby official bug tracker is out of order.

Additional info:
* package version(s)
ruby-1.9.3_p327-1

Steps to reproduce:
Code that fails spontaneously for me:

def launch *args
if label = curr_client.label.read rescue nil
label.split(/[\s\[\]\{\}\(\)<>"':]+/).reverse_each do |word|
if File.exist? path = File.expand_path(word) # here exception rises
path = File.dirname(path) unless File.directory? path
Dir.chdir(path){ launch! *args }
return
end
end
end

launch! *args
end
This task depends upon

Closed by  Gerardo Exequiel Pozzi (djgera)
Saturday, 17 November 2012, 13:36 GMT
Reason for closing:  Fixed
Additional comments about closing:  See last comment
Comment by Thomas Dziedzic (tomd123) - Thursday, 15 November 2012, 02:26 GMT
hey, thanks for the report, File.expand_path('~') works for me, can you possibly give me a minimal reproducible case?

I will take a more in depth view once I get a minimal reproducible test case.
Comment by Dmytro Kostiuchenko (edio) - Thursday, 15 November 2012, 23:56 GMT
Hi, Thomas.
At first, I've messed with nicknames, and I meant actually sunaku's configuration
https://github.com/sunaku/wmiirc
Here is that code snippet
https://github.com/sunaku/wmiirc/blob/master/lib/wmiirc/system.rb#L10

I'm not familiar with ruby, and I can only say that the function is invoked to launch applications. Argument is usually a name of a program from PATH. For me it crashed with arguments "keepassx", "konsole", "firefox", "xxkb", "killall xxkb", etc.. It was not regularly. For example, it might work for several invokations, and eventually crash with "konsole". Dozen of subsequent calls would also crash, but then it would also back to normal.

I'm not able currently to update ruby package to reproduce. On weekend I will try to reproduce and provide stack trace or any other required info.

Thanks.
Comment by Dmytro Kostiuchenko (edio) - Saturday, 17 November 2012, 08:52 GMT
So, I've updated ruby and reproduced error successfully.
Stacktrace of error is in attachment.

That snippet of code gets currently active window in wmii, reads it title, and if some part of the title (variable word) is the file or directory, than it launches application (whichs name is passed as an argument) in the directory word.

Error is only reproducible when I try to launch new application while konsole window with title "edio : ..." is active.
If it the case, than word variable somehow became equal to "â\200\223".

So the problem is obviously not in the File.expand_path itself but in wmii itself in conjunction with some function that comes lower in stacktrace. I'm going to review the code and investigate it.

As for this report, perhaps we can close it as invalid. If I find an issue in the ruby itself, I'll make another report. Though any hints and suggestions are highly appreciated, as I'm not familiar with ruby at all.

Thanks.
Comment by Dmytro Kostiuchenko (edio) - Saturday, 17 November 2012, 12:56 GMT
More news on this. Bug has been fixed in wmii. Don't know how did it happened that it was working in the past.

https://github.com/sunaku/wmiirc/issues/46

For me â\200\223 was the utf8 en-dash character.

Loading...