OS compatibility issues with program.
Dec 11, 2014 at 4:07pm UTC
I developed a program for a video game (before you ask upon looking at the code, yes, it is an adult game) that I own that makes it a lot easier for people to use the video game's unpacking tool for making and installing mods. Unfortunately, I've already had two people report issues with the program on XP and 7. While the XP issue seems to be unsolvable until I download VS 2012 (I programmed this in VS 2010), I can't seem to find a solution to the Windows 7 compatibility issue, as all of my research would point to re-installing the software which doesn't seem to apply here since there is no install to my program (it's a lone .exe). Therefore I am asking if the Windows 7 compatibility issue can be found somewhere in the code itself, or if it is due to some other issue.
The program is designed to delete and rewrite a configuration file for the game's unpacking program, and then upon rewriting the configuration file, it runs the unpacking program.
My OS is Windows Vista Home Premium 64-bit
Here is the whole program minus the initialization of the controls to keep the character length under the maximum:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269
#pragma once
#include <stdio.h>
#include <msclr\marshal.h>
#include <msclr\marshal_cppstd.h>
#include <windows.h>
namespace XSPQuickUnpacker {
using namespace System;
using namespace System::ComponentModel;
using namespace System::Collections;
using namespace System::Windows::Forms;
using namespace System::Data;
using namespace System::Drawing;
using namespace System::IO;
using namespace msclr::interop;
/// <summary>
/// Summary for Form1
/// </summary>
public ref class Form1 : public System::Windows::Forms::Form
{
public :
Form1(void )
{
InitializeComponent();
//
//TODO: Add the constructor code here
//
}
protected :
/// <summary>
/// Clean up any resources being used.
/// </summary>
~Form1()
{
if (components)
{
delete components;
}
}
private : System::Windows::Forms::TextBox^ FilePathBox;
protected :
private : System::Windows::Forms::ComboBox^ StoryType;
private : System::Windows::Forms::Button^ StartButton;
private : System::Windows::Forms::RadioButton^ UnpackRadio;
private : System::Windows::Forms::RadioButton^ PackRadio;
private : System::Windows::Forms::Label^ label1;
private : System::Windows::Forms::Label^ label2;
protected :
private :
/// <summary>
/// Required designer variable.
/// </summary>
String^ path;
String^ file;
int step;
private : System::Windows::Forms::Label^ DebugLabel;
private : System::Windows::Forms::Timer^ AntiFreezeTimer;
private : System::ComponentModel::IContainer^ components;
#pragma region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
void InitializeComponent(void )
{
//Omitted code.
}
#pragma endregion
private : System::Void StartButton_Click(System::Object^ sender, System::EventArgs^ e)
{
path=this ->FilePathBox->Text;
if (!File::Exists(path+"\\filemaker\\start.ini" ))
{
FileStream^ fs=File::Create(path+"\\filemaker\\start.ini" );
delete fs;
}
else
{
marshal_context^ context=gcnew marshal_context();
String^ filepath=path+"\\filemaker\\start.ini" ;
const char * temp;
temp=context->marshal_as<const char *>(filepath);
DeleteFile(temp);
delete context;
}
path=path->Replace('\\' , '/' );
if (this ->UnpackRadio->Checked==true )//UNPACKING
{
if (this ->StoryType->SelectedItem=="pack0" )
{
file="pack0" ;
WriteUnpackToFile();
}
else if (this ->StoryType->SelectedItem=="Dungeon" )
{
file="pack_dungeon" ;
WriteUnpackToFile();
}
else if (this ->StoryType->SelectedItem=="Tentacle Dreams" )
{
file="pack_tentacle_dreams" ;
WriteUnpackToFile();
}
else if (this ->StoryType->SelectedItem=="Tentacle Dreams (Fast Sex)" )
{
file="pack_tentacle_fast" ;
WriteUnpackToFile();
}
else if (this ->StoryType->SelectedItem=="Test" )
{
file="pack_test" ;
WriteUnpackToFile();
}
else
{
this ->DebugLabel->Text="ERROR: Invalid story selection!" ;
}
}
else if (this ->PackRadio->Checked==true )//PACKING
{
if (this ->StoryType->SelectedItem=="pack0" )
{
file="pack0" ;
WritePackToFile();
}
else if (this ->StoryType->SelectedItem=="Dungeon" )
{
file="pack_dungeon" ;
WritePackToFile();
}
else if (this ->StoryType->SelectedItem=="Tentacle Dreams" )
{
file="pack_tentacle_dreams" ;
WritePackToFile();
}
else if (this ->StoryType->SelectedItem=="Tentacle Dreams (Fast Sex)" )
{
file="pack_tentacle_fast" ;
WritePackToFile();
}
else if (this ->StoryType->SelectedItem=="Test" )
{
file="pack_test" ;
WritePackToFile();
}
else
{
this ->DebugLabel->Text="ERROR: Invalid story selection!" ;
}
}
}
private : System::Void AntiFreezeTimer_Tick(System::Object^ sender, System::EventArgs^ e)
{
if (step==0)
{
this ->DebugLabel->Text="Writing to file" ;
step+=1;
}
else if (step==1)
{
this ->DebugLabel->Text="Writing to file." ;
step+=1;
}
else if (step==2)
{
this ->DebugLabel->Text="Writing to file.." ;
step+=1;
}
else if (step==3)
{
this ->DebugLabel->Text="Writing to file..." ;
step=0;
}
}
private : System::Void Form1_Load(System::Object^ sender, System::EventArgs^ e)
{
step=0;
}
void WriteUnpackToFile()
{
StreamWriter^ sw = gcnew StreamWriter(path+"\\filemaker\\start.ini" , true );
AntiFreezeTimer->Enabled=true ;
sw->WriteLine("Pack pack1" );
sw->WriteLine("{" );
sw->WriteLine(" unpack = true;" );
sw->WriteLine(" file = \"" +path+"/pack/" +file+".bin\";" );
sw->WriteLine(" outpath = \"" +path+"/pack/\"" ";" );
sw->WriteLine("}" );
AntiFreezeTimer->Enabled=false ;
this ->DebugLabel->Text="Opening filemaker.exe" ;
delete sw;
marshal_context^ context=gcnew marshal_context();
String^ filepath=path+"\\filemaker\\filemaker.exe" ;
filepath=filepath->Replace('/' , '\\' );
filepath="\"" +filepath+"\"" ;
const char * temp;
temp=context->marshal_as<const char *>(filepath);
system(temp);
delete context;
this ->DebugLabel->Text="Opened " +filepath;
}
void WritePackToFile()
{
StreamWriter^ sw = gcnew StreamWriter(path+"\\filemaker\\start.ini" , true );
AntiFreezeTimer->Enabled=true ;
sw->WriteLine("Pack pack" );
sw->WriteLine("{" );
sw->WriteLine(" file = \"" +path+"/pack/" +file+".bin\";" );
sw->WriteLine(" zip = true;" );
sw->WriteLine(" path_full = true;" );
sw->WriteLine(" addpath = \"" +path+"/pack/" +file+"/*.*\";" );
sw->WriteLine("}" );
AntiFreezeTimer->Enabled=false ;
this ->DebugLabel->Text="Opening filemaker.exe" ;
delete sw;
marshal_context^ context=gcnew marshal_context();
String^ filepath=path+"\\filemaker\\filemaker.exe" ;
filepath=filepath->Replace('/' , '\\' );
filepath="\"" +filepath+"\"" ;
const char * temp;
temp=context->marshal_as<const char *>(filepath);
system(temp);
delete context;
this ->DebugLabel->Text="Opened " +filepath;
}
};
}
Here is what the Windows 7 user reported when the program crashed (it's translated from French, in case that causes some confusion):
Problem signature:
Problem Event Name: APPCRASH
Application Name: XSP Quick Packer-Unpacker.exe
Application Version: 0.0.0.0
Timestamp app: 54891aad
Default Module Name: kernelbase.dll
Version of the default module: 6.1.7601.18409
Timestamp default module: 53159a86
The exception code: e0434352
Shifting the exception 0000c42d
OS Version: 6.1.7601.2.1.0.256.1
Locale ID: 1036
Additional Information 1: 0a9e
Additional Information 2: 0a9e372d3b4ad19135b953a78882e789
Additional Information 3: 0a9e
Additional Information 4: 0a9e372d3b4ad19135b953a78882e789
Dec 11, 2014 at 4:16pm UTC
hiya,
have you considered posting your issue on a C++/CLI forum? Your code isn't c++ and you might get a faster response on those forums.
Dec 11, 2014 at 4:46pm UTC
The exception code: e0434352
Not a very useful exception in itself but it does show that the application has an unhandled exception. Try putting some exception handling in.
Topic archived. No new replies allowed.