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

Author Topic: Cant read DLL s on some PC s - My Mario Game with SFML  (Read 2808 times)

0 Members and 2 Guests are viewing this topic.

Tigre Pablito

  • Full Member
  • ***
  • Posts: 226
    • View Profile
    • Email
Cant read DLL s on some PC s - My Mario Game with SFML
« on: May 16, 2013, 03:21:35 am »
Hello, Ladies and Guys from SFML
I ve done a Mario game with C# and SFML, and in some PC s (Windows 7 as most), it throws a strange exception: (in brief) "Cant read sfml-graphics-2 cos the linking error register is disabled" (more or less)
I already detailed the message from the command shell on my last post, when was solved my last problem
I suppose it cant read other dll s either, not only sfml-graphics-2 ...
My intention is to be able to run my Mario game in all PC s, and dont know if this has to do directly with SFML, but I ll thank those members who can help me to enable the thing that allows my application to read the SFML DLL s and then to run
Pablo
Buenos Aires Argentina

zsbzsb

  • Hero Member
  • *****
  • Posts: 1409
  • Active Maintainer of CSFML/SFML.NET
    • View Profile
    • My little corner...
    • Email
Re: Cant read DLL s on some PC s - My Mario Game with SFML
« Reply #1 on: May 16, 2013, 03:53:08 am »
This sounds more like a problem with how the .NET framework is installed, but unless you can provide a more detailed error message (the exact message would be best) I can help. I have never experienced this and what you gave does not return any relevant google results.

A few things to check...
  • Proper C++ Version is Installed
  • .NET Framework that you compiled against is installed
  • SFML.NET dlls are along side your executable
  • CSFML dlls are also with your executable
  • User has adequate permissions
  • Try temporarily disabling antivirus/firewall program
Motion / MotionNET - Complete video / audio playback for SFML / SFML.NET

NetEXT - An SFML.NET Extension Library based on Thor

Tigre Pablito

  • Full Member
  • ***
  • Posts: 226
    • View Profile
    • Email
Re: Cant read DLL s on some PC s - My Mario Game with SFML
« Reply #2 on: May 16, 2013, 04:02:32 pm »
ZSBZSB, you solved my last problem ... I wrote this after that, but I suppose I should have started a new post or thread, as I did then
I QUOTE FROM ME:

I used the event handling as you told me and now the problem disappeared  , you were right that Windows thought my app wasn t responding cos of the stack up of events, so I thank you, and all those who replied, and also those who have viewed this post (or thread), I see it has more views than most ... I don t know if many ladies and guys from SFML would have been seing my Super Mario game  ... I ll never know ... anyway, get ready for the next version, it s much better 

There s another problem, that happened 2 times to me, on other persons' PCs, and don t know on how many others could happen, cos I want to distribute my game:
The application crashes and the command shell says:
"Unhandled exception: System.IO.FileNotFoundException: Unable to load file or assembly ´sfml-graphics-2´, Version 0.0.0.0, PublicKeyToken = null, neither one of its dependencies. System can t find the file.
.......
AVS: The assembly linking register is disabled.
To enable the assembly linking error register, set the register value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) as 1.
Note: Exists a performance decrease related to assembly linking error register.
To disable this issue, delete the register value [HKLM\Software\Microsoft\Fusion!EnableLog]."

This nice letter is in Spanish, I hope my translation is Ok.

The OS in what this occurs is Windows 7. Mine is W 7 too, and here my program runs fine. I know very little about OS s ... I think I should enable or disable something, as it says in the letter, but don t know what nor where, nor how ... Could you help, once again? 

Note: The "yellow faces" were deleted at coping and pasting my message, let yourselves excuse me

zsbzsb

  • Hero Member
  • *****
  • Posts: 1409
  • Active Maintainer of CSFML/SFML.NET
    • View Profile
    • My little corner...
    • Email
Re: Cant read DLL s on some PC s - My Mario Game with SFML
« Reply #3 on: May 16, 2013, 04:48:00 pm »
What exact version of SFML.NET are you using? Did you compile it yourself or use precompiled binaries?
Also what compiler settings are you using when you compile your game before you move it to the computer where you get the crash?

The person that gets the crash, is she sure that all 8 of the .dlls are next to the executable? If you are providing it to her in a compressed file (such as from dropbox in your previous thread) make sure she decompresses all of the files to a single folder before attempting to run the game. If she isn't sure about this, have her take a screenshot of where she is running your game from and post it here.

Ignore the error message about "AVS: The assembly linking register is disabled." That is not part of your problem.

And by the way, the Spanish to English translation is fine, just hopefully you can read this back.
« Last Edit: May 16, 2013, 04:57:06 pm by zsbzsb »
Motion / MotionNET - Complete video / audio playback for SFML / SFML.NET

NetEXT - An SFML.NET Extension Library based on Thor

Tigre Pablito

  • Full Member
  • ***
  • Posts: 226
    • View Profile
    • Email
Re: Cant read DLL s on some PC s - My Mario Game with SFML
« Reply #4 on: May 17, 2013, 05:33:43 pm »
Hi
I m using SFML 2, I suppose, I downloaded it, the folder s name is  LaurentGomila-SFML.Net-b8d7773, I think it s SFML 2 (for C# .NET), the DLL s came already compiled, but the source is there too
In my .rar file, the DLL s (8) are along side the EXE, as it is in the link I gave you in my last thread, ... when you have a little time, if you want you can see it

one of the persons who experienced this crash, sent me the command shell screenshot that contains the letter I translated onto this thread

Isn t there any way to link the EXE with the DLL s statically? I think that would avoid many problems

About my compiler settings, what I could see is .NET Framework 3.5, Console Aplication

I didn t understand what you meant with "hopefully you can read this back" ...

Thank you

zsbzsb

  • Hero Member
  • *****
  • Posts: 1409
  • Active Maintainer of CSFML/SFML.NET
    • View Profile
    • My little corner...
    • Email
Re: Cant read DLL s on some PC s - My Mario Game with SFML
« Reply #5 on: May 20, 2013, 05:47:05 pm »
Sorry for the late reply, I was gone this entire weekend at a camping trip in the great outdoors (actually I won't lie and say I did not have my laptop, but I had no internet)  :D

Quote
I m using SFML 2, I suppose, I downloaded it, the folder s name is  LaurentGomila-SFML.Net-b8d7773

Since SFML was just released download the release from the main website to make sure you have the latest and greatest.


Quote
In my .rar file, the DLL s (8) are along side the EXE, as it is in the link I gave you in my last thread,

Yes they are there inside the .rar file, but a .rar file is a compressed container that holds other files. If you just open the .rar and click on the executable the executable will be decompressed to a temporary folder and then ran from that temporary folder. Unless you decompress the entire .rar file before running the executable none of the dlls will be next to your executable.

So make sure your friend decompresses the entire .rar file into another folder before running the executable.



Quote
Isn t there any way to link the EXE with the DLL s statically? I think that would avoid many problems

CLR/.NET does not provide a way to do this.

However without ever trying anything I have a theory it may be possible to fake "static" linking. I don't have time to test this at the moment, but here is how it may "work". Add the 8 dlls as resources to your project so they get packed into the executable's resource file. Then in your main() function before calling SFML.NET functions remove the dlls from your resource file and copy them next to your executable. None of this is tested and is only a theory, but feel free to experiment.


Quote
I didn t understand what you meant with "hopefully you can read this back"

I meant I hope that you will be able to translate this back into spanish and understand what I am saying.
« Last Edit: May 20, 2013, 05:50:14 pm by zsbzsb »
Motion / MotionNET - Complete video / audio playback for SFML / SFML.NET

NetEXT - An SFML.NET Extension Library based on Thor