Re: The pointer is not properly initialized Error

2020-06-02 Thread nisshaa2004 via 4D_Tech
Thank you so much Koen.

The scanner is not connected anymore for me to debug, but when I debugged
earlier I remember $4 had the pointer value ->__qpix_acq_array_long. This
had the required array elements for setting up the event information.
Similarly, it had values for all the other events too.

I was thinking on the same lines of contacting the QPix Developer.

Thanks & Regards
Nisha






--
Sent from: http://4d.1045681.n5.nabble.com/4D-Tech-f1376241.html
**
4D Internet Users Group (4D iNUG)
New Forum: https://discuss.4D.com
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: The pointer is not properly initialized Error

2020-06-02 Thread Koen Van Hooreweghe via 4D_Tech
Nisha,

If you set a break point in the case of branches, can you see what you get in 
$4 at runtime?

You might need to contact the developer of QPix to get this solved.

Koen

> Op 2 jun. 2020, om 11:36 heeft nisshaa2004 via 4D_Tech <4d_tech@lists.4d.com> 
> het volgende geschreven:
> 
> They are correct in the code, looks like while pasting from MAC to the
> screen here I made a mistake. Sorry for that.
> 
> In the actual code, it is
> 
> Case of 
> 
> : ($event=qpx_AcqImageSaved)
> : ($event=qpx_AcqSetupResolution)
> : ($event=qpx_AcqSetupPixelFormat)
> 
> 
> So it conforms to the QPix manual.




Compass bv
Koen Van Hooreweghe
Kloosterstraat 65
9910 Aalter
Belgium
tel +32 495 511.653

**
4D Internet Users Group (4D iNUG)
New Forum: https://discuss.4D.com
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: The pointer is not properly initialized Error

2020-06-02 Thread nisshaa2004 via 4D_Tech
Thanks Koen,

You are right, it is the QPix. You are also right about the event constants. 

They are correct in the code, looks like while pasting from MAC to the
screen here I made a mistake. Sorry for that.

In the actual code, it is

Case of 

: ($event=qpx_AcqImageSaved)
: ($event=qpx_AcqSetupResolution)
: ($event=qpx_AcqSetupPixelFormat)


So it conforms to the QPix manual.

It works for one Twain Scanner irrespective of this pointer issue but
crashes for another.


Thanks & Regards,
Nisha



--
Sent from: http://4d.1045681.n5.nabble.com/4D-Tech-f1376241.html
**
4D Internet Users Group (4D iNUG)
New Forum: https://discuss.4D.com
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: The pointer is not properly initialized Error

2020-06-02 Thread Koen Van Hooreweghe via 4D_Tech
Ah, a bit more complex as it is a callback method called from a 
plugin/component. I guess QPix?

Are you sure the event constants are the correct ones?

: ($event=imageSaved)
: ($event=resolution) 
: ($event=pixelFormat) 

I've never used this plugin, but in the online manual I found qpx_AcqImgeSaved, 
qpx_AcqSetupResolution as event kind param constants.

You might be checking invalid events where the eventInfoParam is not the 
expected value.

HTH
KOne

> Op 2 jun. 2020, om 11:08 heeft nisshaa2004 via 4D_Tech <4d_tech@lists.4d.com> 
> het volgende geschreven:
> 
> Thanks Koen for the reply
> 
> 
> 
>   $err:=QPx_AcqRunSession
> ($protocol;$deviceName;$options;"IMG_ACQ_LAB_SESSION_HANDLER")
> 
> IMG_ACQ_LAB_SESSION_HANDLER // This is the method that has the error
> 
> 
> QPx_AcqRunSession this method takes in the following parameters.
> 
> Input parameter   acqProtocol LONGINT Acquisition protocol ID
> Input parameter   deviceName  TEXTDevice name
> Input parameter   sessionOptions  LONGINT Acquisition options
> Input parameter   eventHandlerTEXTEvent handler method name
> 
> 
> IMG_ACQ_LAB_SESSION_HANDLER // This is the Event handler method name
> 
> 
> Thanks & Regards,
> Nisha
> 
> 
> 
> --
> Sent from: http://4d.1045681.n5.nabble.com/4D-Tech-f1376241.html
> **
> 4D Internet Users Group (4D iNUG)
> New Forum: https://discuss.4D.com
> Archive:  http://lists.4d.com/archives.html
> Options: https://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> **




Compass bv
Koen Van Hooreweghe
Kloosterstraat 65
9910 Aalter
Belgium
tel +32 495 511.653

**
4D Internet Users Group (4D iNUG)
New Forum: https://discuss.4D.com
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: The pointer is not properly initialized Error

2020-06-02 Thread nisshaa2004 via 4D_Tech
Thanks Koen for the reply



$err:=QPx_AcqRunSession
($protocol;$deviceName;$options;"IMG_ACQ_LAB_SESSION_HANDLER")

IMG_ACQ_LAB_SESSION_HANDLER // This is the method that has the error


QPx_AcqRunSession this method takes in the following parameters.

Input parameter acqProtocol LONGINT Acquisition protocol ID
Input parameter deviceName  TEXTDevice name
Input parameter sessionOptions  LONGINT Acquisition options
Input parameter eventHandlerTEXTEvent handler method name


IMG_ACQ_LAB_SESSION_HANDLER // This is the Event handler method name


Thanks & Regards,
Nisha



--
Sent from: http://4d.1045681.n5.nabble.com/4D-Tech-f1376241.html
**
4D Internet Users Group (4D iNUG)
New Forum: https://discuss.4D.com
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: The pointer is not properly initialized Error

2020-06-02 Thread Koen Van Hooreweghe via 4D_Tech
Hi,

You don't show us how this method is called. The 4th parameter in the calling 
method is probably not a valid pointer.

Kind regards,
Koen

> Op 2 jun. 2020, om 10:50 heeft nisshaa2004 via 4D_Tech <4d_tech@lists.4d.com> 
> het volgende geschreven:
> 
> I am trying to run a code in 4D v16.4 and get The pointer is not properly
> initialized Error from 3 separate lines.




Compass bv
Koen Van Hooreweghe
Kloosterstraat 65
9910 Aalter
Belgium
tel +32 495 511.653

**
4D Internet Users Group (4D iNUG)
New Forum: https://discuss.4D.com
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

The pointer is not properly initialized Error

2020-06-02 Thread nisshaa2004 via 4D_Tech
Hi All,

I am trying to run a code in 4D v16.4 and get The pointer is not properly
initialized Error from 3 separate lines.

This is the code as follows

C_POINTER($4;$arg)
.
.
$arg:=$4

Case of 
: ($event=imageSaved)

C_TEXT($imagePath)
$imagePath:=$arg-> //This line throws pointer not 
initialized error




: ($event=resolution)  //Resolution - $arg-> is array longint[2] (horz, vert
res)

..

$arg->{1}:=gResolution//This line throws pointer 
not initialized
error
$arg->{2}:=gResolution




..


: ($event=pixelFormat)  //format - $arg-> is longint


If (gFormatsPopup>0)

$arg->:=gFormats{gFormatsPopup} //This line also throws 
pointer not
initialized error



It throws the error in those 3 different places causing 4D to crash

Any idea about how to make this work?



Thanks & Regards
Nisha Fernando





--
Sent from: http://4d.1045681.n5.nabble.com/4D-Tech-f1376241.html
**
4D Internet Users Group (4D iNUG)
New Forum: https://discuss.4D.com
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**