Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
djrandom-py
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ale
djrandom-py
Commits
a91f53b1
Commit
a91f53b1
authored
13 years ago
by
ale
Browse files
Options
Downloads
Patches
Plain Diff
fix a lost NSTask reference causing bad_access errors
parent
e728985a
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
client/osx-ui/DJRandomUploader/ProcessController.m
+5
-4
5 additions, 4 deletions
client/osx-ui/DJRandomUploader/ProcessController.m
with
5 additions
and
4 deletions
client/osx-ui/DJRandomUploader/ProcessController.m
+
5
−
4
View file @
a91f53b1
...
@@ -18,8 +18,8 @@
...
@@ -18,8 +18,8 @@
// Initialization code here.
// Initialization code here.
curMusicFolder
=
@""
;
curMusicFolder
=
@""
;
curApiKey
=
@""
;
curApiKey
=
@""
;
curBwLimit
=
[
NSNumber
numberWithInt
:
0
];
curBwLimit
=
[
[
NSNumber
numberWithInt
:
0
]
retain
]
;
task
=
[[
NSTask
alloc
]
init
]
;
task
=
nil
;
NSBundle
*
bundle
=
[
NSBundle
bundleForClass
:[
self
class
]];
NSBundle
*
bundle
=
[
NSBundle
bundleForClass
:[
self
class
]];
path
=
[
bundle
pathForAuxiliaryExecutable
:
@"djrandom-client"
];
path
=
[
bundle
pathForAuxiliaryExecutable
:
@"djrandom-client"
];
if
(
path
==
nil
)
{
if
(
path
==
nil
)
{
...
@@ -54,6 +54,7 @@
...
@@ -54,6 +54,7 @@
NSArray
*
args
=
[
NSArray
NSArray
*
args
=
[
NSArray
arrayWithObjects:
@"--api_key"
,
curApiKey
,
@"--music_dir"
,
arrayWithObjects:
@"--api_key"
,
curApiKey
,
@"--music_dir"
,
curMusicFolder
,
@"--debug"
,
@"--foreground"
,
curMusicFolder
,
@"--debug"
,
@"--foreground"
,
@"--no_realtime_watch"
,
nil
];
nil
];
if
([
curBwLimit
intValue
]
>
0
)
{
if
([
curBwLimit
intValue
]
>
0
)
{
args
=
[
args
arrayByAddingObjectsFromArray
:[
NSArray
args
=
[
args
arrayByAddingObjectsFromArray
:[
NSArray
...
@@ -61,7 +62,7 @@
...
@@ -61,7 +62,7 @@
[
curBwLimit
stringValue
],
nil
]];
[
curBwLimit
stringValue
],
nil
]];
}
}
NSLog
(
@"Starting subprocess with args: %@"
,
args
);
NSLog
(
@"Starting subprocess with args: %@"
,
args
);
task
=
[
NSTask
launchedTaskWithLaunchPath
:
path
arguments
:
args
];
task
=
[
[
NSTask
launchedTaskWithLaunchPath
:
path
arguments
:
args
]
retain
]
;
}
}
}
}
...
@@ -71,7 +72,7 @@
...
@@ -71,7 +72,7 @@
!
[
bwLimit
isEqualToNumber
:
curBwLimit
])
{
!
[
bwLimit
isEqualToNumber
:
curBwLimit
])
{
curMusicFolder
=
musicDir
;
curMusicFolder
=
musicDir
;
curApiKey
=
apiKey
;
curApiKey
=
apiKey
;
curBwLimit
=
[
bwLimit
copy
];
curBwLimit
=
[
bwLimit
retain
];
[
self
reloadProcess
];
[
self
reloadProcess
];
}
}
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment