Commit 2642851
Fix Android startup crash: don't take OsuConfigManager as BDL param in OsuGameAndroid
OsuConfigManager is cached by OsuGameBase.load into the child dependency container
(via dependencies.CacheAs(LocalConfig) on the container returned by
CreateChildDependencies). The dependency activator, however, resolves BDL
parameters from the parent container passed to InjectDependencies, so requesting
OsuConfigManager as a parameter throws DependencyNotRegisteredException before
the BDL method body runs - crashing the APK on launch.
Use the inherited OsuGameBase.LocalConfig field instead. SetHost creates it
before any BDL runs, so it is guaranteed non-null at this point.
Agent-Logs-Url: https://github.com/winnerspiros/osu/sessions/81483282-2d9a-4cc8-a6a6-ef10f6020f42
Co-authored-by: winnerspiros <1675249+winnerspiros@users.noreply.github.com>1 parent 476c398 commit 2642851
1 file changed
Lines changed: 14 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
152 | 152 | | |
153 | 153 | | |
154 | 154 | | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
155 | 165 | | |
156 | | - | |
| 166 | + | |
157 | 167 | | |
158 | 168 | | |
159 | 169 | | |
| |||
171 | 181 | | |
172 | 182 | | |
173 | 183 | | |
174 | | - | |
175 | | - | |
176 | | - | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
177 | 187 | | |
178 | 188 | | |
179 | 189 | | |
| |||
0 commit comments