amx icon indicating copy to clipboard operation
amx copied to clipboard

Runtime problem

Open Disinterpreter opened this issue 5 years ago • 8 comments

Describe the bug I've got a runtime problem in https://github.com/multitheftauto/amx/blob/9ccf54e3c988d1a69d6dfbe8062b063cc462a55c/amx-deps/src/amx/amxfile.c#L167

To reproduce Build the king.dll and try to start 'amx' resource with it. It is reproducing with 'debug' and 'release' presets.

Expected behaviour Must work without error

Screenshots image P.S Sorry I don't have Paint right now.

Version a develop branch

Disinterpreter avatar Jun 15 '20 17:06 Disinterpreter

I guess it depends of https://github.com/multitheftauto/amx/commit/50d6dde55d6aff2bcea7e8084fcabfa0a9c40b21

@theSpool

Disinterpreter avatar Jun 16 '20 07:06 Disinterpreter

Is this when trying to load text files? I noticed that my log files no longer load.

colistro123 avatar Jun 16 '20 08:06 colistro123

Is this when trying to load text files? I noticed that my log files no longer load.

I'm getting an error when trying to make start amx with latest version of the module. All resources of amx-* is from this repo. I've tried to launch it.

Disinterpreter avatar Jun 16 '20 08:06 Disinterpreter

Is this when trying to load text files? I noticed that my log files no longer load.

I'm getting an error when trying to make start amx with latest version of the module. All resources of amx-* is from this repo. I've tried to launch it.

Try this resource temporarily (just to confirm), I believe it's crashing when it executes the fopen native on your script http://whileago.mov.re/nffiles/images/amx-grandlarc.zip

colistro123 avatar Jun 16 '20 08:06 colistro123

Is this when trying to load text files? I noticed that my log files no longer load.

I'm getting an error when trying to make start amx with latest version of the module. All resources of amx-* is from this repo. I've tried to launch it.

Try this resource temporarily (just to confirm), I believe it's crashing when it executes the fopen native on your script http://whileago.mov.re/nffiles/images/amx-grandlarc.zip

It works! Thanks. I think We should update the default resource or edit/make a new issue :)

Disinterpreter avatar Jun 16 '20 08:06 Disinterpreter

Check in your script for wrong fread or fgetchar usage (namely the File: parameter being 0):

https://github.com/multitheftauto/amx/blob/9ccf54e3c988d1a69d6dfbe8062b063cc462a55c/amx-deps/src/amx/amxfile.c#L583

iirc in SA-MP the assertion check is removed so it's just an instant crash unlike here.

theSpool avatar Jun 17 '20 18:06 theSpool

Check in your script for wrong fread or fgetchar usage (namely the File: parameter being 0):

https://github.com/multitheftauto/amx/blob/9ccf54e3c988d1a69d6dfbe8062b063cc462a55c/amx-deps/src/amx/amxfile.c#L583

iirc in SA-MP the assertion check is removed so it's just an instant crash unlike here.

https://github.com/multitheftauto/amx/blob/dd50399cee2736ebdbd20ea3b1705fb6e7434d6d/amx-test/testgm.pwn#L22-L26

Disinterpreter avatar Jun 17 '20 18:06 Disinterpreter

As I remember this fork https://github.com/Daniel-Cortez/pawn-3.2-plus can handle this crash. You should take a look it.

Look at ptrarray_* functions https://github.com/Daniel-Cortez/pawn-3.2-plus/blob/master/source/amx/amxfile.c

Disinterpreter avatar Jun 18 '20 07:06 Disinterpreter