Jump to content

  • Log In with Google      Sign In   
  • Create Account


- - - - -

function registration is very very slow


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
29 replies to this topic

#21 brightening-eyes   Members   -  Reputation: 171

Like
0Likes
Like

Posted 31 October 2013 - 06:37 PM

when i'm trying to compile a script, it crashe's: (i created a save dialog, when i choose save to start compiling, it crashe's my application)

i think the problem is for byetcodes


when you can't see well like me, you can't test your applications and you can't read something

AmirOS: an Open Source Operating system

Audio Game Kit: an open source game engine to develop audio games


Sponsor:

#22 Andreas Jonsson   Moderators   -  Reputation: 3261

Like
0Likes
Like

Posted 31 October 2013 - 07:52 PM

Please show me the script you're trying to compile when it crashes.

I need details in order to investigate the problem.
AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game

#23 brightening-eyes   Members   -  Reputation: 171

Like
0Likes
Like

Posted 01 November 2013 - 01:20 AM

this is the script that i'm trying to compile:

void main()
{
agc_lz_compress("C:\a", "C:\a.dat", 1024*1024);
}

i'm working on an Operating System and i don't get errors as much as this engine


when you can't see well like me, you can't test your applications and you can't read something

AmirOS: an Open Source Operating system

Audio Game Kit: an open source game engine to develop audio games


#24 Andreas Jonsson   Moderators   -  Reputation: 3261

Like
1Likes
Like

Posted 01 November 2013 - 07:28 AM

Thanks for the script. I'll see if I can reproduce the problem.

 

In the future try to be more specific when reporting errors. Provide as much information as possible and I'll be able to help you faster.

 

It would really help seeing the callstack when the crash occurs, so I can figure exactly in which part of the code the problem is.

 

 

PS. You may also want to take extra care with your writing so as not to offend anyone by mistake.


AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game

#25 Andreas Jonsson   Moderators   -  Reputation: 3261

Like
0Likes
Like

Posted 01 November 2013 - 09:16 AM

The script you're trying to compile should compile just fine, except that it has a couple of warnings:

 

test (1, 1) : Info    : Compiling void main()
test (3, 27) : Warning : Invalid escape sequence
test (3, 19) : Warning : Invalid escape sequence
 

The warnings are because of the \a in the paths.

 

I didn't get any crashes, though.

 

 

I took a look at your message callback and I believe I found the cause of your crash.

 

The wxString you're using has no operator += that takes an int. As there is no such operator, nor a constructor that the compiler can use to convert the int to a wxString the C++ compiler is likely converting the int to a pointer. The crash probably happens when wxString tries to copy from this invalid pointer.

 

void messagecallback(const asSMessageInfo *info, void *param)
{
    wxString type;
    if(info->type==asMSGTYPE_ERROR)
    {
        type="error";
    }
    else if(info->type==asMSGTYPE_WARNING)
    {
        type="worning";
    }
    else if(info->type==asMSGTYPE_INFORMATION)
    {
        type="information";
    }
    else
    {
        type="unknown";
    }
    wxString message="file: ";
    message+=info->section;
    message+="\nline: ";
    message+=info->row;   // <<<--- this is wrong, wxString has no operator+=(int) 
    message+="\nColumn: ";
    message+=info->col;   // <<<--- this is wrong,  wxString has no operator+=(int)
    message+="\n";
    message+=type;
    message+=": ";
    message+=info->message;
    wxMessageBox(message, type, wxOK, NULL, -1, -1);
}

 

I've never used wxWidgets myself, but from the manual it appears to have the operator<<(int) that does what you intended to do with the +=, i.e formats the integer into a string and appends it.


AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game

#26 brightening-eyes   Members   -  Reputation: 171

Like
0Likes
Like

Posted 01 November 2013 - 11:38 AM

thanks in advance!

but i don't know why it crashe's

if i knew that, i fix it myself

again thanks


when you can't see well like me, you can't test your applications and you can't read something

AmirOS: an Open Source Operating system

Audio Game Kit: an open source game engine to develop audio games


#27 Andreas Jonsson   Moderators   -  Reputation: 3261

Like
0Likes
Like

Posted 01 November 2013 - 01:32 PM

First, try to commment out the two lines I indicated as being incorrect in your message callback, and test your application to see if the crash goes away. If the crash goes away you know these are the cause, and you can try to format the line and column into the text in a different way (e.g. using the << operator).


AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game

#28 brightening-eyes   Members   -  Reputation: 171

Like
0Likes
Like

Posted 02 November 2013 - 09:31 AM

i commented the lines that you sed, but it crashed: allegro game creator has stop working


when you can't see well like me, you can't test your applications and you can't read something

AmirOS: an Open Source Operating system

Audio Game Kit: an open source game engine to develop audio games


#29 Andreas Jonsson   Moderators   -  Reputation: 3261

Like
0Likes
Like

Posted 02 November 2013 - 10:37 AM

I'm sorry to hear that. Unfortunately I have no idea what else may be the cause for the crash. 


AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game

#30 brightening-eyes   Members   -  Reputation: 171

Like
0Likes
Like

Posted 02 November 2013 - 02:20 PM

ok!

thank's for the information that you've provided!


when you can't see well like me, you can't test your applications and you can't read something

AmirOS: an Open Source Operating system

Audio Game Kit: an open source game engine to develop audio games





Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS