Projects

Ticket #637 (closed defect: fixed)

Opened 23 months ago

Last modified 22 months ago

Segmentation fault error with NSSearchPathForDirectoriesInDomains function

Reported by: aldarisb@… Owned by: lsansonetti@…
Priority: major Milestone: MacRuby 0.6
Component: MacRuby Keywords: NSSearchPathForDirectoriesInDomains "Segmentation fault"
Cc:

Description

Hello MacRuby Team, I have a segmentation fault error with in a macruby class. To reproduce this problem with macirb tape follow lines :

def function_test
      NSSearchPathForDirectoriesInDomains(NSDownloadsDirectory,  NSUserDomainMask)
end
function_test

We should have the segmentation fault error. I reproduce this problem under an MacRuby Xcode Project.

But if I use directly the "NSSearchPathForDirectoriesInDomains(NSDownloadsDirectory, NSUserDomainMask)", I don't have the error.

Regards

Change History

follow-up: ↓ 2   Changed 23 months ago by martinlagardette@…

Hi!

Since you set the Milestone to MacRuby 0.5, I assume that's the version you're using, right?

With 0.6 (HEAD on trunk), I have no issue, so I would assume the problem is fixed already :-)

$> cat /tmp/test.rb
framework 'Foundation'
def function_test
  NSSearchPathForDirectoriesInDomains(NSDownloadsDirectory,  NSUserDomainMask)
end
function_test
$> macruby /tmp/test.rb
/tmp/array.rb:3:in `function_test': wrong number of arguments (2 for 3) (ArgumentError)
	from /tmp/array.rb:1:in `<main>'

in reply to: ↑ 1   Changed 23 months ago by aldarisb@…

Hi, thank you to reply me.

Since you set the Milestone to MacRuby 0.5, I assume that's the version you're using, right?

It's Right, I have wanted use a stable version of Mac Ruby.

I test on trunk version, and it's already fixed.

I didn't see that my call function of NSSearchPathForDirectoriesInDomains is wrong. I forget the expandTilde boolean at the end.

the bug under macruby 0.5 is the direct call and call under function doesn't raise argumenterror.

Regards.

  Changed 22 months ago by lsansonetti@…

  • status changed from new to closed
  • resolution set to fixed
  • milestone changed from MacRuby 0.5 to MacRuby 0.6

Closing.

Note: See TracTickets for help on using tickets.