bugGNUstep - Bugs: bug #22473, GWorkspace supplying invalid path...


You are not allowed to post comments on this tracker with your current authentification level.

bug #22473: GWorkspace supplying invalid path to bundles on windows.

Submitted by:  Riccardo Mottola <rmottola>
Submitted on:  Tue Mar 4 11:18:54 2008  
Category: ApplicationSeverity: 3 - Normal
Item Group: BugStatus: Confirmed
Privacy: PublicAssigned to: None
Open/Closed: Open

Thu Mar 6 04:53:27 2008, comment #5:

As I said ... the problem is nothing to do with NSBundle or the base library.
If this was MacOS-X the bundle code would be raising an NSInvalidArgumentException, but the base library implementation is just trying to be more tolerant ... so it generates a warning log message and tries to guess what the caller actually meant to supply as an argument.
I'm renaming this bug to more accurately describe the issue.

Richard Frith-Macdonald <CaS>
Project Member
Wed Mar 5 22:29:03 2008, comment #4:

I rebuilt base with your changes (but not GWorkspace). I get the same error, at the same line.

2008-03-05 23:15:45.285 GWorkspace[1648] File NSBundle.m: 1233. In [NSBundle -initWithPath:] NSBundle -initWithPath: requires absolute path names, given '\GNUstep\Local\Applications\PRICE.app'

am I missing something?

Riccardo Mottola <rmottola>
Project Member
Wed Mar 5 19:06:33 2008, comment #3:

Unfortunately not ... stringByStandardizingPath is unable to convert a relative path to an absolute one on windows, since it doesn't know which drive the path is on.
The only solution is for the calling code to pass in a valid (absolute) path. The hack in base is just for convenience ... if you were running the same code on MacOSX it would simply fail.

Richard Frith-Macdonald <CaS>
Project Member
Wed Mar 5 17:42:39 2008, comment #2:

I don't know what the real reason for this problem is, but a simple way to work around it should be to move the line
path = [path stringByStandardizingPath];

in [NSBundle initWithPath:] up before the isAbsolutePath check. In most cases we will then end up with a proper path for the platform.

Fred Kiefer <FredKiefer>
Project Member
Wed Mar 5 14:00:44 2008, comment #1:

I think this is a GWorkspace issue ... though it might be getting the path from an open panel or something similar.
As a partial workaround, I added some code in base to try to guess the absolute path ... it's impossible for that to be completely reliable, but it should work in most cases.

Richard Frith-Macdonald <CaS>
Project Member
Tue Mar 4 11:18:54 2008, original submission:

when double-clicking applications in Workspace on Windows, I get the following erros:

$ 2008-03-04 11:58:01.213 GWorkspace[3948] File NSBundle.m: 1233. In [NSBundle -initWithPath:] NSBundle -initWithPath: requires absolute path names, given '\GNUstep\System\Applications\ProjectCenter.app'
2008-03-04 11:58:20.509 GWorkspace[3948] File NSBundle.m: 1233. In [NSBundle -initWithPath:] NSBundle -initWithPath: requires absolute path names, given '\GNUstep\System\Applications\SystemPreferences.app'

I think it used to work.

"openapp" of the same application works

Riccardo Mottola <rmottola>
Project Member


No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -unavailable- added by FredKiefer (Posted a comment)
  • -unavailable- added by CaS (Posted a comment)
  • -unavailable- added by rmottola (Submitted the item)

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.


    Please enter the title of George Orwell's famous dystopian book (it's a date):



    Follow 3 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Thu Mar 6 04:53:27 2008CaSSummarybundle init on windows path problem=>GWorkspace supplying invalid path to bundles on windows.
    Wed Mar 5 14:00:44 2008CaSCategoryNone=>Application

    Back to the top

    Powered by Savane 3.1-cleanup1