Null Pointer Problems

About SheepShaver, a PPC Mac emulator for Windows, MacOS X, and Linux that can run System 7.5.3 to MacOS 9.0.4.

Moderators: Cat_7, Ronald P. Regensburg, ClockWise

Post Reply
RaygunJones
Space Cadet
Posts: 6
Joined: Sat Oct 23, 2010 4:40 am
Location: Toronto, ON

Null Pointer Problems

Post by RaygunJones »

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.
User avatar
Ronald P. Regensburg
Expert User
Posts: 7821
Joined: Thu Feb 09, 2006 10:24 pm
Location: Amsterdam, Netherlands

Post by Ronald P. Regensburg »

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.
RaygunJones
Space Cadet
Posts: 6
Joined: Sat Oct 23, 2010 4:40 am
Location: Toronto, ON

Post by RaygunJones »

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.
RaygunJones
Space Cadet
Posts: 6
Joined: Sat Oct 23, 2010 4:40 am
Location: Toronto, ON

Post by RaygunJones »

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.
User avatar
Ronald P. Regensburg
Expert User
Posts: 7821
Joined: Thu Feb 09, 2006 10:24 pm
Location: Amsterdam, Netherlands

Post by Ronald P. Regensburg »

Which version of QuickTime is installed? The latest QT version that is compatible with SheepShaver is 4.1.2. Could the installation of the game have installed a later QT version? (You can check this by viewing the installed extensions in Extension Manager (see Control Panels).
RaygunJones
Space Cadet
Posts: 6
Joined: Sat Oct 23, 2010 4:40 am
Location: Toronto, ON

Post by RaygunJones »

According to the QuickTime settings, the installed version is 4.1 (It also says it's "Z," whatever that means). However, it seems that even trying to open the QuickTime player directly causes it to freeze. The sample movies in the QuickTime folder are having the same effect as the .LBX files.
User avatar
Ronald P. Regensburg
Expert User
Posts: 7821
Joined: Thu Feb 09, 2006 10:24 pm
Location: Amsterdam, Netherlands

Post by Ronald P. Regensburg »

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.)
Mike_
Student Driver
Posts: 20
Joined: Sat Oct 24, 2009 4:21 pm
Location: Bremke, Germany

Post by Mike_ »

RaygunJones wrote:... when I tried to open an .LBX video file directly from the game's data folder, QuickTime froze ...
AFAIK ".LBX" is a Microsoft Foxpro database file extension. So your game probably uses that format for it's game data, and QT is just trying the impossible...
User avatar
Ronald P. Regensburg
Expert User
Posts: 7821
Joined: Thu Feb 09, 2006 10:24 pm
Location: Amsterdam, Netherlands

Post by Ronald P. Regensburg »

Maybe the QT problem is secondary to your attempt to open the .LBX file. Trash QuickTime preferences (in System Folder > Preferences), restart the emulated machine and try again the example movie and picture. (Do they have the same version number as the QuickTime extensions?)
RaygunJones
Space Cadet
Posts: 6
Joined: Sat Oct 23, 2010 4:40 am
Location: Toronto, ON

Post by RaygunJones »

Trashing QT settings and restarting did resolve the issue with QT freezing, but my original Null Pointer error remains. A for the OS, it's 9.0.4 International English, and I installed it off a disc image (a .TOAST file to be exact, but SS didn't seem to have any problems with it).
RaygunJones
Space Cadet
Posts: 6
Joined: Sat Oct 23, 2010 4:40 am
Location: Toronto, ON

Success!

Post by RaygunJones »

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.
estecklow
Space Cadet
Posts: 4
Joined: Sun Jun 28, 2020 6:22 pm

Re: Null Pointer Problems

Post by estecklow »

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!
rakslice
Student Driver
Posts: 22
Joined: Sun Jun 27, 2004 12:50 am

Re: Null Pointer Problems

Post by rakslice »

Speaking of this, 'tis perhaps the season for a new build :wink: https://github.com/kanjitalk755/macemu/pull/67
User avatar
adespoton
Forum All-Star
Posts: 4226
Joined: Fri Nov 27, 2009 5:11 am
Location: Emaculation.com
Contact:

Re: Null Pointer Problems

Post by adespoton »

rakslice wrote: Tue Dec 22, 2020 7:50 am Speaking of this, 'tis perhaps the season for a new build :wink: https://github.com/kanjitalk755/macemu/pull/67
Thanks for the mode switch commit!
Post Reply