[EP-tech] use of uninitialized value in string eq during eprint->commit

Tomasz Neugebauer Tomasz.Neugebauer at concordia.ca
Sat Jul 11 03:38:11 BST 2020


Hi David,

Thank you!  That is brilliant use of grep.  Using this method, I was able to pinpoint the line, super helpful!
We are on 3.3.12, but the problematic line comes from the orcid_support_advance plugin version 1.5.1 from the bazaar.
It is this line:

Line 384:                   if( $old_c->{putcode} eq $new_c->{putcode} )

In this file: /cfg/cfg.d/z_orcid_support_advance.pl
That is actually line 384 in the default file from the bazaar: https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fbazaar.eprints.org%2F1138%2F1%2Fepm%2Forcid_support_advance%2Fcfg%2Fcfg.d%2Fz_orcid_support_advance.pl&data=01%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7C6c505b2aaea14ff8784e08d825439424%7C4a5378f929f44d3ebe89669d03ada9d8%7C0&sdata=8gdz%2B0NQTPyTqeETuIw4uW9Y5VyNiN8ZN%2F62r%2F2y%2FVM%3D&reserved=0
I see that this line is actually updated/fixed on GitHub, I guess it just didn't make its way to the Bazaar yet?

Line 384:                  if( defined $old_c->{putcode} && defined $new_c->{putcode} && $old_c->{putcode} eq $new_c->{putcode} )

https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Feprints%2Forcid_support_advance%2Fblob%2Fmaster%2Fcfg%2Fcfg.d%2Fz_orcid_support_advance.pl&data=01%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7C6c505b2aaea14ff8784e08d825439424%7C4a5378f929f44d3ebe89669d03ada9d8%7C0&sdata=hlGd5kxbC7DJ%2FP1CmTiu0OuU%2FuCJ4v2CYtcvarTuqtQ%3D&reserved=0

I know I mentioned line 379, but that's because I was testing on two different dev servers where that same line was in position 379 on a different server, but also being flagged on commit.

Thanks again!
Tomasz


From: David R Newman <drn at ecs.soton.ac.uk>
Sent: July 10, 2020 6:13 PM
To: eprints-tech at ecs.soton.ac.uk; Tomasz Neugebauer <Tomasz.Neugebauer at concordia.ca>
Subject: Re: [EP-tech] use of uninitialized value in string eq during eprint->commit





Hi Tomasz,

I have do deal with these sorts of issues quite a lot.  As you probably won't be surprised to hear, I do not know of the top of my head what is causing this issue.  However, what typical I do is grep over the archive's cfg and possibly bin directories to see if I can spot any code that may relate to this error.  Using the following command you will find any code that could lead to that error on line 379:

grep -rn " eq " EPRINTS_PATH/archives/ARCHIVE_NAME/cfg/ EPRINTS_PATH/archives/ARCHIVE_NAME/bin/  | grep ":379:"

If you don't find anything then it may be worth having a look in perl_lib, lib, flavours/pub_lib. ingredients, site_lib etc.  The reason for the "(eval 173)" is probably due to line 379 calling a user-defined function (sub).

If you can tell me the specific version of EPrints you are running I can probably have a look though the code codebase to give some suggestions.  There is a good chance that line 379 will be in the core codebase and line 173 will be the line in the archive level user-defined function.

Regards

David Newman


On 10/07/2020 23:01, Tomasz Neugebauer via Eprints-tech wrote:
I just finished a CLI script that updates some metadata field values in some items in my repository. Everything is working fine as far as I can tell, values get saved/updated, except that when I run the script, I get this warning every time I do $eprint->commit:

"Use of uninitialized value in string eq at (eval 173) line 379."

Has anyone seen this before?  It is rather cryptic and I can't even tell what file it is referring to?

Tomasz




*** Options: http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech

*** Archive: https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.eprints.org%2Ftech.php%2F&amp;data=01%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7C6c505b2aaea14ff8784e08d825439424%7C4a5378f929f44d3ebe89669d03ada9d8%7C0&amp;sdata=EMs%2BTHVvreMSjV9MDHXaqrQdNFgwiYzuhVAuJoGYLAY%3D&amp;reserved=0

*** EPrints community wiki: https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwiki.eprints.org%2F&amp;data=01%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7C6c505b2aaea14ff8784e08d825439424%7C4a5378f929f44d3ebe89669d03ada9d8%7C0&amp;sdata=RvlXTKgIzSaomas54lSkVOW52%2B4o60gyWJgSIzepGEw%3D&amp;reserved=0

[https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fipmcdn.avast.com%2Fimages%2Ficons%2Ficon-envelope-tick-green-avg-v1.png&amp;data=01%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7C6c505b2aaea14ff8784e08d825439424%7C4a5378f929f44d3ebe89669d03ada9d8%7C0&amp;sdata=hmn%2FsBaMJ854ntZngguVCCnVRMX5Gcabgy9wGHdIzns%3D&amp;reserved=0]<https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.avg.com%2Femail-signature%3Futm_medium%3Demail%26utm_source%3Dlink%26utm_campaign%3Dsig-email%26utm_content%3Demailclient&amp;data=01%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7C6c505b2aaea14ff8784e08d825439424%7C4a5378f929f44d3ebe89669d03ada9d8%7C0&amp;sdata=As3fWQTqmBrzS37WQ7ecqDs9LgJvpxzViVtIHOuzVrY%3D&amp;reserved=0>
Virus-free. https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.avg.com%2F&amp;data=01%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7C6c505b2aaea14ff8784e08d825439424%7C4a5378f929f44d3ebe89669d03ada9d8%7C0&amp;sdata=dOsxN4%2BSSWp3Q4a03bbH1h0%2Be3KOHGjhVYKIGJBUqK0%3D&amp;reserved=0<https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.avg.com%2Femail-signature%3Futm_medium%3Demail%26utm_source%3Dlink%26utm_campaign%3Dsig-email%26utm_content%3Demailclient&amp;data=01%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7C6c505b2aaea14ff8784e08d825439424%7C4a5378f929f44d3ebe89669d03ada9d8%7C0&amp;sdata=As3fWQTqmBrzS37WQ7ecqDs9LgJvpxzViVtIHOuzVrY%3D&amp;reserved=0>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ecs.soton.ac.uk/pipermail/eprints-tech/attachments/20200711/b36c0fe9/attachment-0001.html 


More information about the Eprints-tech mailing list