SRL Archive - S.M.A.R.T. Questions and Answers.

SMART problem with wine (Mac)


riwu

2015-03-15 03:29:54

I used wine to install simba + 32bit java (windows installers) on a Mac.
Spawning a SMART results in the frames being loaded but not the java applet in the center:

Any idea what could be causing of it?
@Brandon;

Wizzup?

2015-03-15 06:58:57

Did you try using Java from a browser in Wine? (Install firefox in Wine)

Perhaps it's a general graphics problem, and not SMART related.

Hoodz

2015-03-19 11:23:12

@riwu; did you find a fix for it?

riwu

2015-03-19 21:22:53

From: hoodz
@riwu; did you find a fix for it?

After some extensive googling i managed to find a likely solution:
http://winebottler.kronenberg.org/wp/faqs/can-i-install-two-programs-into-the-same-app/

Haven't got time to try it yet, if it works for you let me know too :)

Although it seems like SMART could run natively on Mac with Brandon's edits:
https://github.com/BenLand100/SMART/issues/24

Brandon

2015-03-19 22:56:55

If the WINE problem persists, I'll look into it. Try what Wiz suggested and see if it runs in the browser (within WINE) first. If it doesn't work, post an issue or post it on the SMART v8.3 thread. Someone will most likely see it there (myself, Ben, Wiz, or whoever feels like debugging).

I personally tend to check that thread for SMART issues rather than other threads which get buried when new users post their issues. The SMART v8.3 thread is dedicated and stays at the top of the forum so it's just easier I guess.

I didn't even notice the mention in this post. Not sure if I got the notification or not :S

Hoodz

2015-03-22 06:11:51

@riwu; @Brandon; i'm new to wine, couldn't figure it out. did one of you have success?

riwu

2015-03-22 08:05:37

From: hoodz
@riwu; @Brandon; i'm new to wine, couldn't figure it out. did one of you have success?

I don't actually have a Mac, just helping someone to set up. He hasn't responded since i gave him the above link so no idea if he managed to get it to work.
When he does respond i will let you know if it worked.

I tried what wizzup suggested previously btw, it didnt work in browser either, so it's not a problem specified to SMART. The problem lies with the need to install both the browser/simba and java in the same app with WINE as suggested in the link.

Brandon

2015-03-22 12:44:19

From: hoodz
@riwu; @Brandon; i'm new to wine, couldn't figure it out. did one of you have success?



I installed WineBottler, created a Prefix on the desktop, and installed Java JRE-7u75-i386-offline.exe within WineBottler. Works fine :S

You can probably also use WineSkin. None of the above works with Java 8 (you can't even get the installer to run).


You guys might be missing a step. Also, just so you guys are aware, you can run SMART natively on OS X with the latest patches (I'm not sure if Simba will run natively).

It is also possible to run Simba in Wine and SMART natively and have them communicate.

I don't get any blank applet. Running it in Wine:
http://i.imgur.com/odY6EFg.png

Hoodz

2015-03-22 13:00:18

From: Brandon
I installed WineBottler, created a Prefix on the desktop, and installed Java JRE-7u75-i386-offline.exe within WineBottler. Works fine :S

You can probably also use WineSkin. None of the above works with Java 8 (you can't even get the installer to run).


You guys might be missing a step. Also, just so you guys are aware, you can run SMART natively on OS X with the latest patches (I'm not sure if Simba will run natively).

It is also possible to run Simba in Wine and SMART natively and have them communicate.

I don't get any blank applet. Running it in Wine:
http://i.imgur.com/odY6EFg.png

just tried it with rs3, and yes it works.
but it doesn't work for osr…

Brandon

2015-03-22 13:35:27

From: hoodz
just tried it with rs3, and yes it works.
but it doesn't work for osr…



It does :S http://i.imgur.com/BYtXApr.png and http://i.imgur.com/UWoBjOc.png


Hoodz

2015-03-22 13:49:44

@Brandon; do you have time to tv me? :o

Brandon

2015-03-22 13:52:17

From: hoodz
@Brandon; do you have time to tv me? :o



Lol. Send a PM with the details.

Brandon

2015-03-22 16:31:27

So apparently, this bug only exists on some systems (doesn't happen to me :S). It MIGHT be something to do with multiple monitors but I doubt it.
Wine has a problem on some systems trying to display components. It's basically acting like in WinAPI where you setup your components first THEN set it visible. That would make sense since we're emulating Windows (even though this doesn't seem to be a problem on Windows natively).


For that reason, the fix which took about 2.5 hrs to debug (first we built smart natively to test if its his graphics card or monitor then built it for wine and debugged from there). Patch is to change the visibility to happen AFTER frame.pack (another layout bug just like in Linux Bug ID 25 but harder to find):


This:


Main.debug("Client INIT");
clientApplet.init();
Main.debug("Client START");
clientApplet.setVisible(true);
clientApplet.start();
Main.debug("Client WAITING");

//setup canvas, validate canvas, get class loader..

clientFrame.pack();
clientFrame.setResizable(false);

//blah blah..


Was changed to:


Main.debug("Client INIT");
clientApplet.init();
Main.debug("Client START");
clientApplet.start();
Main.debug("Client WAITING");

//setup canvas, validate canvas, get class loader..

clientFrame.pack();
clientFrame.setResizable(false);
clientApplet.setVisible(true); //THIS LINE was moved here..
//blah blah..


That took FOREVER to find because SMART works on his comp perfectly fine NATIVELY (for both OSRS and RS3) and Virtually (only for RS3) lol. So the problem was only with OSRS and took longer than expected to pin-point. Even the browser in Wine had this problem.

Submitted as a bug on the github: https://github.com/BenLand100/SMART/issues/26 Thanks @hoodz; for letting me debug for so long.

Hoodz

2015-03-22 16:44:51

From: Brandon
*snip*


rep brandon, guys! he deserves it!
too bad i can't.

Harrier

2015-03-22 16:52:03

From: hoodz
rep brandon, guys! he deserves it!
too bad i can't.

I think he's got enough as it is tho :p

Hoodz

2015-03-22 17:05:48

From: Hawker
I think he's got enough as it is tho :p


yes but its just a way to thank him

Brandon

2015-03-22 17:16:48

From: hoodz
yes but its just a way to thank him


Lol it's okay. You've already verbally thanked me and lent me 2.5 hours to debug it (the thought alone is good enough for me). I've got the most rep anyway (almost 500 more than the next guy last I checked). 3000+ or something. Give the +1 to riwu if you want (since it's his thread - logic). It's just internet points anyway. No worries.

EDIT: I'm exactly at 3000 :O.


riwu

2015-04-01 22:01:19

@Brandon; i've successfully set up simba+smart on 2 Macs, but im having trouble on this 3rd Mac.
I applied the fix https://github.com/riwu/SMART/commit/f0abfea4fce0bf59516502bc8ce1796faf0126fc
Still get a blank screen at the center of the SMART.
It only does that for OSR, RS3 works perfectly fine. Also even though i'm unable to see the RS, the script could actually detect it.
So basically it's loaded successfully but not rendered to the user.
Any idea how to fix it?

Brandon

2015-04-01 22:51:33

From: riwu
@Brandon; i've successfully set up simba+smart on 2 Macs, but im having trouble on this 3rd Mac.
I applied the fix https://github.com/riwu/SMART/commit/f0abfea4fce0bf59516502bc8ce1796faf0126fc
Still get a blank screen at the center of the SMART.
It only does that for OSR, RS3 works perfectly fine. Also even though i'm unable to see the RS, the script could actually detect it.
So basically it's loaded successfully but not rendered to the user.
Any idea how to fix it?



https://www.diffchecker.com/89ysusee (Left is official SMART with patches applied; Right is your version of SMART)..

Try that. If it works, then issue 26 depends on issue 25 to be patched also.. see: https://github.com/BenLand100/SMART/issues/25

riwu

2015-04-02 11:08:26

From: Brandon
https://www.diffchecker.com/89ysusee (Left is official SMART with patches applied; Right is your version of SMART)..

Try that. If it works, then issue 26 depends on issue 25 to be patched also.. see: https://github.com/BenLand100/SMART/issues/25

replaced my entire client.java with the code on the left, no luck :(

Also not sure if it's related, i noticed that i'm able to replace/remove plugins/smart.jar while simba has it loaded (with smart running), wasnt able to do that on windows.

Brandon

2015-04-02 21:28:11

From: riwu
replaced my entire client.java with the code on the left, no luck :(

Also not sure if it's related, i noticed that i'm able to replace/remove plugins/smart.jar while simba has it loaded (with smart running), wasnt able to do that on windows.



Not sure what the problem is then. I'd have to access the computer and see for myself as well as test code.

Same code works for hoodz (we compiled it on their machine) and as for me, I didn't require any patches at all.

@hoodz; Can you provide @riwu; your jar and plugins from Wine? Just to see if it works for him.

Hoodz

2015-04-02 22:52:13

From: Brandon
Not sure what the problem is then. I'd have to access the computer and see for myself as well as test code.

Same code works for hoodz (we compiled it on their machine) and as for me, I didn't require any patches at all.

@hoodz; Can you provide @riwu; your jar and plugins from Wine? Just to see if it works for him.


Sure, I dont have access to my pc now but Ill send @riwu; the plugins in a few hours.