Null Pointer Problems
Moderators: Cat_7, Ronald P. Regensburg, ClockWise
-
- Space Cadet
- Posts: 6
- Joined: Sat Oct 23, 2010 4:40 am
- Location: Toronto, ON
Null Pointer Problems
Hi all,
This is probably a very basic problem to which I should know the solution, but I've never used SS before and am totally unfamiliar with OSs earlier than X. So here goes:
I recently bought a copy of the OS port of Master of Orion II, so I decided to get SS up and running (on my Intel OS X 10.6.4 MBP) in order to play it. Everything went completely smooth with SS. I've installed 9.0.4, running with plenty of resources. Installed MOOII fine as well.
However, every time I launch the game, the window resizes slightly, and then is simply black. Eventually I get a "Null pointer" error message.
I'm only vaguely familiar with what a null pointer exception is, and have zero facility with programming, so in other words, I have absolutely no clue what the problem is or how to fix it, or if it even can be fixed at all.
I'm sure there's probably something really obvious that I'm missing. From what I've been able to gather through some exhaustive searching, other people are running MOOII in SS with 9.0.4 just fine. If anyone has any ideas as to what's going on here, I'd greatly appreciate the help.
This is probably a very basic problem to which I should know the solution, but I've never used SS before and am totally unfamiliar with OSs earlier than X. So here goes:
I recently bought a copy of the OS port of Master of Orion II, so I decided to get SS up and running (on my Intel OS X 10.6.4 MBP) in order to play it. Everything went completely smooth with SS. I've installed 9.0.4, running with plenty of resources. Installed MOOII fine as well.
However, every time I launch the game, the window resizes slightly, and then is simply black. Eventually I get a "Null pointer" error message.
I'm only vaguely familiar with what a null pointer exception is, and have zero facility with programming, so in other words, I have absolutely no clue what the problem is or how to fix it, or if it even can be fixed at all.
I'm sure there's probably something really obvious that I'm missing. From what I've been able to gather through some exhaustive searching, other people are running MOOII in SS with 9.0.4 just fine. If anyone has any ideas as to what's going on here, I'd greatly appreciate the help.
- Ronald P. Regensburg
- Expert User
- Posts: 7821
- Joined: Thu Feb 09, 2006 10:24 pm
- Location: Amsterdam, Netherlands
Maybe the game needs to run with a specific screen resolution and color depth and tries (in vain) to set that by itself. SheepShaver does not emulate all of the hardware of an old PPC Mac and the needed hardware may be missing in the emulator. You can try setting different combinations of resolution and color depth in Monitors control panel before launching the game.
And I do know if the following is related to your problem, but it is worth a try also:
Apple always used a standard gamma value of 1.8 for screen display. In MacOSX 10.6 this was changed to 2.2, the standard used everywhere else. Some games do not work properly in SheepShaver with gamma in MacOSX set to 2.2.
Go to System Preferences > Displays > Color and use the Calibrate feature to create a new profile with a gamma value of 1.8.
And I do know if the following is related to your problem, but it is worth a try also:
Apple always used a standard gamma value of 1.8 for screen display. In MacOSX 10.6 this was changed to 2.2, the standard used everywhere else. Some games do not work properly in SheepShaver with gamma in MacOSX set to 2.2.
Go to System Preferences > Displays > Color and use the Calibrate feature to create a new profile with a gamma value of 1.8.
-
- Space Cadet
- Posts: 6
- Joined: Sat Oct 23, 2010 4:40 am
- Location: Toronto, ON
Thanks for the advice; I tried multiple settings. Based on the fact that it didn't resize anymore, it seems that 640x480 is the resolution that the game expected. I changed the gamma value in Mac OS X and fiddled with the color depth in SS/9.0.4. I'm still getting a run-time error, except instead of a null pointer error I'm now getting the message "unable to create underlay -108." A different error is progress in my book! I'll lick this yet.
-
- Space Cadet
- Posts: 6
- Joined: Sat Oct 23, 2010 4:40 am
- Location: Toronto, ON
One other thing that might be significant:
I noticed that when I tried to open an .LBX video file directly from the game's data folder, QuickTime froze and a hard reset of the virtual machine was needed. Could this be indicative of something? I don't know, maybe .LBX files aren't supposed to open in that circumstance anyway, but maybe it means something as to the kind of video error that's going on.
I noticed that when I tried to open an .LBX video file directly from the game's data folder, QuickTime froze and a hard reset of the virtual machine was needed. Could this be indicative of something? I don't know, maybe .LBX files aren't supposed to open in that circumstance anyway, but maybe it means something as to the kind of video error that's going on.
- Ronald P. Regensburg
- Expert User
- Posts: 7821
- Joined: Thu Feb 09, 2006 10:24 pm
- Location: Amsterdam, Netherlands
-
- Space Cadet
- Posts: 6
- Joined: Sat Oct 23, 2010 4:40 am
- Location: Toronto, ON
- Ronald P. Regensburg
- Expert User
- Posts: 7821
- Joined: Thu Feb 09, 2006 10:24 pm
- Location: Amsterdam, Netherlands
Well, there appears to be a QuickTime related problem. Did you install the MacOS 9.0.4 system in SheepShaver using a retail system install CD? If not, how did you install the system?
("Z" before the version number usually means international version or intended for international system. I have a Dutch OS9 installation with "N" versions.)
("Z" before the version number usually means international version or intended for international system. I have a Dutch OS9 installation with "N" versions.)
- Ronald P. Regensburg
- Expert User
- Posts: 7821
- Joined: Thu Feb 09, 2006 10:24 pm
- Location: Amsterdam, Netherlands
-
- Space Cadet
- Posts: 6
- Joined: Sat Oct 23, 2010 4:40 am
- Location: Toronto, ON
-
- Space Cadet
- Posts: 6
- Joined: Sat Oct 23, 2010 4:40 am
- Location: Toronto, ON
Success!
Huzzah! While randomly fiddling around again, I found that after trashing the QT settings and restarting, I COULD actually open the .LBX videos. I randomly set the color depth back to millions just for kicks, and now for whatever reason the game works. I don't know what happened, but I won't complain! Thanks for the help, guys.
Re: Null Pointer Problems
I just want to say thank you so much for having this all here. Ten years later I had the exact same problem and had no idea what to do, but after reading this here in 2020 figured it out and now I can play an old game I loved in high school. Thanks!
Re: Null Pointer Problems
Speaking of this, 'tis perhaps the season for a new build https://github.com/kanjitalk755/macemu/pull/67
- adespoton
- Forum All-Star
- Posts: 4226
- Joined: Fri Nov 27, 2009 5:11 am
- Location: Emaculation.com
- Contact:
Re: Null Pointer Problems
Thanks for the mode switch commit!rakslice wrote: ↑Tue Dec 22, 2020 7:50 am Speaking of this, 'tis perhaps the season for a new build https://github.com/kanjitalk755/macemu/pull/67