Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Making my program work on other machines  (Read 2765 times)

0 Members and 1 Guest are viewing this topic.

Pikmeir

  • Newbie
  • *
  • Posts: 31
    • View Profile
Making my program work on other machines
« on: August 02, 2012, 10:26:15 am »
I'm working on a game, and before I go too deep into it I want to make sure it works fine on other machines.
First of all, I've read all the tutorials on doing this, so I know I'm supposed to include the SFML dlls, the audio dlls, etc etc (I even included the MinGW dll). I'm using SFML 2 and compiling with MinGW.

My laptop uses 32-bit Windows Vista with an ATI Radeon X1200 graphics card (more like a potato chip with circuitry). Anyway, it works great on my laptop. I put my whole program on a friend's desktop (running Windows 7), and it worked great there too. Tried putting it on another friend's laptop (running Windows Vista, same as me) - but the program just crashes before it can even open. It doesn't give an error message, just crashes and Windows tells me it has to close the program (same as any crash).

I'm not sure how I can fix it, or if I just have to accept that it won't work on everyone's computer. Does anyone have any ideas?

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: Making my program work on other machines
« Reply #1 on: August 02, 2012, 10:35:56 am »
It's hard to solve a crash without seeing the code that produces it.

What you can do is to make sure that it's not an environment issue, by executing a minimal app (like the one shown in the getting started tutorials) on the laptop where your app crashes.
Laurent Gomila - SFML developer

slotdev

  • Sr. Member
  • ****
  • Posts: 385
    • View Profile
Re: Making my program work on other machines
« Reply #2 on: August 02, 2012, 10:46:50 am »
You can also get more details on the crash by looking at the Windows Event Viewer (Control Panel->Administritive Tools->Event Viewer->Windows Logs->Application).

Run the program so it crashes, then immediately look at the error event that will be generated.

It could be missing WinSxS libraries, if not then as Laurent suggested, write a small program to reproduce the fault. If you intend the game to only run on Windows....personally, I would always use Visual Studio ;)
SFML 2.1

Pikmeir

  • Newbie
  • *
  • Posts: 31
    • View Profile
Re: Making my program work on other machines
« Reply #3 on: August 02, 2012, 11:00:38 am »
Sorry that my post is so vague, that I only wrote "crashes" on it. I'm not sure what other information that I can give to help figure out the problem.

I took your suggestion and compiled a minimal application, which only opens a window (just to check if SFML will work), and I still included all of the dlls with it. I tried it and the minimal application opens fine on the laptop now without any problems.

I thought it might be a problem with music, so I tried again without the music, but it still did the same thing as before. Any other ideas what I can try testing?

I wanted to make it run on Visual Studio, like 10 times when I first downloaded SFML, for like 2 days, but every time even when I followed the instructions for setting up SFML perfectly, from multiple tutorials, even from video tutorials, it never works; it just won't link correctly, because everyone's tutorial isn't the exact same set-up as my computer, so I gave up on Visual Studio and switched to MinGW... unless there's some better tutorial. But I'd really love if I could use VC++ instead, since MinGW is nice but it's not as user friendly.

Pikmeir

  • Newbie
  • *
  • Posts: 31
    • View Profile
Re: Making my program work on other machines
« Reply #4 on: August 02, 2012, 11:11:30 am »
You can also get more details on the crash by looking at the Windows Event Viewer (Control Panel->Administritive Tools->Event Viewer->Windows Logs->Application).

Run the program so it crashes, then immediately look at the error event that will be generated.

It could be missing WinSxS libraries, if not then as Laurent suggested, write a small program to reproduce the fault. If you intend the game to only run on Windows....personally, I would always use Visual Studio ;)

That's a very good suggestion, thanks! I tried that and here's what I got. I can't really understand it though. I cut out the PC name but this is what I got. Any ideas what the problem could be?
- <Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
- <System>
<Provider Name="Windows Error Reporting" />
<EventID Qualifiers="0">1001</EventID>
<Level>4</Level>
<Task>0</Task>
<Keywords>0x80000000000000</Keywords>
<TimeCreated SystemTime="2012-08-02T08:57:13.000Z" />
<EventRecordID>5642</EventRecordID>
<Channel>Application</Channel>
<Computer>Personal-PC</Computer>
<Security />
</System>
- <EventData>
<Data>3094532583</Data>
<Data>1</Data>
<Data>APPCRASH</Data>
<Data>NONE</Data>
<Data>0</Data>
<Data>Game.exe</Data>
<Data>0.0.0.0</Data>
<Data>501a3f6a</Data>
<Data>StackHash_5ab3</Data>
<Data>6.0.6000.16386</Data>
<Data>4549bdc9</Data>
<Data>c0000374</Data>
<Data>000af1c9</Data>

-------------------------

P1: Game.exe
P2: 0.0.0.0
P3: 501a3f6a
P4: StackHash_5ab3
P5: 6.0.6000.16386
P6: 4549bdc9
P7: c0000374
P8: 000af1c9
P9:
P10:
 

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: Making my program work on other machines
« Reply #5 on: August 02, 2012, 11:28:07 am »
The best solution would be to install a debugger and your friend's computer, and run it there to trace the crash. But I don't know if your friend can/wants to do that :)

I don't know much about Windows events, but since it's a crash in your own code, I think they won't help much to identify the problem.

Quote
I wanted to make it run on Visual Studio, like 10 times when I first downloaded SFML, for like 2 days, but every time even when I followed the instructions for setting up SFML perfectly, from multiple tutorials, even from video tutorials, it never works; it just won't link correctly, because everyone's tutorial isn't the exact same set-up as my computer, so I gave up on Visual Studio and switched to MinGW...
The official tutorial is all that you should need (any other 2.0 tutorial is possibly outdated or incomplete). If something is not clear or doesn't work, please ask and we'll be glad to help you :)
Laurent Gomila - SFML developer

Pikmeir

  • Newbie
  • *
  • Posts: 31
    • View Profile
Re: Making my program work on other machines
« Reply #6 on: August 02, 2012, 11:38:53 am »
I don't think my friend would like me to turn their computer into a debug machine.

Thanks for your nice advice. I think I'll give the official tutorial one more try and hope it works :)

 

anything