Re: Attempt to read beyond end of stream

2020-12-03 Thread Tarawerkz via 4D_Tech
Peter and Chip,

Thank you both for the constructive feedback on the possibilities.

As the cause of the issue and the consequent resolution (if indeed possible) is 
one black-box, I have decided to go back to the most recent stable version and 
re-do the necessary changes.


Regards,
Ronnie
Tarawerkz

**
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: Running AppleScripts from 4D under Catalina

2020-12-03 Thread Keisuke Miyako via 4D_Tech
it depends on how you implement automation.
are you calling osascript via launch-external-process?

to control the Mail app, normally you need to use 
AEDeterminePermissionToAutomateTarget
https://github.com/miyako/4d-plugin-apple-file-promises/blob/master/apple-file-promises/4DPlugin.cpp

to prompt the "4D is requesting permission to..." dialog and ask for the user's 
permission.
if the user agrees, the app will be added to the list of granted apps in system 
preferences/security/privacy. 

this is only for Apple apps, I think Outlook does't care.
if neither apps are responding, the reason must be something else.

> 2020/12/04 5:30、Peter Adam via 4D_Tech <4d_tech@lists.4d.com>のメール:
> I have an app where when the user wants to send an email from 4D, the program 
> builds an AppleScript to communicate with either Mail or Outlook.
**
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: Running AppleScripts from 4D under Catalina

2020-12-03 Thread nug via 4D_Tech
I have no experience with this — at all— I remember reading that there are 
issues using Apple script with 10.14+
I believe there are new commands in 4D to manage email directly -
Try looking into those.

Also, sad as I am to say this, you will get better response from the new forum.

Chip

> On Dec 3, 2020, at 3:30 PM, Peter Adam via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> I have an app where when the user wants to send an email from 4D, the program 
> builds an AppleScript to communicate with either Mail or Outlook.
> 
> This has been working fin from v17R6 under Mojave but returns a message that 
> it can’t find Mail on Catalina.
> 
> I have code signed and notarised the app, set the entitlements to include 
> Automation in the build and code signing but when I install and run the app 
> on Catalina the emailing still fails with the same error. Mail is definitely 
> installed.
> 
> The Privacy preference does not show the application in the  Automation 
> window as it does under Mojave.
> 
> This is all with 4D v17R6
> 
> Any ideas?
> 
> 
> 
> 
> Cheers
> 
> Peter Adam
> Adam, Zievert & Associates Pty Ltd
> Melbourne Australia
> Skype Phone: +61 3 9016 379
> p: +61 3 9836 3539
> f: +61 3 9836 9730
> m: 0419 552 462
> e: peter.a...@me.com
> w: www.adamzievert.com.au
> 
> **
> 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
> **

**
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
**

Running AppleScripts from 4D under Catalina

2020-12-03 Thread Peter Adam via 4D_Tech
I have an app where when the user wants to send an email from 4D, the program 
builds an AppleScript to communicate with either Mail or Outlook.

This has been working fin from v17R6 under Mojave but returns a message that it 
can’t find Mail on Catalina.

I have code signed and notarised the app, set the entitlements to include 
Automation in the build and code signing but when I install and run the app on 
Catalina the emailing still fails with the same error. Mail is definitely 
installed.

The Privacy preference does not show the application in the  Automation window 
as it does under Mojave.

This is all with 4D v17R6

Any ideas?




Cheers

Peter Adam
Adam, Zievert & Associates Pty Ltd
Melbourne Australia
Skype Phone: +61 3 9016 379
p: +61 3 9836 3539
f: +61 3 9836 9730
m: 0419 552 462
e: peter.a...@me.com
w: www.adamzievert.com.au

**
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: Attempt to read beyond end of stream

2020-12-03 Thread nug via 4D_Tech
My first thought would be damage to the file from the hardware (bad block(s) on 
the disk, 
but I do not know your situation there
Another thought would be a crash/power outage/etc that occurred while 4D was 
writing the structure to disk, 
Or before the cache (4D’s structure, or disk) was flushed interrupting 
completion of the last dev changes

Chip

> On Dec 3, 2020, at 10:59 AM, Tarawerkz  wrote:
> 
> Thanks Chip,
> 
> I’ll try that, hopefully can find a version from not too far back.
> 
> Any idea what could have caused this?
> 
> Regards,
> Ronnie
> Tarawerkz
> 
> 
> 
> 
>> On 3 Dec 2020, at 9:27 PM, nug <4d_o...@pghrepository.org 
>> > wrote:
>> 
>> Ronie,
>> -Go back to the originally damaged structure and try MSC on it again.
>> -go back to a previous version of the structure (backup)
>> -contact 4D support
>> 
>> While I personally do not like it….
>> Also there is a new forum, where nearly ever one is now.
>> You will get more help/eyeballs on this issue there
>> 
>> https://discuss.4d.com 
>> 
>> Chip
>> 
>>> On Dec 3, 2020, at 5:42 AM, Tarawerkz via 4D_Tech <4d_tech@lists.4d.com 
>>> > wrote:
>>> 
>>> Hi All,
>>> 
>>> I would like seek advice on an issue I encountered with a v15 structure 
>>> file which has been in use for a long time.
>>> 
>>> Recently, when I logged in with the designer password to make some 
>>> amendments to the code, I encounter a memory allocation error on a resource 
>>> blob.
>>> So I did a structure repair and compact using MSC utility.
>>> 
>>> After the repair, the original error is resolved but a new error appeared 
>>> in its place,  
>>> This time it is an attempt to read beyond end of stream (error code 200).
>>> Subsequent repairs of the structure file does not remove the error.
>>> 
>>> The issue is data independent as it also appears with an empty data file.
>>> If I were to log in as a normal user (not the designer account), the error 
>>> is not encountered.
>>> 
>>> May I ask how I can recover the structure in this instance?
>>> 
>>> Regards,
>>> Ronnie
>>> Tarawerkz
>>> 
>>> 
>>> 
>>> 
>>> **
>>> 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 
>>> 
>>> **
>> 
> 

**
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: Attempt to read beyond end of stream

2020-12-03 Thread Peter Bozek via 4D_Tech
On Thu, Dec 3, 2020 at 4:59 PM Tarawerkz via 4D_Tech
<4d_tech@lists.4d.com> wrote:
>
> Thanks Chip,
>
> I’ll try that, hopefully can find a version from not too far back.
>
> Any idea what could have caused this?

My info is not very recent, but few years ago I analysed structure of
data and structure file. There are many auxiliary structures, but
actual data are stored in blocks, where each block have a prefix,
containing, between other, size of the block. If this field got
corrupted and contained some ridiculous big value, 4D would crash when
reading the data with the "Attempt to read beyond end of file ..."
error,

This error was hard to fix, because restore did not help (when it did
not read content of blocks) or crashed as well (when it did.) When
problem was in data file, error happened when 4D accessed particular
record, then it was possible to find that record in file and fix it
with hex file editor. With structure this would be much harder.

So, if this is the case, I am afraid you probably do not have other
solution then go to stable backup and then try to copy changes, if you
can open structure without crash. What I would suggest is to try to
exclude all other sources of problem, maybe moving the structure to
new empty folder, no plugins, components, settings or logs.

Regards,

Peter Bozek


>
> Regards,
> Ronnie
> Tarawerkz
>
>
>
**
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: Attempt to read beyond end of stream

2020-12-03 Thread Tarawerkz via 4D_Tech
Thanks Chip,

I’ll try that, hopefully can find a version from not too far back.

Any idea what could have caused this?

Regards,
Ronnie
Tarawerkz




> On 3 Dec 2020, at 9:27 PM, nug <4d_o...@pghrepository.org> wrote:
> 
> Ronie,
> -Go back to the originally damaged structure and try MSC on it again.
> -go back to a previous version of the structure (backup)
> -contact 4D support
> 
> While I personally do not like it….
> Also there is a new forum, where nearly ever one is now.
> You will get more help/eyeballs on this issue there
> 
> https://discuss.4d.com 
> 
> Chip
> 
>> On Dec 3, 2020, at 5:42 AM, Tarawerkz via 4D_Tech <4d_tech@lists.4d.com 
>> > wrote:
>> 
>> Hi All,
>> 
>> I would like seek advice on an issue I encountered with a v15 structure file 
>> which has been in use for a long time.
>> 
>> Recently, when I logged in with the designer password to make some 
>> amendments to the code, I encounter a memory allocation error on a resource 
>> blob.
>> So I did a structure repair and compact using MSC utility.
>> 
>> After the repair, the original error is resolved but a new error appeared in 
>> its place,  
>> This time it is an attempt to read beyond end of stream (error code 200).
>> Subsequent repairs of the structure file does not remove the error.
>> 
>> The issue is data independent as it also appears with an empty data file.
>> If I were to log in as a normal user (not the designer account), the error 
>> is not encountered.
>> 
>> May I ask how I can recover the structure in this instance?
>> 
>> Regards,
>> Ronnie
>> Tarawerkz
>> 
>> 
>> 
>> 
>> **
>> 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 
>> 
>> **
> 

**
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: Attempt to read beyond end of stream

2020-12-03 Thread Chuck Miller via 4D_Tech
Like Chip stetted, almost all are on discuss forum now. I don’t think support 
will help on a v15 db as they no longer support it.

Regards
Chuck

 Chuck Miller Voice: (617) 739-0306
 Informed Solutions, Inc. Fax: (617) 232-1064   
 mailto:cjmillerinformed-solutions.com 
 Brookline, MA 02446 USA Registered 4D Developer
   Providers of 4D and Sybase connectivity
  http://www.informed-solutions.com  

This message and any attached documents contain information which may be 
confidential, subject to privilege or exempt from disclosure under applicable 
law.  These materials are intended only for the use of the intended recipient. 
If you are not the intended recipient of this transmission, you are hereby 
notified that any distribution, disclosure, printing, copying, storage, 
modification or the taking of any action in reliance upon this transmission is 
strictly prohibited.  Delivery of this message to any person other than the 
intended recipient shall not compromise or waive such confidentiality, 
privilege or exemption from disclosure as to this communication. 

> On Dec 3, 2020, at 5:42 AM, Tarawerkz via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> Hi All,
> 
> I would like seek advice on an issue I encountered with a v15 structure file 
> which has been in use for a long time.
> 
> Recently, when I logged in with the designer password to make some amendments 
> to the code, I encounter a memory allocation error on a resource blob.
> So I did a structure repair and compact using MSC utility.
> 
> After the repair, the original error is resolved but a new error appeared in 
> its place,  
> This time it is an attempt to read beyond end of stream (error code 200).
> Subsequent repairs of the structure file does not remove the error.
> 
> The issue is data independent as it also appears with an empty data file.
> If I were to log in as a normal user (not the designer account), the error is 
> not encountered.
> 
> May I ask how I can recover the structure in this instance?
> 
> Regards,
> Ronnie
> Tarawerkz
> 
> 
> 
> 
> **
> 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
> **

**
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: Attempt to read beyond end of stream

2020-12-03 Thread nug via 4D_Tech
Ronie,
-Go back to the originally damaged structure and try MSC on it again.
-go back to a previous version of the structure (backup)
-contact 4D support

While I personally do not like it….
Also there is a new forum, where nearly ever one is now.
You will get more help/eyeballs on this issue there

https://discuss.4d.com 

Chip

> On Dec 3, 2020, at 5:42 AM, Tarawerkz via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> Hi All,
> 
> I would like seek advice on an issue I encountered with a v15 structure file 
> which has been in use for a long time.
> 
> Recently, when I logged in with the designer password to make some amendments 
> to the code, I encounter a memory allocation error on a resource blob.
> So I did a structure repair and compact using MSC utility.
> 
> After the repair, the original error is resolved but a new error appeared in 
> its place,  
> This time it is an attempt to read beyond end of stream (error code 200).
> Subsequent repairs of the structure file does not remove the error.
> 
> The issue is data independent as it also appears with an empty data file.
> If I were to log in as a normal user (not the designer account), the error is 
> not encountered.
> 
> May I ask how I can recover the structure in this instance?
> 
> Regards,
> Ronnie
> Tarawerkz
> 
> 
> 
> 
> **
> 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
> **

**
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
**

Attempt to read beyond end of stream

2020-12-03 Thread Tarawerkz via 4D_Tech
Hi All,

I would like seek advice on an issue I encountered with a v15 structure file 
which has been in use for a long time.

Recently, when I logged in with the designer password to make some amendments 
to the code, I encounter a memory allocation error on a resource blob.
So I did a structure repair and compact using MSC utility.

After the repair, the original error is resolved but a new error appeared in 
its place,  
This time it is an attempt to read beyond end of stream (error code 200).
Subsequent repairs of the structure file does not remove the error.

The issue is data independent as it also appears with an empty data file.
If I were to log in as a normal user (not the designer account), the error is 
not encountered.

May I ask how I can recover the structure in this instance?

Regards,
Ronnie
Tarawerkz




**
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
**